Clash of the Markets

CLOB vs AMM

I will often write about things in order to better understand them, or crystalize my views on a certain subject. Full disclosure, this article is an example of this.

The Automated Market Maker (sounds fancy)

It is common knowledge that Hayden Adams invented the Automated Market Maker (AMM for short), launching Uniswap on Ethereum mainnet in November 2018. It might have taken a while, but this was about to create a major shift in the way people interact with blockchains. Send, Receive, Lock, Mint, and now… Swap.

The way this new smart contract design works is seemingly simple. In fact, it can be summarized in just 3 letters:

x * y = k

x = liquidity of asset A

y = liquidity of asset B

k = constant

This formula provides an easy way to trustlessly determine an asset’s price. It lets users swap between tokenized assets right on the blockchain by using their crypto wallet. Also, in order to provide liquidity to this market, all you have to do is:

The AMM also laid the groundwork for the crypto yield farming craze, but we’ll save that for another article (subscribe!).

The Central Limit Order Book (not as fancy)

On the other hand, the Central Limit Order Book (or CLOB) has been around for longer. This is the battle-tested method that many equities and commodities exchanges use to determine a fair price.

The way CLOBs operate is pretty straightforward:

Image source: Wikipedia

So what?

These approaches are subtly different, and before you write this article off as pedantic let me offer this:

Which approach is better?

There are clearly some trade offs between these two methods. The AMM incentivizes ‘lazy liquidity’, where it is possible to just park your assets in a pool and farm fees. When incentivized with token emissions, this lazy liquidity can quickly turn into mercenary liquidity where capital simply flows to whoever is providing the most liquidity provider (LP) rewards that day. Another challenge with this design (which Uniswap has tried to improve with Uni v3), is the opportunity for arbitrage trades to leak value out of the system. This is commonly known as impermanent loss. And it is a feature, not a bug! The mechanism works through arbitrageurs nudging the price towards the market value. Unfortunately what is one arber’s gain is a liquidity provider’s loss, and so when the price of 2 pooled assets move away from each other, impermanent loss eats away at a LP’s gains.

The CLOB, while it does not provide instant settlement or passive fee farming in the same way, does have a proven history of getting people good prices at high volumes. Over time, this is a large incentive if not THE incentive that people trading tokens are looking for.

Solana — future of the CLOB?

For whatever reason, the CLOB has gained a better foothold in the Solana ecosystem than other blockchains. Alameda-backed Project Serum likely has played a role in this, offering a developer toolkit for spinning up and maintaining CLOB markets. As the hype-cycle for yield farming comes to the tail end of the curve, it will be quite interesting to see which type of market ends up attracting the most developers, new projects, and liquidity.