When researchers created an insurance company and started selling crop insurance, the farmers bought the the insurance and expanded their businesses.

Today, the biggest insurance market of all blurs the line between insuring and gambling: the market in financial derivatives.

Derivatives are financial contracts that let two parties bet on something else - perhaps exchange rate fluctuations, or whether a debt will be repaid. They can be a form of insurance.

An exporter hedges against a rise in the exchange rate. A wheat farming company covers itself by betting that the price of wheat will fall.

The ability to buy derivatives lets companies specialise in a particular market. Otherwise, they would have to diversify - like the Chinese merchants four millennia ago, who didn't want all their goods in one ship. The more an economy specialises, the more it tends to produce.

But unlike regular insurance, for derivatives you don't need to find someone with a risk they need to protect themselves against. You just need to find someone willing to take a gamble on any uncertain event anywhere in the world.

It is a simple matter to double the stakes - or multiply them by a hundred. As the profits multiply, all that is needed is the appetite to take risks.

Before the international banking crisis broke in 2007, the total face value of outstanding derivatives contracts was many times larger than the world economy itself.

The real economy became the sideshow, the side bets became the main event.

That story did not end well.

Tim Harford writes the Financial Times's Undercover Economist column. 50 Things That Made the Modern Economy is broadcast on the BBC World Service. You can find more information about the programme's sources and listen online or subscribe to the programme podcast.