A cocoon is a shell made of silk by most kinds of moth caterpillars and other insect larvae. Some butterfly larvae (in the family Hesperiidae and subfamilies Parnassiinae 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.