It's very complicated - unless you are a biochemist? Here is an abstract from a paper investigating the chemistry:
"Pure Vespula maculifronsvenom was demonstrated to contain five major allergenic proteins, which were all isolated from commercial venom sac extract. The five proteins: Vmacl, MW 97,000; hyaluronidase, MW 46,000; Vmac3, MW 39,000, phospholipase A and B, MW 34,000; and antigen 5, MW 22,000 were all demonstrated to be biochemically and immunologically distinct. All five proteins had significant allergenic activity, with phospholipase and hyaluronidase demonstrating the most IgE binding with 39 sera from allergic patients"
I am not sure how well you understand chemistry but the bulk of the the venom of Vespula spp. comprises of these five proteins which have allergenic properties when injected into us. Ironically it is our own bodies that produce the swelling, anxiety and pain post sting. A small percentage of people have more severe reactions to the venom and are hypersensitive and in the worst case scenario this can cause death if not treated very quickly. The good news is that in the course of ones lifetime we are only likely to be stung 2-3 times.
The application of vinegar to wasp stings and soda to bee stings may provide a little local relief but is generally unfounded as the chemistry of the sting is more complex than simply being acid or alkaline. The best treatment by far is the application of antihistamine cream which all 'ever ready' mothers should keep in their handbags (or fathers in their manbags of course).