How DEXs differ from CEXs
| CEX | DEX | |
|---|---|---|
| Custody | Exchange holds your funds | You hold your funds in your wallet |
| Settlement | Internal ledger; withdrawal optional | On-chain every trade |
| Listing | Exchange chooses which assets to list | Anyone can create a pool |
| KYC | Required for most features | None at the protocol level |
| Speed | Sub-second order matching | Bound by block time (1-15s) |
| Fees | 5-30 bps taker | 5-100 bps swap + gas |
| Recourse | Customer support, insurance funds | Smart-contract code is the only rule |
The DEX advantage — self-custody, no listing gatekeepers, no KYC — comes with real costs: slower execution, higher fees for small trades, MEV exposure, and zero recourse if something breaks.
DEX architectures
- AMM — pricing via pool formula (Uniswap, Curve, PancakeSwap). The dominant pattern.
- On-chain order book — limit orders posted on-chain, matched by a relayer or smart contract (dYdX v3, Serum). More capital-efficient but harder to bootstrap liquidity.
- RFQ / intent-based — users sign a request; solvers or market makers compete to fill. UniswapX, CoW Swap, 1inch Fusion. Reduces MEV exposure.
- Perpetual DEXs — Hyperliquid, GMX, dYdX, Synthetix. Offer leveraged futures with on-chain settlement.
Risks and considerations
Self-custody shifts risk from exchange solvency to smart-contract correctness + your own opsec. Common failure patterns:
- Smart-contract exploits — SushiSwap’s MISO, Nomad Bridge, Multichain bridge, Curve Vyper bug. Hundreds of millions lost to pool-level exploits.
- Front-end compromise — attackers replace the DEX’s UI with a malicious version that signs drain-wallet transactions. Always verify the exact contract address.
- Fake tokens — anyone can create a pool named “USDC” for a token that isn’t USDC. Verify token contract addresses, not just ticker symbols, before every swap.
- Slippage and MEV — covered in the Slippage and MEV entries. The practical impact is real — 1-3% on unprotected trades.
Modern DEX aggregators (1inch, 0x, Paraswap, CoW Swap) abstract most of this. They route through the best pools, include MEV protection, and surface slippage clearly. For any trade above a few hundred dollars, use an aggregator rather than going directly to a single DEX.