Help Me OB, You’re My Only Hope
Nearly all exchanges utilize an order book and it wasn’t until recently that the AMM became popular. At its core, an order book is simply a list of all requests to buy or sell an asset, for what price, and at what quantity. This means that order books are a very effective way to directly provide information on price, availability and, at least in theory, allow traders to gauge market sentiment.
Better Comparison
The model for order book liquidity that we discussed last episode can help give us an intuitive understanding of why the shape of liquidity might be distributed a certain way, but it’s oversimplified and not the best to use for comparing to AMM liquidity. So, why not go directly to the source and look at some real order book data from exchanges? Obviously, order book liquidity is broken up into discrete chunks as opposed to the continuous “liquidity density function” of AMMs or our model. It’s difficult to find a “representative” example, but when going through some of the data, I was very surprised to see that the liquidity distribution on most token pairs were quite comparable to that of an AMM LP.
The two are easier to compare when looking at market depth. Normally, order books have a larger cumulative percent listed, especially within 200% of the spot price, which means lower slippage for buyers given comparable total liquidity.
Here’s a comparison with the BTC-USD. This pair has much deeper liquidity, which is probably why it’s much closer to our model than other examples. Here, at more reasonable list prices, within 2x of spot, there is between 2-5 times more liquidity compared to if it were supplied on an AMM.
If we zoom enough, notice that there is region, however small, where AMMs have more liquidity…directly around the spot price. This is one of the shortcomings of the order book, the spread, and this region can be relatively large in illiquid order books. Our model also was inaccurate as it did not include a finite bid-ask spread (a rather important feature given that the majority of volume occurs near the spot price). It’s the job of a market maker (MM) to supply sufficient liquidity near the spot price in order to entice trading activity. In fact, most MMs in TradFi have a maximum bid-ask spread that they must maintain by their contract.
Wrapping Up
“But didn’t you say that the liquidity distribution (and therefore market depth) on most pairs was comparable to an AMM?” This is true, but it’s a bit deceptive of me to draw both of these curves on the same plot. The order book curve is the total market depth that includes MMs, everyday traders, and people throwing up limit sell orders at 10x the price. The MM liquidity will be concentrated more closely to the spot price and they have options for redistributing it. This is a huge advantage to those looking to supply liquidity. The AMM curve is just the liquidity of LPs. They are forced to distribute their liquidity in this rather inefficient manner. Now, I would be remiss to not mention concentrated liquidity pools and stable swaps that do distribute liquidity much more efficiently. Even so, their impermanent loss is greater than the constant product model and their simplicity makes them inflexible to adapting to changing market conditions.