A cocoon is a shell made of silk by most kinds of mothcaterpillars and other insectlarvae. Some butterflylarvae (in the familyHesperiidae and subfamiliesParnassiinae and Satyrinae) do spin cocoons. However, most butterfly pupae are called chrysalids. Some caterpillars attach small twigs or pieces of vegetation to the outside of their cocoon to hide it from predators. Others spin their cocoon in a hidden place. Examples would be on the underside of a leaf, in a crevice, or down near the base of a tree trunk.