In a letter to shareholders written in 2002, Warren Buffett, by all accounts one of the greatest moneymen in history, issued a warning. There was one financial asset traded on world markets that was making him worried, and in reaching for a metaphor, he didn’t hold back. “Derivatives,” Buffet wrote, “are financial weapons of mass destruction, carrying dangers that, while now latent, are potentially lethal.”

When Buffett wrote those words, the total value of all derivatives in existence was $142 trillion. In the years that followed, the market surged, so that by mid-2008 the figure stood at $458 trillion. When the crash came the now notorious Collateralised Debt Obligation, a species of credit derivative, and its close friend the Credit Default Swap, became the nitro and glycerin that helped blast the global financial system to pieces. No one had listened to Buffett. On derivatives, it turned out he’d been right all along. They could be lethal.

Ten years on from the financial crisis, they are more popular than ever. According to the Bank for International Settlements, the notional value of all outstanding derivatives stands at $542.4 trillion, higher even than the pre-crisis peak. To give some sense of what that number actually means: if a million pounds is a cube of fifties about three feet high, then a billion pounds would make a tower of notes three thousand feet high. A trillion, on the other hand, would reach an altitude of about 570 miles, stretching out past the orbit of the International Space Station.

So there are a whole lot of derivatives out there, on a scale so vast it makes you dizzy—and it looks like they are about to become a problem again. The 2008 crunch was set off by a slowdown in the US housing market. But the derivatives market now faces an altogether different threat, this time from Brexit.

In recent testimony before a Commons committee Mark Carney, the Governor of the Bank of England issued a warning about the derivatives market. The British government has said it will pass laws allowing EU firms to work on derivatives trades with UK companies post-Brexit, but the European Union has not made a corresponding offer. If Brussels and London can’t get a deal in place there is a risk that the UK-EU derivatives market could face disruption. If that happens, Carney said, we’d see “a financial stability risk developing fairly quickly.” And when asked about the value of the derivatives contracts at risk from Brexit: “Notionally it is £26 trillion to £27 trillion.”

Whatever you think about the banks, the lesson of the 2008 crunch is horribly clear: that the financial sector is the lifeblood of the economy and when the banks seize up, the real economy soon follows. In 2006, UK unemployment was 4.8 per cent. The financial crisis sent it up to 8 per cent. Financial risks, like the one Carney now sees in the derivatives market, can have consequences not just for the banks, but for us all.

Nicky Morgan chairs the Commons committee that questioned Carney, and I asked her what would happen if there was no agreement on derivatives contracts between London and Brussels. “Failure to put in place provisions to allow existing contracts to be honoured and trading to take place,” she said, “would have an immediate impact on the way our financial institutions work and their ability to conduct business in a variety of sectors.”

So why haven’t we learned the lesson that seemed so clear to Warren Buffet all the way back in 2002: that derivatives are inherently risky and need careful attention? Why are there so many of them in circulation and what, really, are they? And what happens if Brexit causes the whole thing to fall over? In the words of the governor of the Bank of England, “It’s unfortunate, it’s complicated. I’m not sure when the Article 50 was designed, it was done so with the derivatives market in mind.”

***

Though associated with super-technologised financial markets, the basic principles that derivatives embody have been around for longer than you might think. In his Politics, Aristotle told the story of Thales of Miletus, the sixth century BC philosopher who’d become fed up with people telling him how useless he was. “But from his knowledge of astronomy,” Aristotle writes, “he had observed while it was still winter that there was going to be a large crop of olives.”

“So,” the story goes, “he raised a small sum of money and paid round deposits for the whole of the olive-presses in Miletus and Chios, which he hired at a low rent… and when the season arrived, there was a sudden demand for a number of presses at the same time, and by letting them out on what terms he liked he realised a large sum of money.”

“The notional value of all outstanding derivatives stands at $542.4 trillion”

Thales wasn’t so useless after all. He’d worked out a way to take a position on the future cost of processing olives. If demand for processing rose, he’d make money, if it fell, he’d lose. Notice that he’s not bought or sold any actual olives, or olive presses. Instead he’s entered into a contract that derives its value from these things. There’s another key characteristic to note, which is that a derivative is a contract between two participants, each of whom gets something out of the deal. In this case, the owners of the olive presses get a guaranteed whack of money from Thales which they keep whether the olive harvest is bounteous or non-existent. As for Thales, he gets the chance to make a few quid, which it seems he did. The old philosopher may not have known it, but he’d essentially invented the derivatives contract.

Similar deals have been seen throughout history. Traders on Japanese rice exchanges in the 17th century, for example, used to buy and sell the product of future harvests, betting, like Thales, that they knew how demand would change over time. But the modern era of the derivative really began in Chicago in the 19th century. The city had become a railroad hub where vast quantities of grain and other products from the agricultural heartlands of America were brought to be traded.

The problem with buying and selling the results of harvests is that supply goes up and down and, with it, the price—and nobody likes sharp swings in price. Imagine if a loaf of bread cost £1 on Monday and £50 on Friday. There would be uproar. Household budgets would be thrown into disarray. It’s the same with traders on exchanges. They don’t want to buy a ton of grain only for it to halve in value overnight. And if prices suddenly double, then who can afford that?

To offset the risk of sudden price moves, traders started buying the rights to future harvests at fixed rates, so they could lock in the price and protect themselves from any ups and downs. Sure, they might agree to buy at 100 only for the price to drop to 90. But that extra 10 they pay over the market rate is worth it for the peace of mind it brings. This type of derivative contract is known as a “future.” Nowadays there is a whole forest of different derivatives, including options and also swaps. These come in various forms, including interest rate swaps—exchanging a fixed-rate loan for a floating rate, for example—and even more abstruse products like total return swaps, zero coupon swaps and credit default swaps (look them up.)

Whatever kind of derivative contract you have, chances are it will include some element of time: that is, you are taking a position based on something you think might happen in the future. That means that derivatives have what you might think of as a life span and here’s where the Brexit threat comes in. Say you are a bank based in Canary Wharf and you enter into a derivative contract with an EU bank. The law is currently pretty clear on what that means and what your obligations are. But if Brexit happens during the life span of a derivative contract, the legal framework vanishes. At that point it becomes illegal for a UK bank to work on derivatives contracts in the EU. Unless an agreement is reached between London and Brussels on what happens in this situation, the result could be a sudden, very nasty, very large shock.

There are two main classes of derivative and they each face a distinct Brexit threat. Derivatives contracts between one financial organisation and another, with no intermediary, are called “Over the Counter” derivatives, or OTCs. These have certain “life-cycle events,” which are times when the small print can be amended, or when one side of the trade can pass it off to another organisation, and so on. The current rules allow British banks to carry out these “life cycle events” across the EU. When those rules fall away, as they will with Brexit, UK banks will need permission from every country where they operate if they are to do this work.

As Sam Woods, Deputy Governor of the Bank of England, put it in a press conference, “To varying degrees in each of the EU28 countries, the ability of companies to service those contracts with what we call lifecycle events would be impaired, because it would be illegal to do that without the authorisation.”

There are objections to that analysis. Representatives of the law firm Shearman and Sterling have argued that the European Court of Human Rights, which is not part of the EU, guarantees the continuity of rights for banks to carry on with derivatives operations. This may be correct—but even so, it’s an argument that would have to be tested in litigation. In the event of a hard Brexit, banks and other financial organisations wouldn’t want lengthy legal arguments about the status of trillions of pounds-worth of their financial assets. They would, understandably, want immediate clarity.

It’s also suggested by some on the continent who don’t much like high-end financial wizardry, that ending all this derivative activity would be no big deal—that companies would simply have to go on without derivatives which are, after all, inherently risky. Economists tend to look at derivatives as a way of managing risk. Used in conventional ways, they are a form of insurance, a protection against future events. Another view is that they don’t so much allocate risk as conceal it (really they do a bit of both.) However, a system that has come to rely on derivatives will become substantially more unstable if their use is suddenly withdrawn. The financial world would be less able to adjust to market downturns and more vulnerable to external shocks, which is not what you want at a time of such global political instability.

There’s a secondary layer of complication, one that worries experts even more than the threat of legal limbo. After the financial crisis of 2008 when all those Collateralised Debt Obligations went bad, regulators started pushing more derivatives into structures known as clearing houses. These are entities that sit between the two parties in a derivative contract and guarantee both sides of the trade. That means all of the derivatives, and the companies involved, are visible to regulators, so the risks involved are open to view. What’s more, the parties on either side have to put up cash, and that money is held by the clearing house in case something goes wrong—if one side of the derivative trade goes bust, then the other still gets paid.

It’s in the clearing houses that the possibility of a real Brexit crunch arises and, by chance, the largest derivatives clearing house in the world is LCH—formerly “the London Clearing House”—just next to Aldgate Tube station. “We regularly clear in excess of $1 trillion notional per day,” says its website. LCH is currently authorised to do business across the EU, and processes many billions of trades for EU firms every day. But when Brexit hits, from the EU’s perspective, it will turn into a “third country entity,” and will lose its right to accept trades from firms based in the EU. That means that some of Europe’s biggest banks will need to get out of the London Clearing House and into a clearing house recognised by Brussels.

“If Brexit happens during the life span of a derivative contract, the legal framework vanishes”

But this is more complicated than it sounds. A clearing house is always in balance—every trade has a “buy” on one side and a “sell” on the other. So if you want to get out of the UK and into the EU you have to trade your way out of London and then trade back into a continental clearing house. That means you need to find someone who wants to adopt all of the trades you want to get out of. This would lead to a colossal pile-up of activity, as banks scramble to get out of London and into the EU—it would be unprecedented in the history of financial markets. Large companies spend years building up their trading positions. The Bank of England estimates that £33 trillion-worth of derivative positions across Britain’s clearing houses will have to be extracted and put into the EU. Processing all that business would take a huge amount of time and the system would come under colossal pressure. The consequences of this would be severe.

The Bank of England and the European Central Bank have been working to get a technical fix in place. The Department for Exiting the EU has also been looking at the problem, but without success. There’s not much time left to get an agreement and as one close observer of the situation told me, the “EU is playing its cards close to its chest.” One long-time city hand told me that the whole thing felt like Y2K all over again—a fuss about nothing. Surely something would be worked out. In June, Andrea Enria, who chairs the European Banking Authority, the EU’s financial regulator, said in a statement: “firms cannot take for granted that they continue to operate as at present nor can they rely on as yet unrealised political agreements or public policy interventions.”

There are real risks to UK financial stability from this, not only for financial services, but for the real economy too. Big financial institutions use derivatives, but so do smaller companies: holiday operators who want to protect themselves from moves in exchange rates, small and medium-sized manufacturers who want to make sure the prices of their raw materials don’t get out of hand. The potential damage goes far beyond the square mile. It goes so far in fact, that US regulators are starting to get worried about the effect of Brexit on the derivatives market—US firms could also be exposed.

Nobody wants Warren Buffett to be right a second time. And he might not be. It could be that London and Brussels agree on an all-encompassing Brexit plan that covers off all of the issues raised here, along with all those additional questions on immigration, the customs union and so on. It’s possible, yes. But not probable. The prime minister is yet to reach an agreement on Brexit with her own cabinet, let alone the EU.

The truth of it is that, ultimately, if these trillions of pounds-worth of derivatives get tangled up in a hard Brexit crunch, nobody knows what the consequences of that could be. None of the experts I spoke to would be drawn on specifics. But what can be said is that UK and US regulators are focused on this problem, and they are worried. And when it comes down to it, not knowing the nature of the threat is perhaps the scariest thing of all.