McDonald's launched its Chicken McNuggets in 1983.

Ray Dalio, the founder of the world's largest hedge fund, played a key behind-the-scenes role in the McNuggets' creation.

Dalio cracked the code that allows McNuggets to maintain a consistent, low price despite a volatile chicken market.

Before investor Ray Dalio's Bridgewater became the world's largest hedge fund, Dalio made history in another way: helping McDonald's mastermind the McNugget launch.

Ray Dalio, founder, co-chief investment officer and co-chairman of Bridgewater Associates, speaks at the 2017 Forbes Under 30 Summit in Boston, Massachusetts, U.S. October 2, 2017. Brian Snyder/Reuters

In the early '80s, after founding Bridgewater in 1975, Dalio was providing risk consulting to corporate clients. Two of these clients were McDonald's and a chicken producer — a match made in McNugget heaven.

"McDonald’s wanted to come out with the McNuggets," Dalio said in a recent interview with the podcast Freakonomics.

"But there was a lot of volatility in the chicken market at that time," Dalio continued, "and they were worried that if they set a menu price and the price of chicken then went through the roof that they would get squeezed or they’d have to raise the prices and it would be unstable."

Without an adequate chicken market, there was no way for chicken suppliers to ensure that chicken prices wouldn't skyrocket or drop dramatically. McDonald's needed a fixed price so that the fast-food chain didn't risk losing billions of dollars on McNuggets or being forced to raise prices outside of fast-food customers' price range.

Dalio managed to solve the conundrum by essentially breaking the chicken itself into the sum of its parts: a chick, plus the corn and soymeal required to grow the baby bird into a grown chicken.

"A chicken is mostly a little chick, and then it has a lot of grain that's added," Dalio said.

By buying or selling corn and soybean futures, the chicken supplier could hedge his costs and provide a fixed cost to McDonald's for the price of chicken McNuggets.

The poultry producer sealed the deal with Dalio's guidance, and McDonald's launched its chicken McNuggets — now the chain's most popular menu item — in 1983.