A mutualistic symbiotic relationship between Costa Rican three-toed sloths and cryptoses moths exists. It is also ectosymbiotic, that is, moths live ON the sloths. This relationship is complex, but also beneficial in many ways to both parties.

Every three-toed sloth has approximately 120 cryptoses moths living exclusively on it at any given time. These moths are completely dependent on the sloths. A sloth's hair "contains cracks that collect rainwater, and act as miniature hydroponic gardens for growing algae." (Can Moths Explain Why Sloths Poo on the Ground, Ed Yong, nationalgeographic.com)

The moths feed off of the sloth's skin secretions and the algae which grows on the sloth's fur containing nutrients essential to the well-being of the moths.

So, how does this algae benefit the sloth? First of all, the green algae adhering to the sloth's fur provides a natural camouflage to predators. This algae is also nutritionally beneficial to the sloth. It provides nutrients absent in the three-toed sloth's diet. I'll explain by citing the summarized research of Jonathan Pauli, an ecologist at University of Wisconsin, Madison. He calls the sloth a "mobile ecosystem."

Once a week the three-toed sloth descends from its tree to defecate, whereas two-toed sloths very rarely descend to do so. This begs the questions, "Why does the three-toed sloth do it and the two-toed sloth not? And, why risk a predator attack likely ending in death to do so?" We all know that sloths are slow, and susceptible to predatorial attacks, but there has got to be a reason why the three-toed sloths take this risk.

It has everything to do with differences in diet. The two-toed guys forage on a wider variety of plants, offering substantial nutrition. The three-toed sloths eat only from the canopy, having less variety in their diet, left to gain nutrients from other sources and by other methods. Through his study of brown throated, three-toed sloths, Pauli discovered and theorized that the number of moths, amount of algae, and the nitrogen content of the fur were all directly proportional and there was a much higher content of all 3 in the three-toed than the two-toed sloths, therefore a higher amount of absorbable nutrients–which makes up for the poor diet of the three-toed sloths. On the flip side, two-toed sloths are not reliant on the moths or the algae for nutritional needs.

Sloths and Moths: A Mobile Ecosystem, Source: Proceedings of the Royal Society B

A further example of the sloth-moth ecosystem (symbiotic relationship) is that when the sloth descends its tree to defecate, the female moths leave the sloth's fur to lay its eggs in the waste. Once the eggs are laid, the moths return to the fur of the sloth, die and decompose with the help of fungi and bacteria present in the sloth's fur. Nitrogen, a product of the decay of the decomposed moth bodies, serves as a fertilizer for the algae. And, the larvae at ground level feed exclusively on the excrement of the sloth. Once the larvae has metamorphosed into moths, the moths fly to the canopy to find a sloth to inhabit. And, so the cycle continues.