I guess it could, but proteins and peptides are very complex substances.
A slight change in molecular structure can make a substance that would otherwise bind and ACTIVATE a pain transducing receptor, instead bind to and INHIBIT activation of the pain tranducing receptor.
Thus a small difference in molecular structure of the “venom” would make something that causes severe pain instead inhibit severe pain.
But yes, it is very complex; that is why anything that sheds light upon these biological processes can yield a wealth of information and (hopefully, eventually) usable products.