How Exchanges Work
Understand how centralized and decentralized exchanges operate, including order books, AMMs, fees, and the tradeoffs between convenience and self-custody.
The basics
What Is a Crypto Exchange?
A cryptocurrency exchange is a platform where you can buy, sell, and trade digital assets. There are two main types: Centralized Exchanges (CEXs) like Coinbase, Kraken, and Binance operate similarly to traditional stock brokerages — a company holds your assets and matches buy/sell orders. Decentralized Exchanges (DEXs) like Uniswap and Jupiter run entirely on smart contracts with no central company involved — you trade directly from your own wallet.
CEX vs DEX: The Basic Difference
CEXs are easier for beginners: you create an account, deposit money, and buy crypto with a familiar interface. The exchange holds your crypto (custodial). DEXs give you full control of your assets at all times (non-custodial), but require a wallet and more technical knowledge. The famous phrase 'not your keys, not your crypto' refers to the risk of leaving assets on a CEX.
- CEX: Easy to use, fiat on-ramp, customer support, but you don't control your keys
- DEX: Full control of assets, no KYC required, but harder to use and no customer support
- Most beginners start with a CEX, then learn DEXs as they gain experience
Exchange Risk
When you leave crypto on an exchange, you trust that company with your assets. FTX collapsed in November 2022, and customers lost billions. Always consider moving significant holdings to a personal wallet.
Key Takeaways
- Centralized exchanges (CEXs) are beginner-friendly but custodial — they hold your crypto
- Decentralized exchanges (DEXs) give you full control but require more technical knowledge
- CEXs require KYC identity verification; most DEXs do not
- Start with a reputable CEX, learn DEXs as you advance
- Never leave more on an exchange than you can afford to lose
Going deeper
How Order Books and AMMs Work
CEXs use order books — a real-time list of buy orders (bids) and sell orders (asks) at different prices. When a bid matches an ask, a trade executes. The difference between the highest bid and lowest ask is the 'spread.' Market orders execute immediately at the best available price. Limit orders execute only when the price reaches your specified level.
Automated Market Makers (AMMs)
DEXs typically use AMMs instead of order books. AMMs use liquidity pools — smart contracts holding pairs of tokens funded by liquidity providers (LPs). The price is determined by a mathematical formula (usually x * y = k, the constant product formula). When you swap Token A for Token B, you add A to the pool and remove B, which changes the ratio and thus the price. This is why large trades cause more 'slippage' — price impact from changing the pool ratio.
Understanding Fees
- Maker fees: Paid when you add liquidity to the order book (limit orders that don't fill immediately) — typically 0.01-0.1%
- Taker fees: Paid when you remove liquidity (market orders, limit orders that fill immediately) — typically 0.05-0.2%
- DEX swap fees: Usually 0.3% per swap on Uniswap V2, variable on V3 (0.01-1%)
- Gas fees: On DEXs, you also pay blockchain transaction fees on top of swap fees
- Spread: The hidden cost of the bid-ask gap on CEXs, or slippage on DEXs
Reducing Fees
On CEXs, use limit orders instead of market orders to pay maker fees (lower). On DEXs, use aggregators like 1inch or CowSwap to find the best price across multiple pools. For large trades, consider splitting into smaller amounts to reduce price impact.
Key Takeaways
- CEX order books match buyers and sellers; DEX AMMs use mathematical formulas
- The constant product formula (x*y=k) determines DEX prices
- Slippage increases with trade size relative to pool liquidity
- Maker fees are lower than taker fees on CEXs
- DEX aggregators help find the best price across multiple pools
Under the hood
Advanced Exchange Mechanics
Concentrated liquidity, introduced by Uniswap V3, allows LPs to provide liquidity within specific price ranges rather than across the entire price curve. This dramatically increases capital efficiency — an LP providing liquidity in a narrow range earns fees as if they had deployed many times more capital across the full range. However, if the price moves outside their range, they stop earning fees and may suffer greater impermanent loss.
Intent-Based Trading and Solvers
The latest evolution in DEX design is intent-based trading, pioneered by CoW Protocol. Instead of executing a swap on-chain directly, users sign an 'intent' (I want to swap X for Y). Professional 'solvers' then compete to fill that intent at the best possible price, potentially matching peer-to-peer trades, routing through multiple pools, or using private liquidity. This eliminates MEV extraction (sandwich attacks) and often provides better execution than traditional AMMs.
Exchange Risks and Regulation
The FTX collapse in 2022 (losing $8+ billion in customer funds) demonstrated the danger of centralized exchange custody. Since then, regulatory frameworks like MiCA in Europe require proof of reserves and segregated customer funds. Many exchanges now publish regular Merkle tree proof-of-reserves attestations. On the DEX side, smart contract risk remains the primary concern — AMM pools can be exploited through flash loan attacks, oracle manipulation, or governance attacks on upgradeable contracts.
The Future of Trading
By 2026, the line between CEX and DEX is blurring. Hybrid exchanges combine CEX-like interfaces with DEX-like self-custody. Account abstraction enables DEX trading with CEX-like UX. And intent-based systems offer professional-grade execution without sacrificing decentralization.
Key Takeaways
- Concentrated liquidity (Uniswap V3) dramatically improves capital efficiency for LPs
- Intent-based trading (CoW Protocol) eliminates MEV and often provides better prices
- The FTX collapse led to proof-of-reserves requirements and stricter regulation
- Hybrid exchanges are merging the best of CEX convenience and DEX self-custody
- Always verify an exchange's regulatory status, proof of reserves, and security track record
Related Content
Related Coins
Related Topics
Key Terms
More Topics
Browse all 189 topicsDAOs & Governance
How decentralized autonomous organizations work — governance tokens, voting mechanisms, Snapshot, treasury management, delegation, and the risks of governance attacks.
Bridges & Cross-Chain
Understand how assets move between blockchains — bridge types, wrapped tokens, cross-chain messaging, major bridge exploits, and the emerging world of ZK bridges.
Blockchain Security & Attacks
Deep dive into blockchain-level security — 51% attacks, MEV exploitation, flash loan attacks, oracle manipulation, reentrancy, and how protocols defend against these threats.
Tokenomics
Understand the economics of crypto tokens — supply dynamics, token distribution, vesting schedules, burn mechanisms, inflation vs. deflation, and how to spot Ponzi-nomics red flags.
Reading Charts & Market Data
Learn to read candlestick charts, understand timeframes and volume, identify support and resistance levels, interpret moving averages, and explore on-chain metrics — while understanding that technical analysis is pattern recognition, not prediction.
Portfolio Management
Learn the principles of building and managing a crypto portfolio — diversification, risk tolerance, dollar-cost averaging, rebalancing, position sizing, and tax considerations. This is educational content, not financial advice.
How to Read a Whitepaper
Learn to evaluate cryptocurrency projects by critically reading their whitepapers — the foundational documents that outline a project's technology, tokenomics, and vision.
Crypto News & FUD Literacy
Develop the critical thinking skills to distinguish legitimate crypto news from manipulation, FUD, and hype — essential for making informed decisions.
References & further reading
- secondary
- secondary