Not only can feed from human poo double farm output, it’s greener and produces healthier output for consumers. It could be the key to solving Africa’s food and sanitation challenges.

Kenyan farmer Victor Kyalo’s chickens have doubled the number of eggs they are laying. The secret: Human excrement.

The farmer’s fortunes turned around when he began feeding them animal feed from Sanergy. The Nairobi-based organics recycling company harvests waste from toilets it operates in a franchise network in Nairobi’s sprawling slums and feeds it to fly larvae, which become high-quality animal feed.

The win has not been Victor’s alone, his customers have started appreciating the bigger eegs and yellower yolks since he started using Sanergy’s feed.

“Before we were getting like five trays (of eggs) per day, but now we are getting 10,” Kyalo said in an interview with Reuters.

The race to feed 10 billion mouths by 2050, coupled by increased awareness of effects of global warming has forced the food producers to look to greener productiom methods. Businesses such as Sanergy, harvesting insects — either for human consumption or as animal feed — are growing. They have positioned themselves as a greener alternative to traditional feed such as soybeans, whose cultivation can lead to deforestation and the overuse of farm chemicals.

Large food companies have also begun investing in research on how insects can transform animal feed production to reduce reliance on soy protein. Among the biggest investors in studies are fast food giant McDonald’s and U.S. agricultural powerhouse Cargill Inc.

Last year, market research firm Meticulous Research estimated that by 2023 the global edible insect market could triple to $1.2 billion from current levels.

The industry offers a great opportunity for African cities such as Nairobi that are battling with a growing urban population. The World Bank says nearly two-thirds of urbanites live in slums, feeding waste to fly larvae could solve both sanitation and nutrition problems.

Faeces from more than two-thirds of Nairobi’s inhabitants go untreated because there are not enough toilets. Many others are not cleaned out regularly posing a serious health risk in the overcrowded slumps, a risk that results in days off taken by workers slowing down the economy by at least 1% annually as reported by the country’s health ministry.

Sanergy was founded 8 years ago to deal with Nairobi’s sanitation woes. Its franchises, operated by local residents have grown to provide more than 2,500 toilets to 100,000 people daily.

Nestled beneath its squat-toilets are small blue barrels that, once full, are sealed and taken to an organics recycling factory in Machakos County. The waste is then mixed with food waste from hotels and restaurants before being fed off to larvae.

David Auerbach, co-founder of Sanergy, said once the factory is exoanded later this year it will provide 400 tonnes of fertilizer. Larvae production will ratchet up from 7 tonnes to 300 tonnes per month.

Frederick Wangombe, an animal nutritionist at Unifeed, a Kenyan animal feed miller that uses Sanergy’s black soldier fly product, envisages it replacing fish meal from Lake Victoria, which can contain sand and other impurities, or expensive soy beans from Zambia. Some of the soy beans used by African millers come as far off as Brazil.

“The egg farmer doesn’t want to know what’s in the feed, they want to know the performance,” he said.