
Understanding Decentralized Order Books: The Optimal Combination of Pricing Quality and Fund Security
TechFlow Selected TechFlow Selected

Understanding Decentralized Order Books: The Optimal Combination of Pricing Quality and Fund Security
For frequent traders, balancing the trade-off between execution quality and the risks of entrusting funds to centralized entities can be tricky.
Author: ELLA, KEONE
Translation: TechFlow
Since the peak of DeFi Summer, crypto traders have been trading on DEXs like Uniswap and CEXs like Binance. However, DEXs are primarily implemented as AMMs, while CEXs are mainly implemented as limit order books (LOBs). Traders often find that AMM pricing is simple and avoids entrusting assets to centralized intermediaries, whereas CEX LOBs offer better pricing due to more precise liquidity from active market makers.
Although there are other trade-offs between the two types of exchanges—such as liquidity mining on AMMs and richer information trading on LOBs—that may influence platform choice, pricing remains the most critical factor. Thus, the natural question arises: why don't we decentralize centralized exchanges? A decentralized LOB would be a clear game-changer, combining the non-custodial benefits of dapps with the superior pricing offered by full order books.
Let’s dive deeper.
Automated Market Makers: Crypto-Native Liquidity
AMMs are on-chain programs (smart contracts) that allow users to swap between asset pairs. They achieve this by maintaining paired liquidity pools that act as exchange facilities. Asset prices are typically determined by the well-known first-generation AMM formula x*y=k, pioneered by DEXs such as Uniswap v1/v2 (Constant Product Market Maker). There are other types of AMMs, including Constant Sum Market Makers, Constant Mean Market Makers, and (more generally) Constant Function Market Makers, but the concept of maintaining an invariant formula to fairly determine asset conversion rates remains consistent.
Here's a simplified example of how AMM pricing works in UniV2 (assuming no fees):

When providing liquidity on an AMM, users typically do so within a specified price range, which can be relatively narrow or span the entire range from 0 to infinity. Regardless of the choice, capital inefficiency is a persistent issue:
-
With a narrow range, more capital can be utilized when the price stays within the range, but the price only rarely remains within it;
-
With a wide range, capital is spread out, leaving most of it unused at any given time.
Because prices constantly fluctuate, capital on AMMs can only be fully utilized if liquidity providers use narrow ranges and frequently update them. However, frequent updates require high gas costs on Ethereum’s mainnet, so providers rarely adjust their ranges.
The result of this capital inefficiency is higher slippage for end users. The larger the trade relative to total liquidity, the greater the slippage—and this is further exacerbated by shallow pool depth. This can be seen visually in the typical x*y=k curve below: the larger the trade size, the farther we move horizontally along the curve, resulting in a flatter diagonal (worse price).

For larger trades, more experienced traders tend to choose CEXs.
(According to CoinMarketCap, as of August 3, 2023, Binance’s spot trading volume exceeded that of UniV3 (on Ethereum) by 18.5x.)
Lessons from Centralized Exchanges
Centralized exchanges are almost universally implemented as limit order books. A limit order book is a list of buy and sell orders sorted by price and time priority. Orders are matched based on price-time priority, meaning the lowest ask and highest bid are executed first, incentivizing market makers to compete for the best prices. This competition leads to lower slippage for end users.
Example of an order book for ETH/USDC spot on Deribit.

Bid-ask spreads on order books can be extremely tight because market makers continuously adjust their orders based on supply, demand, and new information. This means market makers send large volumes of new orders to exchanges throughout the day.
Binance and Coinbase remain the two largest crypto exchanges by spot trading volume, while Deribit is the preferred venue for most institutional crypto options trading.
On-Chain Limit Order Books

For frequent traders, balancing execution quality against the risk of entrusting funds to centralized entities can be challenging.
Decentralized LOBs have the potential to offer the best of both worlds: superior execution quality while retaining custody of user assets.
Currently, the primary challenge in implementing LOBs on-chain is the lack of environments with sufficiently low gas costs and high transaction throughput. LOBs require cheap and frequent transactions because market makers frequently adjust their quotes. New-generation high-throughput (>2k TPS) blockchains are gradually making fully on-chain LOBs more feasible. This has led to several notable examples of on-chain LOBs, including Econia (Aptos), DeepBook (Sui), and OpenBook/Serum (Solana).
A second barrier is scaling LOBs on the EVM. EVM-compatible LOBs would not only enable low-slippage decentralized trading but also unlock composability opportunities across the broader EVM ecosystem.
Ultimately, for DeFi to surpass CeFi, it must deliver a comparable or better user experience. For traders, execution quality is a key component of that experience. On-chain LOBs are a crucial piece in closing the execution gap between DeFi and CeFi.
Join TechFlow official community to stay tuned
Telegram:https://t.me/TechFlowDaily
X (Twitter):https://x.com/TechFlowPost
X (Twitter) EN:https://x.com/BlockFlow_News














