Open app

NexFlow › Library › AMM vs order book, explained

AMM vs order book — the two machines that make a price

Every crypto price you see is produced by one of two mechanisms: a ladder of human orders, or a formula holding pooled reserves. How each one quotes, where each wins, and how to read the difference before you trade.

Market structure explainer · 9 min read · updated September 2026 · not financial advice

Open /markets/ and every row prints a price as if it were a fact. It isn't — it's the last answer one of two different machines produced. The first machine is the order book: a standing crowd of bids and asks, each one a specific human or bot saying "I will buy X at this price." A trade happens when a taker's order crosses a resting one. The second machine is the automated market maker: nobody posts an order at all. A smart contract holds two tokens in a pool, and a formula — classically x · y = k, the product of the two reserves stays constant — quotes a price to anyone who asks. Trade against the pool and the reserves shift, so the next quote is different. The book is a negotiation; the pool is a vending machine.

How the order book makes a price

A book is two sorted lists. Bids stack down from the best buying price; asks stack up from the best selling price. The gap between the best bid and best ask is the spread — the toll a trader pays for immediacy. On a liquid centralized venue the spread on a major pair is a basis point or two because dozens of professional market makers compete to tighten it; on a deserted pair the spread can be percent-wide because nobody's quoting.

The book's strength is information density. Depth charts show exactly how much you can sell before the price moves 1%, and maker competition means the quote you see was fought over. Its weakness is that it needs that crowd. Every price level exists because someone decided to rest capital there — a book with no makers is a spreadsheet of nothing. That's why books dominate mature venues and barely exist for long-tail tokens: professional makers don't bother quoting a coin that trades $40,000 a day.

How the AMM makes a price

The constant-product pool is the design that made DeFi trading work. Two reserves — say SOL and USDC — sit in a contract. The pool quotes so that reserve_x · reserve_y = k holds after every trade: buy SOL, you remove SOL and add USDC, so the next SOL costs more. Price is just the ratio of reserves; price impact is the curvature of the formula — the bigger your trade relative to the pool, the worse your average fill. Nobody decides anything per-trade; liquidity providers deposit the inventory once, earn a fee on every swap, and the formula does the rest, forever, with zero staff.

Real read, not theory: the SOL/USDC pool on Orca we measure held $30.95M in reserves at our stored snapshot and printed $110.5M of trailing-24h volume across 91,296 transactions — the pool turned over its entire depth more than three times in a day. That's an AMM doing exactly what it's built for: quoting continuously for a crowd of small trades without a single market maker on payroll.

Newer AMMs bend the formula rather than replace it. Concentrated liquidity (Uniswap V3-style) lets LPs pile their reserves into a narrow price band — book-like depth where the action is, nothing outside it. Stable-swap curves flatten the formula around a peg so dollar-priced tokens trade with almost no slippage. Both are still vending machines; they've just been tuned for a product.

Where each machine wins

Order bookAMM
Price at sizeTight — makers compete the spread downCurve penalizes big trades
Always-on liquidityOnly where makers botherAny pair, the moment reserves exist
New/long-tail tokensEffectively neverPermissionless — deploy and trade
Capital needed to listMaker relationships, minimumsTwo-sided deposit, any size
Runs on-chain cheaplyBook updates cost gas each tickOne formula, settles in a swap
Provider riskMakers withdraw in panicLPs eat impermanent loss

The pattern: books win where volume is already big; AMMs win where it isn't yet. The first ten years of DEX history are AMMs serving the long tail that books ignored — every memecoin, every governance token, every new launch trades in a pool first. Once a pair graduates to serious size, the order book (or book-like concentrated liquidity) takes the flow because it prices tighter. /pools/ and the venue leaderboard show the split on-chain: thousands of AMM pools, a handful of venues doing most of the measured volume.

What the mechanism means for your fill

On a book, your cost is the spread plus walking the ladder — a market sell eats down through bids until filled. On an AMM, there's no spread and no ladder; your cost is the curve: a $5,000 buy into a $30M-reserve pool costs you a few hundredths of a percent in impact, while the same buy into a $200K pool moves the price whole percents before the formula stops you. Same token, different machine, completely different execution — which is why aggregators exist. A router splits your order across pools and venues and picks the fill with the best net price; the mechanism underneath is invisible at that point, but knowing it tells you why a quote looks the way it does.

The costs you actually pay on a pool trade — price impact, slippage tolerance, the gap between them — get their own anatomy in price impact vs slippage. This page stays at the machine level.

Reading a pool in ten seconds: reserves tell you what the pool can absorb; volume tells you whether anyone uses it. Both print on the pool's page — our SOL/USDC Orca read is what a healthy pair looks like (deep reserves, volume a multiple of depth). A pool with big reserves and zero trailing volume is dead depth — the number looks reassuring and buys you nothing. The full directory is /pools/, filtered per chain at /pools/solana/ and siblings.

The honest limits of both

Neither machine invents liquidity. A book with thin depth and an AMM with thin reserves produce the same bad fill; a "high volume" token trading in a $50K pool will still hurt you at size. AMMs add their own traps: the formula quotes happily on tokens that can't be sold at all elsewhere (honeypots still pool normally), and the pool's price is only as good as its arbitrage link to the wider market — a pool nobody arbitrages drifts off fair value and becomes the scam itself. Books fail differently: maker pull-outs in a crash, spoofed depth that vanishes when you reach for it, venues painting fake orders. The defense is the same on both — check the depth you'd actually trade against, not the headline.

See the mechanism on a live pool

Pick a pair, check the reserves it trades against, then watch what the router quotes:

Frequently asked

What is the difference between an AMM and an order book?

An order book matches individual buy and sell orders placed by traders — the price is the last trade where a buyer and seller agreed. An automated market maker holds a pooled inventory of two tokens and quotes a price from a formula — trade against the pool and the formula re-prices automatically. The book needs counterparties; the pool just needs reserves.

Why do most DEX trades go through AMMs instead of order books?

Because an AMM works for any pair the moment someone deposits liquidity — no market maker required, no listing process, no minimum volume. A new token can be tradable in minutes. Order books need a continuous crowd of active makers to function, which long-tail tokens never attract. The AMM trades worse prices at size for permissionless, always-on liquidity.

Do AMMs or order books give better prices?

At size and on major pairs, an order book usually wins — competing makers compress the spread to fractions of a basis point, and large orders walk a ladder of quotes rather than paying a formula's full curve. On small trades or thin long-tail pairs, the AMM wins on availability — there is always a quote. Smart routers split the difference: they check AMM pools and book liquidity and route to whichever quotes better for that size.

What is impermanent loss?

The cost AMM liquidity providers pay for the convenience they sell. A pool rebalances automatically — it buys what everyone sells and sells what everyone buys — so when one token's price runs, the pool holds more of the loser. Compared to just holding the two tokens, the LP ends behind; fees may or may not cover the gap. It is "impermanent" only if the price returns — on a token that dumps and never recovers, it is simply a loss.

How do I check whether a pool is deep enough for my trade?

Compare your trade size to the pool's reserves, not its volume. A pool holding $30 million in reserves absorbs a $10,000 sell without blinking; a $300,000 pool feels it. The quoted price impact on any decent swap UI is exactly this number rendered as a percentage — read it before you click, and if it exceeds a percent or two on a major pair, the pool you are hitting is thinner than the token's reputation.

NexFlow is an educational risk tool, not financial advice. On-chain data can be incomplete or manipulated; a clean check is a dated snapshot, not a guarantee. Always do your own research. Free · no signup · a NexFlow product