Exchanges & market microstructure
Where trades actually happen: CEX vs DEX, the anatomy of an order book, and why size moves price.
CEX vs DEX
Centralized exchange (CEX)
- Matching
- Central limit order book
- Custody
- Exchange holds your assets
- Speed / cost
- Fast, cheap, deep books
- Key risk
- Counterparty (exchange failure)
- Access
- KYC account
Decentralized exchange (DEX)
- Matching
- AMM pool or on-chain book
- Custody
- You keep your keys
- Speed / cost
- Chain-dependent, gas fees
- Key risk
- Smart-contract exploits
- Access
- Any wallet, permissionless
The deep difference is custody. On a CEX you trade IOUs inside their database and trust them to honor withdrawals — FTX proved what that trust is worth when it breaks. On a DEX your assets never leave your wallet, but you inherit smart-contract and self-custody risk instead.
Serious traders use both: CEX books for size and derivatives, DEXes for long-tail assets and self-custodied capital. The Spot & On-Chain course covers the DEX/AMM machinery in depth; here you need the trade-offs.
What is the fundamental difference between trading on a CEX and a DEX?
Reading the order book
The order book is the market's true state: every resting bid and ask, stacked by price. The chart is history; the book is now. Three readings matter most.
Spread — the gap between best bid and best ask. Tight spread = healthy, competitive market. Depth — how much size rests near the top of the book; it determines what your order will cost to fill. Imbalance — a wall of bids under price with thin asks above suggests short-term upward pressure (and vice versa), though walls can be spoofed and pulled.
Tight spread, deep book
Liquid market. Your orders fill near the quote. Safe to trade size.
Wide spread, thin book
Illiquid. Every market order pays a tax. Use limits or stay out.
Huge bid wall
Support if real — but large walls are often spoofed to bait buyers, then pulled.
Book thins suddenly
Makers are pulling quotes — they expect volatility. Expect slippage to spike.
What does 'depth' in an order book determine?
Why shouldn't you take a huge bid wall at face value?
Slippage: why size moves price
A market order fills against the book level by level: the first chunk at the best ask, the next chunk higher, and so on. Your average fill price is therefore always worse than the quote you saw — that difference is slippage.
The painful property: impact grows roughly with the square root of order size in liquid markets, and much faster in thin ones. Doubling your size more than doubles nothing — but 10×-ing your size in a thin altcoin book can eat several percent instantly.
Why is your average fill on a market order always worse than the quoted price?