A boat in a container shipyard

Derivatives Dilemma: DeFi Must Evolve Beyond the Order Book

The possibilities for derivatives are nearly endless, but the design space for DeFi derivatives remains largely unexplored. Shipyard is working on a solution.

Written by

Mark Lurie

Published on

August 12, 2022

The possibilities for derivatives are nearly endless, and the universe of structured products is infinite. But the design space for DeFi derivatives remains largely unexplored and mostly unsolved. The evidence thus far suggests the crypto space can only reach maturity – and kickstart the next great wave of crypto adoption – if DeFi is able to create sophisticated, native risk management products, particularly derivatives. 

The problem is, most derivatives DEXs today still use order books, just like Etherdelta in the early days of spot DEXs. The order book model works well for many market types, but it’s antithetical to decentralized finance. Let’s take a closer look at why DeFi must evolve beyond the order book in order to spread its wings and fly.

The issue with order books

Order books are an effective matching engine for high-volume market orders in traditional finance and essential to the NYSE and financial institutions around the world. That’s why developers like to use them. However, order books fall short when applied to DeFi, whether they are off-chain or on-chain. Let’s take a look at why:

On-chain order books will never be as efficient as centralized order books, which are among the best performing computing systems ever invented. It’s impossible for a distributed system to be as efficient as centralized markets, because by definition it has to run redundant calculations across multiple, often-distant devices to achieve consensus. In short, the benefits of decentralization come at the cost of speed — as well as cost.

Still, the emergence of high-performance L1 blockchains and L2 Ethereum scaling solutions has fueled the belief that distributed performance may be good enough to support on-chain order books. But this may never work because gas and storage costs are too high. Greater liquidity means more high-frequency traders, which in turn drives up gas and storage costs, making the system untenable. Even blockchains that aren’t currently overloaded may become so; as they attract more users, these networks will become victims of their own success. In short, on-chain order books are simply unfeasible. 

Off-chain order books will also fail, but for different reasons. It’s true that many derivatives DEXs — namely dYdX, Perpetual Protocol, and Futureswap — have returned to the off-chain order book while keeping settlement on-chain to avoid the performance shortcomings of on-chain order books. However, this approach suffers from the same problems that held Etherdelta back.

First, they are not censorship resistant. Off-chain order books run on centralized servers, which means they can be subject to regulations that don’t make sense in a DeFi context, or even shut down. This is exactly what happened to Etherdelta, and there’s no reason it can’t happen to derivatives DEXs as well. Second, off-chain order books are not composable because they do not adhere to a set formula. As a result, other applications are unable to wrap order book-created derivatives into their services or into more complex structured instruments. 

The above issues may explain why DeFi derivatives volume accounts for less than one percent of all CeFi derivatives volume. To this day, many existing DeFi derivatives suffer from capital inefficiencies and poor pricing due to this forced imposition of ill-suited TradFi solutions upon blockchain networks, which limits the success of these protocols. 

AMMs have replaced the order book – for spot trading

In spot trading this dilemma was solved by the advent of the automated market maker (AMM), which cut out the “middleman” and eliminated the centralized order book. Shipyard’s co-founder Abe Othman, Ph.D. wrote the seminal research on this, Vitalik Buterin of Ethereum proposed it for DeFi, and Hayden Adams of Uniswap was the first to implement this technology. 

Now, AMM-backed DEXs use capital in liquidity pools to make markets for trades that adhere to a prespecified math formula. This is in stark contrast to centralized exchanges, which use order books to match buy and sell orders at the margin. The AMM revolution fueled the first great wave of DeFi adoption, and DeFi spot volume has skyrocketed from essentially nothing to roughly 10% of global CeFi activity in just a few short years.

DeFi needs derivative AMMs – but it isn’t easy

We need a new paradigm for derivatives that eliminates the order book — an AMM, but for derivatives. But why is this so hard? 

The main reason is because options pricing formulas require complex calculations and incorporation of historical volatility. Even in the offchain world, up until recently technology could not meet the challenge. It wasn’t until the 1975 release of the first personal computer that could perform logarithmic and exponential calculations – the Texas Instruments’ SR-52 – that anyone could easily execute complex derivatives pricing formulas via the Nobel Prize-winning Black-Scholes model.

As computing power doubled every few years, per Moore’s Law, derivatives trade volume grew proportionally, which is to say exponentially. But Moore’s Law does not apply to distributed systems, and the Ethereum blockchain still cannot even handle exponential or logarithmic calculations. Sure, some newer blockchains are better, but the more these systems are used the slower they get. This makes calculating derivatives prices on the blockchain impractical. Sure, those calculations can be performed off-chain and trades matched through off-chain order books, but this CeFi model defeats a key purpose of blockchain technology — the security of decentralization and the benefits of composability. 

Shipyard is devising a solution

It’s essential that web3 developers tackle the DeFi derivatives challenge head-on because the benefits will be vast and universal. US derivatives volume is an order of magnitude larger than spot trading, because derivatives perform the critical service of managing economic risk.

But what might an actual solution look like? For starters, rather than replicating perpetual swaps with a traditional order book, we should rethink these financial instruments from first principles with the constraints of blockchain in mind. There are many derivatives designs that might make very little sense in centralized markets where processing power is plentiful

This is not some distant theory. Shipyard is putting the finishing touches on a solution to the derivatives dilemma, one that forgoes incompatible TradFi design principles in favor of true decentralized derivatives trading. 

Expect some exciting news in the coming months.

Written by

Mark Lurie

Published on

August 12, 2022

September 29, 2022

Among the US Congress' proposed bills, the Digital Commodities Consumer Protection Act takes the most practical approach to digital asset oversight.

September 13, 2022

New DEXs are pushing beyond simple spot trades for common crypto assets, and Clipper users can now become a Sponsor and earn among the highest yields in DeFi!

Keep up with DeFi by subscribing to Shipyard’s industry newsletter

We’ll send you the latest news about DEXs, stats on our products, interesting articles, and CEO Mark Lurie’s thoughts on it all.

Thank you! Your submission has been received!
Oops! Something went wrong. :-( Please try again.