Cover photo

Reviving the debate between order books and AMMs

There is a longstanding debate about pros and cons of Automated Market Makers (AMMs) vs. Central Limit Order Books (CLOBs). While CLOBs are everywhere in traditional finance and centralized crypto exchanges, AMMs are the dominant market organization in blockchains characterized by high transaction costs and low TPS. Therefore, it is not surprising that a growing number of lending projects have chosen an AMM as a base layer to liquidate loans (to name a few: InfinityPools, Frax’s BAMM, Instadapp’s Fluid, Curve’s LLAMA). AMMs are a promising pathway to replace off-chain and expensive liquidation bots by liquidity providers (LP). But they also come with their own drawbacks, like the risk of impermanent loss.

CLOBs, despite their transparency and flexibility rely on high volume to narrow the bid-ask spread, limit price slippage and provide continuous pricing. However, none of those limitations really matter for CLOBs used as lending pools and liquidation engine. The large bid-ask spread for instance becomes a feature, not a flaw.

In this context, could CLOBs make a resounding comeback as a better on-chain base layer for lending?

We believe so and this is why we are building LendBook, the first CLOB-based lending protocol (see post for an introduction). To explain the advantages of CLOB-based lending compared to AMM-based lending and maybe dissipate a few misconceptions about CLOBs, let’s answer a number of important questions.

1/ In AMMs, LP soft liquidate borrowers by continuously buying the collateral when its price is decreasing. What about CLOBs?

A similar mechanism exists in CLOBs: makers (those who place limit orders), by posting buy orders at the limit price of their choice, buy borrowers’ collateral when the price crosses the limit price. This unlocks unparalleled benefits for lenders and borrowers:

  • high loan-to-value (up to 98% for correlated assets)

  • high leverage (more than 20x)

  • low liquidation fees (starting at 1% for pegged assets and 4% for volatile asset pairs)

  • no risk of bad debt

  • no need for off-chain risk management

and other CLOB-specific advantages that AMMs cannot reproduce:

  • borrowing programmability (borrowers decide at which price their positions are liquidated if the price decrease, or closed for a profit if it increases)

  • lending programmability (lenders choose at which price they accept to buy the collateral and at which price they are willing to sell the collateral and repost the received assets on the lending side)

  • liquidation fees: earned by lenders (not bots)

  • leveraged limit orders (makers can leverage their bet that the price will bounce back starting from a chosen limit price).

2/ AMMs are peer-to-pool markets, contrary to CLOBs which are peer-to-peer. How a lending protocol built on a CLOBs can scale?

The CLOB on which LendBook is built is also peer-to-pool. This is a major innovation which avoids liquidity fragmentation. In practice, users deposit and borrow in a few pools of orders which limit prices are spaced so that two or three pools are active at the same time. For instance, limit prices for volatile pairs like ETH/USDC is spaced by a multiplicative step of 10%. For a market price of 2300 and a pool of buy orders at 2200, lending and borrowing are enabled at limit prices 2200, 2200/1.1 = 2000, 2000/1.1 = 1818 and so on.

3/ Liquidity providers (LP) make losses if the price diverge but their losses are transitory (impermanent) if it returns to its initial value. What about makers in CLOBs?

Makers also take the risk of losses, similar to what LP experience, when the price diverges (called inventory risk) but, contrary to LP, they profit when the price returns to its initial state. Let’s illustrate by an example. Price is 2300. Makers place a buy order at a limit price of 2000. If the price falls below this limit and bounces back to 2300, LPs wipe out their losses entirely while makers earn a positive return rate proportional to the price spread, which in the example is 2300/2000 – 1 = 15%. Makers in LendBook are the counter-party to much less transactions than LP in AMMs due to the spacing of authorized limit prices, but they earn an order of magnitude more every time they buy at low price and sell at a higher price.

4/ LPs expect to compensate IL by earning trading fees, what about makers in CLOB?

As shown in the previous illustration, makers are compensated for inventory risk by betting on price volatility, as do LP. They can automate their buy-the-bottom/sell-the-top strategy by reposting filled limit orders on the other side of the order book, similar to what market makers do in CLOBs. LendBook offers lenders and borrowers this possibility by automatically replacing filled orders at the limit price of their choice. Lenders compensate inventory risk by earning the price spread, akin to trade fees in AMMs, liquidation fees and a lending interest rate.

5/ In Uniswap V3-type AMMs as well as in most AMM-based lending, LPs can manage their risk by choosing a price range over which they offer liquidity. What about makers in CLOBs?

Makers benefit from the superior flexibility offered by order books. They not only choose the limit prices at which they are willing to exchange, but they also choose how much they accept to trade for every limit price at which they lend. They can withdraw their liquidity before the price crosses the limit price, unless the pool is fully utilized, in which case they earn a compensating interest rate close to 100%, similar to what Aave’s lenders earn in the same scenario.


This post is part of a series aimed at explaining the various aspects of the protocol. Make sure to follow our X account and join the Discord for updates!

If you want to learn more about LendBook, check out the white paper or the documentation!

post image