Spare a minute from your frenetically busy day to consider the quite different life of the three-toed sloth. It is true that the sloth, which lives in the jungles of Central and South America, would barely prevail in a race with a snail. But it is not a sluggard because it is lazy. Rather, it has carved out a remarkably ingenious mode of life in the treetops, but one that imposes certain constraints on its speed and energy level.

The sloth is not so much an animal as a walking ecosystem. This tightly fitting assemblage consists of a) the sloth, b) a species of moth that lives nowhere but in the sloth’s fleece and c) a dedicated species of algae that grows in special channels in the sloth’s grooved hairs.

Groom a three-toed sloth and more than a hundred moths may fly out. When the sloth grooms itself, its fingers move so slowly that the moths have no difficulty keeping ahead of them. The probable interplay of these three components has now been worked out by a team of biologists led by Jonathan N. Pauli and M. Zachariah Peery at the University of Wisconsin. Their first step was to ponder a 35-year-old mystery about the behavior of the sloth.

Every week or so, the sloth descends from its favorite tree to defecate. It digs a hole, covers the dung with leaves and, if it is lucky, climbs back up its tree. The sloth is highly vulnerable on the ground and an easy prey for jaguars in the forest and for coyotes and feral dogs in the chocolate-producing cacao tree plantations that it has learned to colonize. Half of all sloth deaths occur on the ground. The other serious hazard in its life is an aerial predator, the harpy eagle. Why then does the sloth take such a risk every week? Researchers who first drew attention to this puzzle in 1978 suggested the sloth was seeking to fertilize its favorite tree. Meanwhile, the algae that gave the sloth’s coat a greenish hue were assumed to provide camouflage.

Writing last month in Proceedings of the Royal Society B, the Wisconsin researchers assembled all these pieces in a different way. They started by trying to understand what would compel the sloth to brave the dangers of a weekly visit to ground level. Its distant evolutionary cousin, the two-toed sloth, stays safely in the canopy, out of the jaguar’s view. The visit to the ground, the researchers concluded, could not be for the tree’s benefit, because the sloth’s dung would not make much difference to its nutrition. Rather, they assumed, it was to favor a critical component of the sloth’s ecosystem, the pyralid moth. The descent affords the pregnant moths in its fleece a chance to lay eggs.

The moths’ caterpillars are coprophagous or, to put it more bluntly, consumers of excrement. They grow to maturity in the sloth’s dung pellets and, on hatching, flutter up to the trees to find a sloth host. Burrowing into its fur, they mostly shed their wings and live there happily for the rest of their days, mating and dying in a safe, protected environment. After they die, their bodies are decomposed by the host of fungi and bacteria in the sloth’s fur. The metabolic products of this decay, especially nitrogen, are the feedstock for the specialist algae that grow in the sloth’s hair shafts. The researchers surmised that the sloths might be eating the algae from their own fur, and that this could be the purpose of the whole system.

Leaves are poor sources of nutrition, and animals that depend on them, like gorillas, often require large guts to hold them all. The sloth, having to climb along thin branches, cannot afford a big gut. It moves slowly because every calorie counts, and it pays to slow down its metabolism. But the invention of giving over its fleece to algae farming would go a long way to solving its problem of limited nutrition. Pauli and his colleagues concluded that the sloth might be overcoming the poverty of its leaf diet by eating the algae on its fleece, and that the moths were essential fertilizer for the algae.