CEX vs DEX: What’s the Difference?
CEX vs DEX explained: centralized exchanges hold your keys and use order books; DEXs are non-custodial and use liquidity pools. Compare both.
The core difference between a CEX (centralized exchange) and a DEX (decentralized exchange) is custody and how trades are matched. A CEX is a company that holds your funds, manages the private keys, and matches trades on its own servers using an order book. A DEX is a set of smart contracts that never takes custody of your assets; you trade directly from your own wallet, and prices usually come from an automated market maker rather than a traditional order book.
This article compares the two models across custody, trading mechanics, access, and risk. It is educational and not financial advice, and it does not rank any specific platform.
Custody: who holds the keys
This is the defining distinction. On a CEX, when you deposit funds the exchange takes possession of your assets and controls the private keys. The crypto saying “not your keys, not your coins” applies: you hold an account balance, not the underlying keys. On a DEX, you keep control of your own wallet and connect it only to sign a transaction. The trade settles on-chain and the assets move between your wallet and the smart contract without a company holding them in between. This single difference cascades into almost every other distinction below, from how you recover access if something goes wrong to who is responsible when funds are lost.
How trades are matched
CEXs typically use a central limit order book, matching buyers and sellers off-chain through a fast matching engine. DEXs most commonly use an automated market maker, where you trade against a liquidity pool and the price is set by the ratio of tokens in that pool. Some DEXs also offer on-chain order books or request-for-quote systems, but AMMs are the most widespread.
| Feature | CEX | DEX |
|---|---|---|
| Custody | Custodial (exchange holds keys) | Non-custodial (you hold keys) |
| Matching | Order book, off-chain engine | Usually AMM / liquidity pools |
| Identity | KYC usually required | Usually no account or KYC |
| Fiat on-ramp | Commonly supported | Rarely direct |
| Settlement | Internal ledger, instant | On-chain, pays network fees |
Access and onboarding
CEXs are the usual gateway between traditional money and crypto because they support fiat deposits and withdrawals. They generally require KYC (Know Your Customer) identity verification to meet regulations. DEXs are permissionless: anyone with a compatible wallet can connect and trade, often including brand-new tokens before they reach any CEX. That openness is powerful but also means less screening of what is listed.
Fees and costs
Both models charge for trading, but the structure differs. CEXs usually apply a maker-taker fee schedule and may add withdrawal fees. On a DEX, you pay a pool trading fee plus the blockchain’s network fee (gas), and you may experience slippage on larger trades relative to pool depth. For a deeper look at exchange economics, see how crypto exchanges make money. Fee levels vary widely by platform, so always check current rates before trading.
The cost comparison is not straightforward. A CEX fee is usually a clean percentage, but small buys through a simple interface can hide a wide spread. A DEX fee looks predictable too, yet the network fee is fixed per transaction regardless of trade size, so tiny swaps can be disproportionately expensive while large swaps are dominated by slippage. There is no universal winner on cost; it depends on trade size, the asset, network conditions, and which interface you use. Comparing the all-in cost for your specific trade, rather than a headline fee, is the only reliable approach.
Security trade-offs
Neither model is strictly safer; they concentrate risk in different places.
- CEX risk: Because the exchange holds your funds, a hack, insolvency, or freeze at the company level can affect your balance. You trust the operator’s security and solvency.
- DEX risk: You control your keys, so there is no company to fail, but you bear smart-contract risk, the danger of interacting with malicious tokens, and full responsibility for your own key management. A lost seed phrase is unrecoverable.
A useful way to frame it: a CEX asks you to trust an institution, while a DEX asks you to trust code and yourself. Neither trust is free. Exchange failures have historically hurt users who left funds on a custodial platform, while DEX users have lost funds to buggy contracts, scam tokens, and their own mistakes such as approving a malicious contract. The right level of caution depends on which failure mode you are better equipped to guard against.
Which model fits which need
The two are often used together rather than as strict either-or choices. Many people use a CEX to convert fiat to crypto and for high-liquidity trading, then move assets to a self-custody wallet to use a DEX for tokens or DeFi activity not available on centralized platforms. The right choice depends on your priorities around custody, privacy, available assets, and convenience, not on any universal ranking.
Liquidity, speed, and settlement
Liquidity is where the two models feel most different in practice. A large CEX can hold very deep order books, so sizable trades fill with little price movement and prices update the instant supply or demand shifts. DEX liquidity lives in pools, and its depth depends on how much capital liquidity providers have supplied to a given pair. For heavily traded assets, DEX pools can be deep enough that the difference is minor; for smaller tokens, a DEX may be the only venue but with thinner liquidity and larger price impact on big trades. Because DEX prices come from pool ratios, they rely on arbitrageurs to keep them aligned with the wider market, whereas a CEX discovers price directly through its own order flow.
Settlement differs just as much. On a CEX, trades match off-chain almost instantly and settle on an internal ledger, so the experience feels like a fast trading app; withdrawals to your own wallet are separate on-chain transactions. On a DEX, every trade is an on-chain transaction that must be signed from your wallet and confirmed by the network, so you pay a network fee and wait for confirmation. During congestion, that fee rises and confirmation slows. The trade-off is directness: on a DEX there is no account to open, no deposit step, and no company holding your assets between trades. Many active users keep a foot in both worlds, using a CEX for speed and fiat access and a DEX for self-custody and access to newer assets.
| Situation | Often suits a CEX | Often suits a DEX |
|---|---|---|
| Converting cash to crypto | Yes | Rarely |
| Trading major assets with deep liquidity | Yes | Sometimes |
| Accessing brand-new or niche tokens | Sometimes | Yes |
| Keeping full self-custody | No | Yes |
| Using DeFi protocols directly | No | Yes |
Regulation and transparency
CEXs operate as regulated businesses in many jurisdictions and may hold licenses, follow reporting rules, and enforce regional restrictions. DEXs are software and generally do not perform identity checks, which shifts more compliance responsibility onto the user. Rules differ by country and continue to evolve, as covered in how crypto is regulated in the US. A practical consequence is that a CEX can freeze or restrict an account under legal or security circumstances, while a DEX cannot, because there is no account and no custodian, only your wallet interacting with a contract.
Frequently asked questions
What is the main difference between a CEX and a DEX?
Custody. A CEX holds your funds and keys and matches trades on its own servers, while a DEX lets you trade from your own wallet through smart contracts without giving up custody.
Are DEXs safer than CEXs?
Not automatically. DEXs remove company-level custody risk but add smart-contract risk and place full responsibility for key security on you. Each model concentrates risk differently.
Do DEXs require KYC?
Most do not, because they are permissionless smart contracts. Centralized exchanges usually require identity verification to comply with regulations.
Can I buy crypto with cash on a DEX?
Rarely directly. Fiat on-ramps are typically a CEX feature, so many people buy on a CEX first and then move assets to a wallet to use a DEX.
Why are DEX trades sometimes more expensive?
On a DEX you pay a pool fee plus the blockchain network fee, and larger trades can incur slippage based on pool depth. Costs depend on network congestion and liquidity.
Do CEXs and DEXs use the same pricing method?
Usually not. CEXs generally use order books, while most DEXs use automated market makers that price trades from the reserves in a liquidity pool.