Central limit order book (CLOB)
The model traditional finance uses. Traders post orders — “sell 10 ETH at $3,000” — into a book. The venue matches a new order against the best available order on the other side, and each match is a fill. Price comes from the book. If nobody is willing to sell below $3,000, that is the price. CLOBs need fast, cheap execution because market makers update quotes constantly. That makes them a natural fit for high-throughput chains and appchains — Hyperliquid, Lighter, dYdX — and for a handful of Solana venues. On a chain where every quote update costs a transaction fee, a book is impractical.Automated market maker (AMM)
The model native to blockchains. There is no book and no counterparty. Liquidity providers deposit both assets of a pair into a pool, and a formula sets the price from the pool’s balances. A trade is a swap against the pool. The classic formula is the constant product,x * y = k: buying token X from the pool depletes X and adds Y, which raises X’s price along a curve. Later designs — concentrated liquidity, stable-swap curves, weighted pools — change the curve’s shape but not the principle.
Price comes from the pool’s ratio, which means an AMM will always quote a price, for any size, without a counterparty needing to show up. That is why AMMs dominate long-tail assets: a token with no market makers can still trade.
Side by side
Hybrids are common. Request-for-quote and intent-based venues take an order from the user and have professional market makers compete to fill it offchain, settling onchain — so the trade looks like a single settlement transaction with no pool and no book. Aggregators split one user trade across many pools and venues, which is why Allium keeps aggregator trades in separate tables from pool-level swaps.
What this means for the data
AMM data is complete by construction. Every swap is an onchain event because it is a state change to the pool. If you index the pool, you have every trade. CLOB data is not, unless the venue publishes it. Orders that are placed and cancelled without filling may never touch chain state, and on some venues the book itself lives offchain. So order-level data depends on what the venue exposes, while fills are always recoverable. Volume is not comparable without care. An AMM aggregator routing one $1M trade through five pools produces five swaps. Counting all of them plus the aggregator’s own record double-counts the volume. Allium keepsdex.trades to pool-level swaps only and puts routed trades in dex.aggregator_trades for exactly this reason — see DEX Trades.
Price derivation differs. An AMM’s price is implied by each swap’s ratio, so it can be computed from trade data alone. A CLOB’s mid price requires the book. This shapes how Allium builds price data — see Oracles and Prices.
Where to look in Allium
Next steps
- Perpetuals — the derivatives layer built mostly on CLOBs
- MEV — why AMM swaps are vulnerable to ordering games