One species of pistol shrimp forms colonies inside sponges, very much like bees in hives or ants in hills. These shrimps are considered to be eusocial, a term that describes groups of organisms in which most of the members are sterile workers while only one or two individuals are in charge of breeding. The interior of a sponge is similar to a chunk of Swiss cheese, riddled with tunnels and chambers. The pistol shrimps live in these passageways, gorging on sponge tissues that they scrape up with their small feeding claws. The predator-deterring toxins generated by sponges have no effect on these tiny boarders.
They thrive in the sponge environment, often producing colonies of several hundred individuals. For the shrimps, the sponge is a perfect home, safe from predators and stocked with plenty of food.
In a colony of pistol shrimp, there is one breeding female. Often, but not always, one breeding male lives in the colony, too. All of the other members are males or juveniles who are not sexually differentiated. Many of these males patrol the sponge, defending it from other shrimp that would like to take over the space. This division of labor gives these shrimps a competitive edge and improves the chances of survival for all involved.
Eusocial shrimp colonies are possible because, unlike other crustaceans, the eggs of these animals do not hatch into larvae that swim in the plankton. Instead, they develop directly into shrimp that go straight to work in the colony. The young have no need to travel away from their parents in search of food and shelter. Except for the occasional juveniles who leave to strike out on their own, most of the snapping shrimps that are born in a sponge spend their entire lives there.