CEX vs DEX: how centralized and decentralized crypto exchanges differ
A centralized exchange is a company that holds your funds and matches orders for you. A decentralized exchange is a set of smart contracts you trade against from your own wallet. Each removes some risks and adds others.

Photo: “Bank Vaults under Hotels in Toronto, Ontario” by UnTapping The World, CC BY 2.0, via Flickr (edited: cropped and resized).
A centralized exchange (CEX) is a company: you deposit funds, it holds them and matches orders in an order book. A decentralized exchange (DEX) runs on smart contracts: you trade from your own wallet, often against a liquidity pool [1]. CEXs add custody risk; DEXs add smart-contract and user-error risk.
Key points
- 1On a CEX you hand custody to the exchange; on a DEX you keep custody in your own wallet.
- 2CEXs usually match buyers and sellers in an order book; many DEXs price trades with a formula over a pool of two tokens.
- 3CEXs connect to bank money and usually require identity checks; DEXs only trade tokens and are open to any wallet.
- 4Neither is risk-free: exchanges have failed and halted withdrawals, and DEX users face scams, bad approvals and front-running.
- 5Regulators warn that crypto platforms often lack the protections people expect from banks and brokers.
On this page
- What is the basic difference between a CEX and a DEX?
- How do prices work on each type of exchange?
- What does a DEX swap involve, step by step?
- What are the risks of using a centralized exchange?
- What are the risks of using a decentralized exchange?
- How did CEXs and DEXs behave under stress?
- How are CEXs and DEXs regulated?
- What mistakes do beginners make here?
- Frequently asked questions
- The bottom line
- Sources
What is the basic difference between a CEX and a DEX?#
Both are places to swap one asset for another. A Federal Reserve note sums up the difference: “at a high level, DEXs seek to perform a similar function for users”, but they differ in several critical ways [1]. The most important difference for a beginner is custody — who controls the coins while you trade.
On a centralized exchange (CEX), ethereum.org explains, “you have to deposit your assets before the trade and trust them to look after them” [2]. On a decentralized exchange (DEX), a type of app that lets you swap tokens with peers on the network [3], the trade is executed by a smart contract and the tokens return straight to your wallet. Uniswap, a DEX protocol built on Ethereum, describes its protocol as designed for “self-custody” [4]. For the wallet side of this choice, read custodial vs self-custody.
| Question | Centralized exchange (CEX) | Decentralized exchange (DEX) |
|---|---|---|
| Who holds your funds? | The exchange, while they are deposited | You, in your own wallet |
| How are prices set? | Market makers and a limit order book | Often an automated market maker (a pricing formula over a pool) |
| Can you pay with bank money? | Yes — CEXs act as on- and off-ramps | No — DEXs trade tokens only, often against stablecoins |
| How do you get access? | Open an account, usually with identity checks | Connect a wallet; the contracts are permissionless |
| Who can freeze or reverse things? | The company, for example by halting withdrawals | Usually no one, including when you make a mistake |
| Biggest beginner risk | Exchange failure, hacks, withdrawal halts | Scams, malicious approvals, front-running, user error |
Generalised from the Federal Reserve note, ethereum.org and Uniswap documentation cited on this page. Individual platforms vary.
How do prices work on each type of exchange?#
A CEX keeps an order book: a list of bids and asks from traders and market makers, matched by the exchange’s engine. The Federal Reserve note says CEXs “operate using traditional market makers and limit order books”, while DEXs “use automated market makers” [1].
An automated market maker (AMM) replaces the order book with a pool of two tokens. Uniswap prices trades with the constant product formula x × y = k, where x and y are the pool’s reserves; the formula means “larger trades relative to pool depth move the price more” [4]. Each Uniswap v2 trade pays a 0.3% fee that goes to the pool’s liquidity providers [5]. Arbitrage traders keep the pool’s price close to the wider market, because they trade whenever the pool price is wrong by more than the fee [6].
| Step | Value |
|---|---|
| k = 100 × 200,000 | 20,000,000 |
| Swap 1,000 USDC: ETH received | 0.4960 ETH |
| Average price paid | 2,016.02 USDC (0.8% above 2,000) |
| Swap 10,000 USDC: ETH received | 4.7483 ETH |
| Average price paid | 2,106.02 USDC (5.3% above 2,000) |
| Pool price after that 10,000 USDC swap | 2,204.68 USDC per ETH (the fee stays in the pool) |
| Swap 50,000 USDC: average price paid | 2,506.02 USDC (25.3% above 2,000) |
Each trade: input after fee = amount × 0.997; new USDC reserve = 200,000 + input; new ETH reserve = k ÷ new USDC reserve; ETH out = 100 − new ETH reserve. The lesson matches the order-book case: the bigger your trade relative to the pool, the worse your average price.
What does a DEX swap involve, step by step?#
A token swap on a DEX
The approval step deserves care. Revoke.cash explains that token approvals give a smart contract permission to spend your tokens on your behalf, and that DEXs commonly need them [7]. Approving a malicious contract can let it drain that token later — see token approvals and wallet drainers.
What are the risks of using a centralized exchange?#
When an exchange holds your coins, its problems become your problems. Ethereum.org warns that if the exchange “has financial trouble, your funds would be at risk” [8], and that deposited assets are exposed because centralized exchanges “are attractive targets for hackers” [2]. The SEC’s investor alert adds that crypto platforms may combine exchange, broker and custody functions that regulated markets keep separate, which “creates conflicts of interest and risks for investors” [9].
- No deposit insurance. The SEC notes that bank-style FDIC insurance and SIPC broker protections do not cover accounts with crypto asset entities [9].
- Withdrawal halts and bankruptcy. Some crypto firms have suspended withdrawals or entered bankruptcy, and customers “might not be able to get those assets back when they want to” [9].
- Proof of reserves is limited. The SEC warns such reports may be only a snapshot and “may not provide any meaningful assurance” that customer balances are fully backed [9].
What are the risks of using a decentralized exchange?#
Keeping custody removes the exchange-failure risk but hands you every other job. Uniswap stresses that its core contracts are non-upgradeable and that no party can “pause them, reverse trade execution, or change protocol behavior retroactively” [4]. That also means nobody can reverse your mistake. Specific risks include:
- Fake tokens and pools. Anyone can create a pool for any token, so look-alike tokens can appear. Check the contract address from an official source.
- Front-running. On public blockchains, bots can see pending trades. Ethereum.org explains that “sandwich” attacks leave users facing “increased slippage and worse execution” [10].
- Thin pools. As the example above shows, a large swap in a small pool can cost several percent in price impact.
- Smart-contract and interface risk. A bug in a contract, or a fake website imitating a real DEX, can lose funds with no one to call.
How did CEXs and DEXs behave under stress?#
The Federal Reserve studied trading during the March 2023 stablecoin turmoil. It found that DEX volumes jumped to more than $20 billion on March 11, compared with typical volumes of $1 billion to $3 billion, while CEX volumes rose far less dramatically [1]. Its authors concluded that the two types of venue “operate differently during times of crisis, though they price stablecoins very similarly” [1]. In short: prices stayed closely aligned, but where people chose to trade shifted.
How are CEXs and DEXs regulated?#
Rules differ by country, and this is not legal advice. In the European Union, the MiCA regulation lists operating a trading platform, exchanging crypto-assets for funds and providing custody among the services a crypto-asset service provider performs [11]. It also states that where services are provided “in a fully decentralised manner without any intermediary”, they should not fall within its scope [11]. Whether a given DEX qualifies as fully decentralised is a legal question. In the US, the SEC’s 2023 investor alert warned that none of the major crypto asset entities is registered with it as a broker-dealer, exchange or investment adviser [9].
CEX vs DEX key facts
What mistakes do beginners make here?#
- Leaving everything on an exchange
Coins held by a CEX are a claim on that company. If it fails or halts withdrawals, you may wait a long time or recover little.
- Approving unlimited spending without thinking
A DEX approval can outlive the trade. Review and revoke approvals you no longer need.
- Ignoring price impact on small pools
The quoted price is for a tiny trade. Check the output amount and the price impact for your full size.
- Trusting a link to a “DEX”
Fake front-ends imitate real ones. Type the address yourself or use a bookmark you created.
Frequently asked questions#
Is a DEX safer than a CEX?
It is safer from one specific risk — the exchange losing or freezing your funds — and riskier in others, such as malicious approvals, fake tokens and irreversible mistakes. Which is safer for you depends on how well you can secure your own wallet.
Can I buy crypto with dollars on a DEX?
Not directly. The Federal Reserve note points out that users cannot buy or sell stablecoins for fiat currency on DEXs, which is why stablecoins serve as the dollar-like asset there [1].
Do I need an account to use a DEX?
No account, but you need a self-custody wallet and some of the network’s native token to pay transaction fees.
Why are DEX prices close to CEX prices?
Arbitrage. When a pool’s price drifts from the wider market by more than the fee, traders profit by trading it back into line [6].
Do DEXs offer derivatives too?
Some do. Ethereum.org notes that limit orders, perpetuals and margin trading are possible in decentralized trading [2]. The leverage risks are the same — see spot vs derivatives.
The bottom line#
A CEX asks you to trust a company with your coins in exchange for convenience, bank connections and an order book. A DEX lets you keep your coins but makes you responsible for every approval, address and click.
If you are just starting, learn how decentralized exchanges work and how order books price your trade before you move real money on either.
Sources#
Grade A = primary source (regulator, protocol specification, client code, original author). Grade B = expert secondary source used for explanation only.
- ABoard of Governors of the Federal Reserve System (FEDS Notes). Primary and Secondary Markets for Stablecoins, 2024.
- Aethereum.org. What is DeFi?, 2026.
- Aethereum.org. Ethereum Glossary: Decentralized exchange (DEX), 2026.
- AUniswap Developers. How Uniswap Works, 2026.
- AUniswap Developers. Pools, 2026.
- AUniswap. Uniswap v2 Core (whitepaper), 2020.
- BRevoke.cash. What Are Token Approvals?, 2026.
- Aethereum.org. Ethereum wallets, 2026.
- AInvestor.gov, U.S. Securities and Exchange Commission. Exercise Caution with Crypto Asset Securities: Investor Alert, 2023.
- Aethereum.org. Maximal extractable value (MEV), 2026.
- AOfficial Journal of the European Union. Regulation (EU) 2023/1114 on markets in crypto-assets (MiCA), 2023.
- AEuropean Supervisory Authorities (EBA, ESMA, EIOPA). EU financial regulators warn consumers on the risks of crypto-assets, 2022.


