Caterpillars of the cabbage white butterfly, Pieris rapae feed on plants that can generate toxic cyanide. Their primary adaptation is the excretion of cyanide-producing glucosinolates as aliphatic nitriles. Not all of the toxins are excreted. Some is converted to aromatic nitriles that release cyanide when metabolized by the caterpillar. To clear the cyanide, Pieris rapae uses an enzyme that combines the cyanide with the amino acide cysteine to create Beta-cyanoalanine plus hydrogen sulfide (see below). The cysteine is regenerated in another reaction of hydrogen sulfide with O-AcetylSerine.
Scientists* have found a family of 3 enzymes that are produced in the gut. Interestingly, the genes for these enzymes are closely related to similar genes found in some bacteria. It is possible that this gene has moved from bacteria to caterpillars, resulting in higher tolerance to cyanide.
*Maike van Ohlen, Anna-Maria Herfurth, Henrike Kerbstadt & Ute Wittstock. Cyanide detoxification in an insect herbivore: Molecular identification of Beta-cyanoalanine synthases from Pieris rapae. Insect Biochemistry and Molecular Biology 70 (2016) 99-110.