An order book matches buy and sell orders at specified prices: buyers post bids (the maximum they will pay) and sellers post asks (the minimum they will accept). Trades execute when a bid and ask overlap. An automated market maker (AMM) uses a mathematical formula to determine price and allows trades at any time without a counterparty, using a liquidity pool instead. Most centralized exchanges use order books; most decentralized exchanges use AMMs. Each model has distinct advantages depending on asset type, trade size, and market conditions.

How order books and AMMs differ mechanically

Order books are efficient for liquid, actively traded markets. Market makers post tight bid-ask spreads and the book depth means large orders can be executed with minimal price impact. BTC/USDT on Binance might have $500,000 to $2 million sitting within 0.1% of the mid-price. Executing a $50,000 BTC buy moves the price minimally. Limit orders give you price certainty; market orders give you execution certainty.

AMMs (Uniswap, Curve, Balancer) price assets through formulas. Uniswap v2 uses the constant product formula: x*y=k, where x and y are token amounts. Any trade changes the ratio and moves the price accordingly. AMMs function for any token pair that someone bootstraps with initial liquidity, with no need for market makers. The trade-off is price impact: large trades relative to pool size move the price more than an order book with the same total liquidity. Curve’s StableSwap formula is optimized for similarly priced assets (stablecoin pairs), reducing slippage dramatically for those specific use cases.

What this means for traders

For major trading pairs (BTC, ETH, SOL) in large sizes, centralized exchange order books almost always give better fill prices than AMMs due to the depth of professional market making. For new ERC-20 tokens that have not been listed on CEXes, an AMM pool is often the only available venue. For stablecoin-to-stablecoin swaps, Curve’s AMM often outperforms even DEX aggregators due to the optimized formula.

Hybrid models are emerging. dYdX v4 and Hyperliquid use on-chain order books with off-chain matching engines, combining DEX transparency with order book efficiency. CoW Swap batches multiple orders together and finds coincidences of wants before routing to AMMs, which can outperform standard AMM routing for specific order combinations. For the AMM mechanics underlying slippage calculations, see AMM explained and slippage explained.

A concrete example

You want to sell 100 ETH (approximately $300,000 at $3,000). On Binance (order book): the order book has 500 ETH sitting within 0.1% of spot. Your 100 ETH market order fills across multiple price levels with roughly 0.05% total slippage, costing $150. On Uniswap v3 (AMM): a 100 ETH sell on a pool with $5 million in ETH liquidity causes roughly 1.5% price impact, a $4,500 loss versus the quoted price. An aggregator (1inch) routes across 8 pools and reduces impact to 0.8%, still $2,400 worse than the CEX order book. For large ETH trades, the order book is clearly superior. For a $500 swap of a new token with no CEX listing but a $200,000 AMM pool: the AMM is the only option, and 0.5% price impact is simply the cost of access.

Frequently asked questions

Why do AMMs lose money to impermanent loss while order books do not?
Liquidity providers in AMMs passively hold both assets in a fixed ratio formula. When prices move, the formula forces them to hold more of the asset that fell and less of the asset that rose, relative to just holding both assets separately. This is impermanent loss. Order book market makers actively manage their inventory and can adjust bids and asks in response to price movements, so they face directional inventory risk rather than the passive formula-imposed loss of AMMs. See: impermanent loss explained for the full mechanics.

What is the bid-ask spread and why does it matter?
The bid-ask spread is the gap between the highest price a buyer will pay and the lowest price a seller will accept. On a liquid BTC/USDT market, this spread is $1 to $5 on an $90,000 price: a 0.001% to 0.006% cost to any market order. On an AMM, the equivalent cost is the swap fee (0.3% on Uniswap v2) plus price impact. For small trades on liquid assets, AMM fees are structurally higher than order book spreads. For illiquid tokens, AMMs may still be the only viable option.

Are DEX order books as transparent as CEX order books?
On-chain DEX order books (dYdX v4, Hyperliquid) are fully transparent: all orders and trades are publicly visible on-chain. CEX order books are visible on the exchange’s interface but the exchange itself could theoretically use private order flow information. In practice, established CEXes operate under regulatory oversight that constrains front-running of customer orders; on-chain order books remove the trust assumption entirely by making all activity cryptographically verifiable.