Order Books vs AMMs Explained
An order book matches buy and sell orders at chosen prices; an AMM prices trades from a formula against a liquidity pool. Here is how each works, where each wins, and where each fails.
Dive Deeper with AI
Click → prompt copied → paste in AI chat
An order book matches individual buy and sell orders at prices people choose, so trades happen when a buyer and a seller agree. An automated market maker (AMM) skips the counterparty entirely and prices every trade from a formula against a shared pool of tokens. Order books power most centralized exchanges and some on-chain venues; AMMs power most DeFi decentralized exchanges (DEXs).
That is the short answer. The rest of this page explains how each model sets a price, why they behave differently on thin markets, and how to choose the right one for a given trade.
How an order book works
An order book is a live list of two sides. Bids are buy orders, ranked from highest price down. Asks are sell orders, ranked from lowest price up. The gap between the best bid and the best ask is the spread.
You interact with it two ways:
- A market order takes the best available price right now, filling against resting orders. It executes immediately but you accept whatever price the book offers.
- A limit order sets the price you are willing to pay or accept, and it waits in the book until someone matches it. You get price control but no guarantee of a fill.
When many participants post orders, the book gets deep — large size sits near the current price — and the spread stays tight. This is why liquid pairs on a busy exchange trade with pennies of spread. The weakness is structural: an order book needs active participants, usually professional market makers, to keep depth on both sides. On an illiquid book, the spread widens and a modest order can move the price sharply.
How an AMM works
An AMM replaces the counterparty with a liquidity pool and a pricing formula. The most common design is the constant-product model, used by Uniswap v2 and its many forks. A pool holds two tokens, and their quantities must satisfy x times y equals k, where k is held constant. When you buy token X, you add token Y and remove token X, so X becomes scarcer in the pool and its price rises along a curve.
This has a direct consequence: price impact. Every trade moves the price along the curve, and the larger your trade relative to the pool, the worse the price you get. The difference between the quoted price and your realized price is slippage. On a deep pool it is negligible; on a thin one, a mid-size swap can cost several percent.
The tokens in the pool come from liquidity providers (LPs), who deposit both assets and earn a share of trading fees. LPs need no counterparty and no active management — the formula quotes a price 24/7. That always-available liquidity is the AMM's core advantage, and it is why a brand-new token can trade the moment someone seeds a pool.
Concentrated liquidity: the hybrid
Classic AMMs spread liquidity across every possible price, most of which never trades, so capital sits idle. Concentrated liquidity, introduced by Uniswap v3, lets LPs place their capital within a chosen price range. Inside that range the pool behaves like a very deep book, cutting slippage dramatically for the same amount of capital. It is the closest AMMs get to order-book efficiency, at the cost of LPs having to manage ranges and re-balance as prices drift.
Order book vs AMM at a glance
| Order book | AMM | |
|---|---|---|
| Who provides liquidity | Traders and market makers posting orders | Liquidity providers depositing into a pool |
| Pricing | Set by matching bids and asks | Set by a formula (e.g. constant product) |
| Spread / slippage | Tight spreads when deep; wide when thin | Slippage scales with trade size vs pool depth |
| Availability | Only when orders exist on both sides | Always quotes a price, even for new tokens |
| Best for | Liquid large-cap pairs, precise entries | Long-tail tokens, permissionless listing |
Which one to use in practice
For liquid, large-cap pairs and for entries where the exact price matters, an order book usually wins. Deep books give tight spreads, and limit orders let you name your price instead of accepting a curve. Most high-volume trading still happens on order-book venues for this reason. See DEX vs CEX for how this maps onto exchange types.
For long-tail or newly launched tokens, AMMs win by default. Anyone can create a pool without permission, so assets that no market maker would quote still have a tradable price. The trade-off is that thin pools carry real slippage — always check the price impact estimate before confirming a swap.
In practice you often do not have to choose. DEX aggregators and smart order routers split a single trade across multiple order books and AMM pools at once, hunting for the best net price. For anything but the most liquid pairs, routing through an aggregator usually beats picking one venue by hand.
Honest limits of each
Order books are not free lunch. They depend on market makers and depth; without active participants, spreads widen and the "tight price" advantage evaporates. Fully on-chain order books also struggle with the cost of posting and cancelling many orders, which is why most on-chain trading migrated to AMMs.
AMMs have two structural costs. First, they need deep pools to keep slippage low, and bootstrapping that depth is hard for new tokens. Second, LPs are exposed to impermanent loss — when the pooled assets diverge in price, an LP can end up worse off than simply holding the two tokens. Understanding that risk is essential before providing liquidity; see liquidity pool basics.
FAQ
What is the difference between an order book and an AMM? An order book matches individual buy and sell orders at prices traders choose, so a trade needs a matching counterparty. An AMM prices trades from a formula against a pooled reserve of tokens, so there is no counterparty — you trade against the pool, and the price moves along a curve as you do.
Why do DEXs use AMMs? Because they run fully on-chain without a central operator. Maintaining a live order book on-chain is expensive and slow, while an AMM only needs a pool and a formula. It also lets anyone list a token permissionlessly, which fits DeFi's open-access design.
Which gives a better price? On deep, liquid markets an order book usually gives a tighter price. On thin or new markets an AMM may be the only place a token trades at all, but expect slippage. For most trades, an aggregator that routes across both gives the best net price.
What is concentrated liquidity? It is an AMM upgrade where liquidity providers concentrate their capital within a chosen price range instead of spreading it across all prices. Inside that range the pool acts much deeper, so slippage drops sharply for the same capital — a hybrid that borrows the efficiency of an order book.
Read also
DEX vs CEX: Trade-offs That Actually Matter
A CEX custodies your funds and matches trades on its own order book. A DEX is smart contracts you trade against from your own wallet. Here is the real trade-off — custody and permissionlessness versus liquidity, fiat, and support.
Slippage and MEV: Why Your Swap Costs More Than the Quote
Slippage is the gap between the price you saw and the price you got. Here is why it happens — pool depth, ordering, and MEV bots that sandwich your trade — and how to pay less of it.
Liquidity Pools Explained Without the Jargon
A liquidity pool is a smart contract holding two tokens that traders swap against. Here is how the pricing formula works, how liquidity providers actually earn, and where impermanent loss quietly eats the profit.