DeFi Intel

What is Order Book?

Plain-English explainer · Updated 2026-07-02 · By DeFi Intel

How it works

An order book is structured as two sides: the bid side (buy orders) and the ask side (sell orders). Each side lists orders by price, from highest to lowest for bids and lowest to highest for asks. The best bid (highest buy price) and best ask (lowest sell price) form the spread. Market participants can submit limit orders (specific price) or market orders (immediate execution at best available price). Orders are recorded in the book until filled or canceled. Centralized exchanges like Binance and Coinbase maintain these books on their servers, while decentralized platforms like dYdX use an off-chain order book with on-chain settlement.

Matching engines process trades by pairing opposing orders. For a market buy order, the engine fills it against the lowest ask prices until the order quantity is satisfied. Limit orders sit in the book until a matching order arrives. Priority is typically price-time: better prices execute first; if prices are equal, earlier orders execute first. This system provides transparent price discovery. However, on decentralized order books, the off-chain component may introduce trust assumptions or require a sequencer to prevent front-running. Protocols like dYdX v3 used a StarkEx-based ZK-rollup to settle trades efficiently while keeping the order book off-chain for speed; dYdX v4 later moved to a standalone Cosmos appchain whose validators run the order book off-chain.

Liquidity in an order book is visualized through depth charts, showing cumulative volume at each price level. Thin books have wide spreads and large price impact for trades, while thick books offer tight spreads and low slippage. Market makers provide continuous two-sided quotes to earn rebates or spreads. Historically, order books have powered flash crashes when cascading market sell orders overwhelm buy liquidity—e.g., the 2020 Bitcoin flash crash on Coinbase. Understanding order book mechanics is crucial for traders who rely on limit orders and wish to minimize execution costs.

Why it matters

Order books enable precise, transparent price discovery and allow traders to set limit orders, controlling execution price. They are foundational to centralized exchange liquidity and are increasingly adapted by decentralized platforms seeking faster, more familiar trading experiences. However, they can be vulnerable to front-running and MEV in decentralized settings. Understanding order books helps users navigate both CEX and DEX environments, manage slippage, and recognize liquidity risks during volatile markets.

Real-world examples

Centralized exchanges like Binance, Coinbase, and Kraken all operate order books for spot and derivatives trading. Decentralized exchanges such as dYdX use an off-chain order book with on-chain settlement, offering limit orders without trusting a centralized server. In 2020, a flash crash on Coinbase demonstrated how rapid sell orders can temporarily collapse an order book, highlighting the importance of liquidity depth.

FAQ

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

An order book matches buyers and sellers directly through a list of orders, while an automated market maker (AMM) uses liquidity pools and algorithms to set prices based on the pool’s asset ratio. Order books provide more price control via limit orders but require external liquidity providers.

How does an order book work on a decentralized exchange?

Decentralized exchanges like dYdX implement an off-chain order book where orders are collected and matched by a centralized server or a sequencer. Only the final settlement (trade execution) is broadcast on the blockchain, combining speed with on-chain finality.

What is order book depth?

Order book depth refers to the cumulative volume of buy and sell orders at different price levels. A deep book has large quantities close to the current price, resulting in tighter spreads and less slippage for large trades.

Related terms

Go deeper

Browse the complete crypto glossary to explore related terms and concepts.

Browse Glossary

Entities mentioned