Centralized vs Decentralized Exchanges
A centralized exchange matches orders on its own books and holds your funds; a decentralized exchange trades against a smart-contract pool and never takes custody, and that one difference explains most of what separates them.
Prerequisites: Wallets, Keys and Custody
Buying bitcoin on Coinbase and swapping tokens on Uniswap both look like "trading crypto," but the two happen in almost entirely different ways underneath. One is a company matching buy and sell orders in a private database; the other is a smart contract, with no company running it, trading against a pool of tokens locked on-chain.
The core split is custody and matching. A centralized exchange (CEX) holds your funds and matches orders in an off-chain order book, like a traditional broker. A decentralized exchange (DEX) never takes custody, you trade directly from your own wallet against an on-chain pool, and the "matching" is a pricing formula, not a counterparty.
How each actually works
A CEX operates a traditional limit order book: you deposit funds into an account the exchange controls, place orders, and the exchange's matching engine pairs buyers and sellers, crediting your account balance, fast, familiar, and capital-efficient, but it means you're trusting the exchange's solvency and honesty with your funds the entire time they sit there.
A DEX built on an automated market maker (AMM) has no order book at all. Instead, liquidity providers deposit pairs of tokens into a pool, and a fixed formula (classically ) sets the exchange rate based on the pool's current balances, a trade shifts the pool's ratio and the price along with it, with no human or company on the other side of your trade.
Worked example
A trader wants to swap $50,000 of one token for another. On a CEX with a deep order book, the trade executes near the quoted price with maybe $25 of slippage. On a DEX pool with only $2 million total liquidity, the same $50,000 trade, 2.5% of the pool, pushes the price along the curve enough to cost roughly $400–600 in slippage, and also incurs an on-chain gas fee the CEX trade didn't. The CEX is cheaper for this specific trade; the DEX trade, in exchange, never required trusting anyone with custody of the $50,000 before or during the swap.
What this means in practice
Neither design dominates, DEXs eliminate custodial and counterparty risk but add smart-contract risk (a bug in the pool's code), gas costs, and slippage in thin pools; CEXs offer better pricing and speed for size but concentrate risk in the exchange's own solvency and security, the exact failure mode behind FTX's collapse. Most active traders use both: CEXs for large, liquid pairs and fast execution, DEXs for newly listed tokens, self-custody, or anything where trusting a centralized counterparty is the bigger risk.
"Decentralized" describes the trading mechanism, not necessarily the governance or the front-end you're using to access it, many DEXs have upgradeable contracts controlled by a small team, or a centralized website that can be taken down even if the underlying contract keeps running. Don't assume "DEX" automatically means no one can freeze or alter how the protocol behaves.
Discussion
💡 Discussion rules
- Ask and answer about this concept. Off-topic gets removed.
- No homework dumps. Show what you tried first.
- Corrections are welcome. Cite a source when you claim an error.
Loading discussion…
Related concepts
Practice questions
Further reading
- Antonopoulos & Wood, Mastering Ethereum (ch. on DEXs)
- Werner et al., ammMarket: A Survey of Automated Market Makers