CEX vs. DEX: what's the difference?
Centralized exchanges hold your funds and run an order book. Decentralized exchanges are smart contracts you trade against directly.
A centralized exchange is a company. Coinbase, Binance, Kraken, and OKX are businesses with employees, bank accounts, legal entities, and customer-support desks. A decentralized exchange is a piece of software. Uniswap, Curve, and dYdX are smart contracts deployed to a blockchain, running without an operator who can freeze your account. The difference matters for everything from user experience to risk profile to what happens when something goes wrong.
How each one works
A CEX runs an order book much like a traditional stock exchange. Users deposit crypto (or fiat) into accounts held by the exchange. Buyers and sellers post bids and asks. The exchange's matching engine pairs them off, updates internal balances, and settles trades instantly inside the exchange's own database. The blockchain is only touched when users deposit or withdraw.
A DEX lives on-chain. The two dominant designs are automated market makers and on-chain order books. AMMs (Uniswap, Curve, Balancer — see the AMM explainer) hold pools of tokens and let users swap against a mathematical curve. Order-book DEXs (dYdX, Aevo, Hyperliquid) mimic the CEX experience but enforce matching via smart contracts or specialized L1 infrastructure. In both cases, the user never hands custody to anyone; the trade is executed by contract logic and settles on-chain.
Custody
This is the biggest practical difference. On a CEX, you do not actually own crypto — you own a database entry saying the exchange owes you crypto. If the exchange is honest and solvent, that is equivalent. If it is not, you are an unsecured creditor in an unusually nasty bankruptcy. FTX's November 2022 collapse showed how this goes: user balances evaporated because the exchange had been lending them to a sister fund.
On a DEX, the user trades directly from their own wallet. The smart contract has no ongoing custody. Even if the front-end website disappears, users can interact with the contract directly through a block explorer. The money stays where the user put it, right up until the moment of the swap.
The tradeoff is that self-custody puts the entire operational burden on the user. No password reset, no fraud department, no helpful chat agent. See the wallet and seed-phrase explainers.
Fees, spreads, and execution
CEXs generally offer tighter spreads on major pairs. Professional market makers provide liquidity, and the matching engine is fast. For a single spot trade in BTC or ETH, you will usually get better execution on Binance or Coinbase than on Uniswap.
DEXs charge in two ways: an explicit protocol fee (often 0.01 to 0.3 percent for Uniswap v3) and implicit slippage as the trade moves the pool's price. For small trades on liquid pairs, slippage is trivial. For large trades, it is punishing — moving a million dollars of a thin-liquidity token can cost several percent.
Gas fees add to the DEX tab. On Ethereum mainnet, a swap can cost a few dollars; on a rollup, a few cents. CEX trades have no gas at all; the exchange absorbs the operational costs internally.
Privacy, access, and restrictions
CEXs are KYC operations. Opening an account requires government ID and, often, proof of address. They block users from sanctioned jurisdictions, freeze accounts they deem suspicious, and share data with tax authorities and law enforcement. That is the legal environment they operate in.
DEXs, as smart contracts, are indifferent to who interacts with them. Anyone with a wallet can swap. This makes DEXs useful for users in countries without good local exchanges, for privacy-conscious users, and for sanctioned entities — which is why DEX front-ends increasingly geo-block US users even though the contracts themselves are still accessible via alternative interfaces. The contracts cannot be stopped. The websites can.
What to use when
A reasonable heuristic: CEXs for fiat on-ramps, large spot trades in major assets, and users who want recourse. DEXs for long-tail tokens that never list on CEXs, for self-custodied trading, and for composability with the rest of DeFi.
Many serious traders use both. They funnel fiat in through Coinbase or Kraken, move to a self-custody wallet, trade on-chain against DEXs, and move back to the CEX to cash out. Each tool does the job it is best at.
Why it matters
The CEX-vs-DEX choice is really a choice about what kind of trust model you want. CEXs ask you to trust a regulated company. DEXs ask you to trust a smart contract and yourself. Neither is universally right. After FTX, the case for self-custody got louder. After the Curve and Euler exploits, the case for centralized insurance felt more real. Most users end up using both, holding the balance of convenience and control that matches their tolerance for each failure mode.
More explainers
What is Bitcoin?
The original cryptocurrency: a peer-to-peer cash system secured by proof-of-work and a capped supply of 21 million coins.
What is Ethereum?
A programmable blockchain that executes smart contracts and powers most of DeFi, NFTs, and the rollup ecosystem.
What is DeFi?
Decentralized finance rebuilds lending, trading, and stablecoins as open-source smart contracts — no bank, no paperwork, no intermediary.