CEX vs DEX: Order Books, Liquidity Pools and Where the Cost Goes
The usual comparison is about trust: a company versus a contract. That is real, but it is not the whole difference. A centralised exchange and an automated market maker are two different market structures, and each produces a different cost profile, a different failure mode and a different kind of price. Comparing them as two versions of the same shop is what makes the choice confusing.

Cover artwork: CoinSoso · AI-generated, not a photograph of a real venue, product or market capture.
Key takeaways
- A CEX matches your order against other users' orders in a central limit order book.
- A DEX such as Uniswap prices a swap against a liquidity pool using a formula, not against a queue of orders.
- On a CEX the fee goes to the venue; on a DEX the swap fee goes to liquidity providers, and gas goes to the network.
- Price impact on a DEX grows with trade size relative to pool depth; slippage on a CEX grows with size relative to book depth.
- Custody follows the structure: the CEX holds the balance, while a DEX swap is signed from a wallet you control.
Two ways to find a price
A centralised exchange runs a central limit order book. Buyers post bids, sellers post asks, and a matching engine pairs them. Your order is one entry among many, and the price you get depends on what is resting on the other side at that moment.
Uniswap, the reference decentralised exchange, works differently. Its documentation describes it as “an automated market maker (AMM) or a set of smart contracts that let anyone swap tokens, provide liquidity, or create new markets directly onchain.” There is no queue of orders. There is a pool of two tokens, and a formula that sets the price as the pool’s reserves change.
That single difference - matching versus pricing - propagates into fees, execution, custody and failure modes.
The order book: price depends on what is resting
On a CEX, a market order consumes the best available level, then the next, until it is filled. The average price is a weighted result of the levels it consumed. If the order is small relative to the book, the average is close to the best quote. If it is large, it walks deeper and pays more.
Two costs attach to that:
- The fee, charged by the venue on notional, usually at a maker or taker rate.
- The spread, which is the gap between the best bid and the best ask and is paid implicitly when an order crosses.
The book is also a source of information a pool does not provide: you can see the depth, estimate the average fill before sending, and place a limit order that rests rather than executes. The maker and taker guide covers how the fee column is decided, and the spread and slippage guide shows how to read depth.
The pool: price depends on the size of the trade
Uniswap’s documentation describes each pool as reserves of two ERC-20 tokens, priced by a constant product formula: x × y = k. A swap changes the reserves, so it changes the price. A small trade moves the ratio slightly; a large trade moves it a lot. Uniswap calls this price impact and states that it is “an inextricable part of AMM design.”
The practical consequence is that the price is not a quote you can compare line by line with an order book. It is a function of your size. The same pool offers a different average price for a 1,000-dollar swap and a 100,000-dollar swap, and the interface estimates the impact before you confirm.
Fees are structured differently too. Uniswap’s fee documentation states that v2 pools charge a flat 0.30%, v3 uses standard tiers of 0.05%, 0.30% and 1.00%, and v4 lets a pool creator set any fee from 0% to 100% in increments of 0.0001%. The swap fee accrues to the liquidity providers whose capital is in the pool. Gas is separate and is paid to the network, not to the protocol.
Where the cost appears
The two structures produce different receipts:
| Cost | CEX | DEX (Uniswap-style) |
|---|---|---|
| Venue or pool fee | Maker or taker rate on notional | Swap fee: 0.30% on v2, tiers on v3, configurable on v4 |
| Spread or price impact | Spread crossed against resting orders | Price impact from moving the pool’s reserves |
| Network cost | Withdrawal fee when moving funds out | Gas on every swap and approval |
| Other | Funding on perpetuals, if used | Approval transaction, and MEV risk on public networks |
| Recipient | The venue | Liquidity providers, plus validators for gas |
Neither column is a total. A DEX swap of a small amount on a deep pool can cost less than a CEX round trip, because the pool fee may be lower than two taker fees. A large swap on a thin pool can cost far more, because price impact is not a fee and does not appear in the fee tier. The only fair comparison is the output amount for the same input size at the same time.
Custody, recovery and the meaning of an account
A CEX holds the asset. Your balance is a claim on the venue, recoverable through an account process, and subject to the venue’s terms and jurisdiction. That is what makes password resets and support possible, and it is also what makes the venue’s solvency and withdrawal policy relevant.
A DEX swap is signed from a wallet you control. Uniswap’s documentation describes the protocol as designed for self-custody, and the swap moves tokens from your address through the pool in one transaction. There is no account to recover. If the key is lost, the funds are lost; if a swap is signed with the wrong parameters, no one can reverse it.
The recovery paths do not cross. The OKX Wallet versus exchange guide sets out the same distinction from the product side: the exchange account is custodial, and the wallet is not a backup for it.
What each structure is good at
A CEX is the better fit when you need:
- a fiat on-ramp or off-ramp;
- limit, stop and other order types, and the ability to cancel;
- a visible book to estimate execution before sending;
- leverage or a short exposure;
- an account-based recovery path and a support channel.
A DEX is the better fit when you need:
- a swap without an account at a venue;
- direct custody and a permissionless market;
- access to a token that no centralised venue lists;
- composability with other on-chain applications.
Neither removes the risks that belong to the other. A CEX account carries counterparty risk. A DEX swap carries contract, approval, gas and irreversible-error risk. Uniswap’s documentation is explicit that anyone can create a market, which means the existence of a pool says nothing about the quality of the token in it.
A comparison that survives contact with a trade
Before choosing a route for a specific trade, write down:
- The size, in the token you are spending.
- The output amount each route offers at that size, at the same moment.
- The costs that are not in the output: gas, withdrawal fee, funding.
- The time to settlement and the ability to cancel.
- What happens if the trade is wrong, and who can reverse it.
The route with the larger output after all costs is the cheaper one. The route whose failure you can survive is the safer one. Those are two different questions, and a good decision answers both.
The trading fee calculator covers the CEX side of the arithmetic; for a DEX swap, the interface’s price-impact estimate is the equivalent input. Neither number is a recommendation.
Risk note. This article explains market structure, not investment advice. Uniswap’s documentation is the source for statements about its protocol; fees, tiers and governance-controlled settings can change. Centralised venues set their own fees, access rules and withdrawal policies. Trading either route can result in loss, and a self-custody swap cannot be reversed.
Sources
How this was researched. Written from primary documentation and the exchange or protocol's own published material, with sources listed at the end of the article.
Primary sources for the factual claims on this page. A date appears only where a human has actually read the source; where it is missing, the check is still outstanding.
- Uniswap - How Uniswap Works, read 2026-10-17(read 2026-10-17)
- Uniswap - Understanding Swaps on Uniswap, read 2026-10-17(read 2026-10-17)
- Uniswap - Fees, read 2026-10-17(read 2026-10-17)
Frequently asked questions
Is a DEX always cheaper than a CEX?
No. A DEX swap pays a pool fee plus gas plus price impact; a CEX trade pays a maker or taker fee plus the spread it crosses. On a deep pool and a small trade, the DEX can be cheaper; on a large trade in a thin pool, price impact can dwarf every fee. Compare the output amount for the same size at the same moment.
Who holds my assets on a DEX?
You do, through the wallet that signs the swap. Uniswap describes the protocol as designed for self-custody, and a swap moves tokens from your address to the pool and back in one transaction. There is no account balance at the protocol level. The trade-off is that no one can reverse a mistaken swap.
Why does a large DEX trade get a worse price?
Uniswap pools price swaps with a constant product formula, x × y = k. A large trade changes the reserve ratio as it executes, so the average price is worse than the price before the trade. Uniswap's own documentation calls this price impact and notes that it grows with trade size relative to pool depth.
What fees does Uniswap charge?
Uniswap's fee documentation states that v2 pools charge a flat 0.30%, v3 uses standard tiers of 0.05%, 0.30% and 1.00%, and v4 lets pool creators set a fee from 0% to 100% in very small increments. The swap fee accrues to liquidity providers rather than to a company. Protocol fees are separate and apply where governance has enabled them.
Can I use a CEX without identity verification?
Access rules depend on the venue and the jurisdiction. A CEX is a regulated business in many markets and applies its own onboarding requirements. A DEX swap is permissionless at the protocol level, but the interface, the wallet and the assets you buy can each have their own restrictions and risks.
Where to go next
Independent research. Each card shows the platform’s invite code, and its Create Account button is a referral link that may earn us a commission at no extra cost to you. Whether an account can be opened is decided by the platform at sign-up.
Binance

One of the largest global exchanges by traded volume, with a very broad product range.
20% Trading Fee Rebate
Use invite code con888 when signing up to enjoy trading fee benefits.
Download from the exchange's official download service. Verify the source and follow the on-screen installation instructions.
Do not install an APK from an unknown source, or one that has been modified or cannot be checked.
OKX

A large global exchange offering spot, derivatives and a self-custody wallet.
20% Trading Fee Rebate
Enter invite code con888 when signing up to check available trading fee benefits.
Download from the exchange's official download service. Verify the source and follow the on-screen installation instructions.
Do not install an APK from an unknown source, or one that has been modified or cannot be checked.