CEX vs. DEX is the comparison between the two main ways of trading crypto-assets. A centralized exchange (CEX) is a company that takes deposits from clients, keeps a record of their balances on its own books and matches their orders on an internal system. A decentralized exchange (DEX) is a set of smart contracts on a blockchain that lets users trade directly from their own wallets, with every trade settled on-chain.
The two models solve the same problem, turning one asset into another at a fair price, but they place trust in different places. A CEX asks users to trust a firm, its controls and its regulators. A DEX asks them to trust code, the blockchain it runs on and their own handling of keys. Most active traders use both, and many projects first list on one and later on the other.
Custody and control of funds
The central difference is custody. On a CEX the exchange controls the private keys of the wallets that hold client assets, and a client’s balance is a claim on the exchange, much like a deposit at a broker. This is the arrangement described in custodial vs. non-custodial wallets. It is convenient, since lost passwords can be reset and trades are instant, but it creates counterparty risk: if the firm fails or misuses deposits, clients may lose access to their assets.
On a DEX the user keeps custody throughout. Assets leave a wallet only when the user signs a transaction, and the smart contract either completes the swap or reverts it. No company can freeze a balance held on a DEX, although the issuer of a token (for example a stablecoin issuer) may still be able to freeze that token at contract level.
How trades are matched
Most centralized exchanges run a central limit order book: buyers and sellers post bids and offers, and a matching engine pairs them in price and time priority. Because matching happens off-chain, it is fast and cheap, and only deposits and withdrawals touch the blockchain.
Many DEXs instead use automated market makers (AMMs). Traders swap against a liquidity pool funded by liquidity providers, and a formula sets the price from the pool’s balances. Others run an on-chain or hybrid decentralized order book. In each case the user pays network fees on top of the trading fee, and large orders move the pool price, producing slippage.
Access, fees and liquidity
The practical differences for users can be grouped as follows:
- Onboarding. A regulated CEX carries out know your customer (KYC) checks before allowing deposits or withdrawals. A DEX contract has no sign-up, although many front-end websites screen wallet addresses or block certain countries.
- Fiat access. A CEX can accept bank transfers and cards and pay out in national currency. A DEX trades only tokens already on its chain.
- Asset range. A DEX can list any token as soon as someone creates a pool, which widens choice but also exposes users to worthless or fraudulent tokens. A CEX lists assets after its own review.
- Liquidity. The largest centralized venues usually offer deeper books in major pairs, while DEX liquidity is spread across many pools and chains.
Risks and notable failures
Centralized exchanges concentrate assets, which has made them targets for theft and exposed clients to management failure. The collapse of Mt. Gox in 2014 and of FTX in November 2022 are the best-known cases; in FTX’s case client deposits had been used by its affiliated trading firm, Alameda Research. Such events led many exchanges to publish proof of reserves, which shows assets held but not always the full liabilities against them.
DEX risks are different. A bug in a contract can be exploited and drain a pool, an oracle can be manipulated, and users can lose value to maximal extractable value (MEV) strategies such as sandwich attacks. Liquidity providers face impermanent loss. There is usually no operator to complain to and no compensation scheme if funds are lost.
Regulation
A CEX that serves the public is normally treated as a financial business: a money transmitter or broker in the United States, a registered or licensed crypto-asset service provider in many other countries, and a crypto-asset service provider under the European Union’s MiCA regulation. It must run anti-money-laundering controls and apply the travel rule to transfers.
The position of DEXs is less settled. Regulators generally look past the label to whether a person or firm controls the protocol, its front end or its fees; where one does, that party may be treated as an intermediary. Arrangements that are fully decentralized fall outside many current regimes, a gap that standard setters such as the Financial Action Task Force have flagged.
Choosing between them
A CEX tends to suit users who need fiat on-ramps, account recovery, high-speed trading or a regulated counterparty. A DEX tends to suit users who want to keep custody, need tokens that centralized venues do not list, or want to interact with other DeFi protocols in one transaction. The trade-off is between institutional trust, with its legal protections and failure points, and self-reliance, with its freedom and its technical risks.
Ref 1070001118