These conditions aren't the most beneficial for the trees, leading to more stress and, according to the study, beans that have more phenols and other antioxidants that lead to better tasting chocolate. They hope to manipulate the DNA of cacao plants to make them withstand dryer, warmer climates in the years to come.
They're exploring the possibility of using the gene-editing technology CRISPR to make crops that can survive the new challenges.
The company has also joined forces with researchers at the University of California-Berkeley to work towards a solution. According to the National Oceanic and Atmospheric Administration in the US, cacao trees can only grow within 20 degrees north or south of the equator, where conditions are just right - fairly constant warm temperatures, high humidity, high rainfall, low winds and rich soils, conditions one would expect from rainforests.
Cacao is a somewhat moody plant, only thriving in a few remote areas of the planet, and it doesn't do very well in unpredictable climates. Officials in countries such as Côte d'Ivoire and Ghana - which produce more than half of the world's chocolate - will face an agonising dilemma over whether to maintain the world's supply of chocolate or to save their dying ecosystems.
"We're trying to go all in here", Mars' chief sustainability officer Barry Parkin told Business Insider.
Mars' decision to collaborate with UC Berkeley scientists is a part of this initiative. "There are obviously commitments the world is leaning into but, frankly, we don't think we're getting there fast enough collectively". While the geneticist who invented CRISPR, Jennifer Doudna, acknowledged some risk inherent to the technology, which could potentially eradicate human diseases, she said it could have a big impact on the food we eat.
The research lab she oversees at UC Berkeley is called the Innovative Genomics Institute.
Stockpiles of cocoa are running low and the effects of climate change on yields could add up to a serious global shortage, according to one expert.