Every exchange has to answer one question: what's the price right now? There are two fundamentally different ways to answer it, and knowing which a venue uses explains a lot about how it behaves.
The order book
An order book is a live list of buy orders (bids) and sell orders (asks); a trade happens when a buyer and seller meet at a price. This is how every traditional stock exchange and CEX works — and how some DEXes, especially perp venues like Hyperliquid and dYdX, operate too.
- Strengths: precise pricing, native limit orders, tight spreads in liquid markets.
- Trade-off: it needs active market makers and constant order updates, which is demanding to run fully on-chain.
The automated market maker (AMM)
Most spot DEXes — Uniswap, PancakeSwap, and the pools Jupiter routes through — skip matching entirely. You trade against a liquidity pool, and a formula sets the price from the ratio of tokens inside it. There's no counterparty to find; the pool is always ready.
- Strengths: always-on liquidity, anyone can become a market maker by adding to a pool, and it runs cleanly on-chain.
- Trade-off: large trades move the price (price impact), and providers face impermanent loss.
Side by side
| Order book | AMM | |
|---|---|---|
| Price set by | Matching bids & asks | A formula on pooled reserves |
| Liquidity from | Market makers | Anyone, via a pool |
| Best for | Perps, pro trading | Spot swaps, long-tail tokens |
| Example venues | Hyperliquid, dYdX | Uniswap, Jupiter, PancakeSwap |
Why AMMs won spot
The AMM's superpower is permissionless liquidity: a brand-new token can have a market the moment someone seeds a pool, with no market maker required. That's why almost every new token lists on an AMM first. The next lesson opens the AMM's hood to see exactly how that formula prices a trade.
- Expecting AMM pricing to behave like a CEX order book — large orders move an AMM more.
- Assuming all DEXes are AMMs; several leading perp venues are on-chain order books.
- Judging a venue only by type instead of by its actual liquidity in your pair.