|Caterpillar at the end of its frass chain. Horace Tan, Singapore|
The caterpillar shown above is clinging to the end of a frass chain, a carefully constructed extension to a leaf petiole. After chewing the rest of the leaf away, it builds an extension of frass and silk. Learnaboutbutterflies.com describes the process:
"Frass chains are constructed by many caterpillars, chiefly neotropical and Afro-Asian Nymphalidae. When not feeding, the young larvae rest at the tip of a chain constructed from their own droppings. The larva typically eats away the leaf tissue, leaving only the midrib intact, and then deposits a row of its droppings along the midrib. The droppings are bound together with silk. The line or 'chain' of droppings (frass) is then extended so it projects by about 2 centimetres beyond the leaf tip." Watch the construction in this video.The frass chain isolates the resting caterpillar from the leaf blade where ants and other predators travel in search of them. So far there has been no evidence that the frass itself has repellant properties. Horace Tan of Singapore describes this more fully in his pictures of the chocolate sailor butterfly.
|Fecal shield on a tortoise beetle- Troy Bartlett|
"Fecal shields are a predator deterrence strategy. The beetles emit chemical compounds, such as saponins and steroidal alkaloids, in their feces that have toxic effects on predators. Authors show that generalist predator ants, such as Formica subsericea, will be disuaded from predating on beetle larvae with frass shields (Vencl et al. 1999). Once an ant has been in contact with a shield, it will move away from the larvae and begin to clean itself vigorously. There are a variety of chemical compounds in the beetle's feces that is obtrusive and toxic to the ant, including molecules such as steroidal glycoalkoloid derivatives, dioscin metabolites, fatty acids, and phytol derivatives (Vencl and Morton 1998)."In addition to turning hard, the fecal shields can be toxic. Similar to the monarch butterfly which ingests toxic alkaloids from milkweed, some leaf beetle species ingest and excrete alkaloids and other toxic metabolites from their host plants.
Wikipedia has much more information on fecal shields, including a video, graphic details about their consistency and the anatomical adaptations of how they deposit them on their backs. One genus' "larva constructs the shield by maneuvering its muscular telescopic and highly protrusible anus, or "anal turret" which is positioned dorsally on the back." This may be more than you wanted to know, but it serves to illustrate the wonderful diversity of nature.