Crypto Fundamentals
CEX vs DEX: Which Exchange Keeps Your Keys?
Coins, exchanges, and wallets — the practical building blocks.
In this lesson
- The difference between centralized and decentralized exchanges
- Who holds your funds in each model
Key takeaways
- 1A CEX custodies your funds while you trade
- 2A DEX lets you trade from your own wallet
- 3Custody is the key trade-off: convenience vs control
Lesson summary
A CEX (centralized exchange) holds your funds; a DEX (decentralized exchange) lets you trade directly from your wallet — the difference determines who controls your keys when the trade settles.
Mental model
Getting CEX vs DEX straight
A CEX (centralized exchange) holds your funds; a DEX (decentralized exchange) lets you trade directly from your wallet — the difference determines who controls your keys when the trade settles.
- The difference between centralized and decentralized exchanges
- Who holds your funds in each model
Mechanics
How to reason about CEX vs DEX
A CEX runs accounts, order matching, custody, and withdrawals inside its own system.
A DEX lets users connect wallets and settle trades through smart contracts.
CEXs can feel faster and easier, while DEXs reduce exchange custody risk but add wallet and contract responsibility.
- A CEX custodies your funds while you trade
- A DEX lets you trade from your own wallet
- Custody is the key trade-off: convenience vs control
Example
A concrete CEX vs DEX example
If you trade BTC on a CEX, your account balance depends on the exchange honoring withdrawals. If you swap through a DEX, your wallet signs the transaction and settlement is on-chain.
Common mistakes
Common mistakes with CEX vs DEX
Users often choose by fees only. Custody, liquidity, support, slippage, and recovery options matter more than the headline fee.
Risk notes
What can go wrong with CEX vs DEX
CEX risk includes freezes and insolvency. DEX risk includes contract bugs, bad approvals, MEV, wrong networks, and irreversible signing mistakes.
- Say who custodies funds.
- Compare liquidity and slippage.
- Know what can go wrong after signing.
Practice
Put CEX vs DEX to work
- Say who custodies funds.
- Compare liquidity and slippage.
- Know what can go wrong after signing.
Review
Key terms
- Custody
- Who controls the private keys. Custodial = a third party holds them; non-custodial = you do.
- Liquidity
- How easily an asset can be bought or sold without moving its price much.
- Slippage
- The difference between expected and executed price, common in low-liquidity or fast markets.
- Wallet
- Software or hardware that stores the private keys controlling your on-chain assets.
- On-Chain
- Data or activity recorded directly on the blockchain.
Source notes
Editorial references
These references are starting points for verifying the mechanisms, risk checks, and product context behind this lesson.
Before you continue
Can you do these?
- Say who custodies funds.
- Compare liquidity and slippage.
- Know what can go wrong after signing.
Related learning
Keep reading
Checkpoint
Finish this lesson
Pass the check to save progress, then continue through the track in order.
Lock in this lesson
Answer every question correctly to complete the lesson.
On a centralized exchange (CEX), who custodies your funds while trading?

