When a trader sees ETH at $4,000 on a CEX and almost the same number on a DEX, it is easy to assume the markets work alike. They do not. Behind the same quote are two different machines. In an order book, price emerges from opposing limit orders and a matching engine. In an AMM, price follows pool reserves and a mathematical function. The same mid-price can therefore hide radically different depth, slippage and large-order execution cost.
Price is not a point; it is a function of order size
A trading interface shows one last price, but execution always consumes available liquidity. When an order is tiny relative to market depth, the distinction is almost invisible. As order size grows, the order itself begins to change the effective price.
On a CEX, a market order consumes successive order-book levels. In an AMM, a swap changes pool reserves so every additional unit is priced along a changing curve. In both systems, the relevant variable is not just “price now,” but liquidity around that price.
Mid-price, last price and execution price are different
Mid-price is usually the midpoint between best bid and best ask. Last price is the most recent trade. Execution price is the actual average price of your specific order. In a calm liquid market they cluster together. During volatility they can diverge materially.
For actual trading results, execution price matters more than the ticker. PnL is determined by where a position really opened and closed, not by the number visible a millisecond before the order was sent.
Why identical spread does not guarantee identical execution quality
Two venues can show a one-basis-point spread while having very different depth. One may have millions of dollars resting near the top of book. Another may show a tight best bid and ask with almost nothing behind them. Small trades get similar UX; large trades get very different slippage.
A CEX order book is a queue of orders with priority rules
A centralized exchange stores bids and asks inside its trading system. A bid is a limit instruction to buy at a specified price or lower. An ask is an instruction to sell at a specified price or higher. The matching engine combines compatible orders according to venue rules.
Coinbase Exchange documents price-time priority: better prices have priority, and among orders at the same price, earlier orders are executed first. This is not a universal law for every exchange, but it is a standard limit-order-book model.
Best bid, best ask and spread
Best bid is the highest available buy price. Best ask is the lowest available sell price. Their difference is the spread. Active market makers usually compress the spread; when risk rises or liquidity providers step back, it widens.
- **Best bid:** the closest buyer to the market.
- **Best ask:** the closest seller.
- **Spread:** the immediate crossing cost before additional fees.
- **Depth:** the volume available at subsequent price levels.
A matching engine does not search the internet for the best price
It works with orders inside its own venue or connected liquidity system. BTC can therefore have slightly different books on two CEXs. Arbitrageurs connect markets economically, but each matching engine remains technically independent.

A market order pays for immediacy
A market order tells the venue to execute against currently available liquidity. It does not guarantee one fixed price. If top-of-book volume is insufficient, the engine walks deeper into the book.
Suppose you need to buy 10 BTC. Only 2 BTC are offered at $100,000, another 3 at $100,050 and 5 at $100,120. The average execution price will be above the best ask. The gap between expected and realized price is one practical form of slippage.
A limit order controls price but cannot guarantee execution
A limit buy at $100,000 should not execute above that boundary, but the market may move higher and leave the order resting unfilled. The trader exchanges certainty of execution for a price constraint.
Maker and taker describe how an order interacts with liquidity
A maker leaves liquidity in the book when its limit order does not immediately cross the opposite side. A taker removes existing liquidity. Exchange fee schedules often distinguish them because makers deepen the book while takers consume depth.
A depth curve is more useful than one quoted price
An order book can be summarized as cumulative depth: how many dollars can be bought or sold within 10, 25, 50 or 100 basis points of mid-price. For institutional-sized execution this matters far more than a venue's total 24-hour reported volume.
Daily turnover does not guarantee liquidity exactly where the trader needs it. A venue can report billions in volume and still have shallow depth in a particular pair at a particular moment.
Liquidity should be measured in the price range and at the moment where the order will actually execute. Daily volume is context, not an execution guarantee.
An AMM creates a market without a queue of limit orders
An Automated Market Maker replaces a traditional book with a function linking reserves of two assets. Uniswap v2's classic model uses x × y = k, where x and y are pair reserves and k is the constant-product invariant under the protocol's fee mechanics.
If a trader buys ETH from an ETH/USDC pool, the ETH reserve decreases while the USDC reserve increases. Their ratio changes, and so does marginal price. A large swap moves itself along the curve.
Constant product means every additional unit can be more expensive
Imagine a pool with 100 ETH and 400,000 USDC. The simplified reserve ratio points to $4,000 per ETH. But buying 20 ETH does not mean paying exactly $4,000 for each one. Preserving the invariant requires a changing reserve ratio, so average execution worsens as trade size grows.
x × y = k is not a fundamental-value formula
An AMM does not know news, cash flow or fair value. It knows reserves and contract rules. If the external ETH market moves from $4,000 to $4,200, arbitrage traders buy cheap ETH from the pool or sell expensive ETH into it until the onchain price again approaches external markets after fees.

Arbitrage links AMMs to external markets
An AMM price is not updated by an oracle every second. It changes through trades. When a centralized market moves, arbitrageurs have an economic reason to trade against the pool as long as the discrepancy exceeds fees and execution costs.
This creates a useful paradox: arbitrage extracts profit and simultaneously makes DEX pricing more accurate relative to the rest of the market. The trader buys the discrepancy and thereby reduces it.
One token does not have one global AMM price
The same asset can trade across multiple pools, DEXs and fee tiers. Aggregators optimize routes among them and may split an order. “The Uniswap price” can therefore be the result of routing rather than one pool.
A router optimizes paths; it does not create liquidity
A router may choose USDC → WETH → TOKEN instead of a direct USDC → TOKEN path when the indirect route produces more output. The router itself does not create depth—it directs orders toward existing liquidity.
Slippage and price impact should be separated
The terms are often used interchangeably, but separating causes is useful. Price impact is the change in expected execution price caused by your order size relative to liquidity. Slippage is broader: the difference between quote and actual execution due to impact, market movement, latency, competition and route changes.
| Concept | What it measures | Typical cause | Where it appears |
|---|---|---|---|
| Spread | Gap between best buy and sell | Market-maker risk premium | CEX/order book and RFQ |
| Price impact | How much your own order moves effective price | Insufficient depth/liquidity | CEX and DEX |
| Slippage | Quote versus actual execution | Impact + market move + latency | CEX and DEX |
| Swap fee | Explicit pool/protocol charge | LP/protocol compensation | AMM |
| Trading fee | Exchange fee | Maker/taker schedule | CEX |
Slippage tolerance is a limit, not a forecast
A DEX user often specifies maximum slippage tolerance. It does not promise the trade will be exactly 0.5% worse. It defines a boundary: if actual output falls below the minimum acceptable amount, the router transaction should revert.
A tolerance that is too tight raises failed-transaction risk during fast markets. A tolerance that is too wide leaves more room for unfavorable execution and certain MEV strategies.

Liquidity providers supply the AMM's inventory
A liquidity provider deposits the required asset combination into a pool and earns a share of fee economics. In a simple constant-product system, that capital is spread across the full allowable price curve.
The LP earns fees but assumes inventory risk. As relative prices move, the AMM automatically changes the composition of the position: less of the appreciating asset and more of the depreciating one.
Impermanent loss is opportunity cost relative to simply holding the assets
Impermanent loss compares the value of an LP position with a hypothetical wallet that simply held the same initial assets. As relative price moves away from the starting ratio, automatic AMM rebalancing can leave the LP worth less than the HODL alternative.
The word “impermanent” does not make the loss fictional. If liquidity is withdrawn after price has moved, the difference is realized. Trading fees may compensate for it, but they are not guaranteed to do so.

Concentrated liquidity changes how capital is deployed
Uniswap v3 lets LPs allocate capital inside selected price ranges rather than across the entire curve. When market price stays inside the chosen range, capital is used more intensively and can provide greater local depth per dollar of TVL.
That makes AMM liquidity provision look more like active market making. The LP chooses not only the pair and fee tier, but also the range. If price moves outside it, the position becomes mostly one asset and stops earning trading fees until price returns or the LP repositions.
TVL is not the same as active liquidity around spot
A pool can show a large TVL while much of its concentrated liquidity sits far from current price. Execution depends on active liquidity in the ticks the swap will cross.
Fee tiers are another market for risk
More volatile pairs may use higher fee tiers to compensate LPs for inventory and adverse-selection risk. Stable pairs can often support lower fees because their relative price normally stays closer.
CEX and DEX distribute custody risk differently
On a CEX, users typically deposit assets to addresses controlled by the operator, and the trading balance becomes an internal-ledger record. Fills inside the matching engine do not need an onchain transaction for every trade.
On a DEX, the user signs a transaction and smart contracts execute against a self-custody wallet. That reduces custody exposure to the exchange operator, but introduces smart-contract, approval, wallet-signing, chain-congestion and MEV risks.
Non-custodial does not mean trustless in every dimension
A DEX frontend can be centralized, contracts can have upgrade controls, token contracts can contain admin powers and bridges can add separate security models. Even an immutable AMM depends on its base chain and the assets deposited into it.
CEX does not mean the matching engine is inherently poor technology
A centralized engine can offer extremely low latency, advanced order types, deep liquidity and mature risk controls. The architectural trade-off lies elsewhere: users trust the operator's custody, internal ledger, withdrawal policy and infrastructure integrity.
Large-order execution can favor either CEX or DEX depending on the pair
For BTC/USDT, the largest CEXs often have much deeper books. For a long-tail token, liquidity may be concentrated in an onchain pool. Aggregators and professional execution systems compare venues rather than assuming one category always wins.
The route depends on:
- Available depth near the target price.
- Trading or swap fees.
- Expected price impact.
- Gas and bridge costs.
- Latency and settlement requirements.
- Counterparty, custody and smart-contract risk.
MEV makes DEX execution a separate discipline
A public pending transaction can reveal trading intent before block inclusion. Searchers can react, rearrange surrounding transactions or use arbitrage. Depending on architecture, this creates backruns, sandwich strategies and other MEV behavior.
CEXs also face fairness, latency advantage and queue-position issues, but the mechanism is different: order flow remains inside exchange infrastructure instead of appearing as a public mempool transaction before execution.
Private order flow changes the picture
DEX wallets and aggregators can route orders through private relays, solvers or intent-based systems. The comparison is no longer simply AMM versus order book; it becomes a comparison among execution auctions.
Why very high slippage tolerance can be dangerous
If a user allows a very wide deviation, the protocol has a larger acceptable output range. That does not mean someone will necessarily capture the entire allowance, but economically the order permits more unfavorable execution. Tolerance should match volatility, size and liquidity.
How to evaluate liquidity before trading
For a CEX, inspect cumulative book depth, spread and recent realized slippage. For a DEX, inspect active liquidity, route quotes at several trade sizes and predicted price impact. One data point is not enough.
A useful approach is a cost curve: how many basis points does execution lose at $10k, $100k, $1m and $10m notional? A venue that is excellent for $10k can be poor for $5m.
Liquidity is a function of size. Saying “this market is liquid” without naming trade size is almost meaningless.
Example: average execution matters more than the top quote
Suppose a CEX shows ETH best ask at $4,000 but only 5 ETH are available there. The next levels are $4,005 for 10 ETH, $4,020 for 25 ETH and $4,050 for 50 ETH. Buying 50 ETH produces a volume-weighted average meaningfully above $4,000.
An AMM can show the same nominal spot price while producing a different average output based on reserves. The useful comparison is total cost for the same notional after fees, impact and settlement costs—not the single number at the top of the screen.
VWAP of an execution
The average price across multiple fills is the sum of price × quantity divided by total quantity. It captures the real economic price of an order.
Effective spread
Professional execution analysis often compares trade price with a reference mid-price around the time of execution. This helps distinguish explicit fees from the hidden cost of crossing the market and moving liquidity.
When an order book tends to win
Order books are especially effective where many active market makers compete, exact price control matters and complex order types are useful. Limit orders express price directly. For very liquid pairs, this can create deep local liquidity.
But a book requires continuous quoting. When market makers withdraw, depth can disappear far faster than the interface changes the user's perception of a “large exchange.”
When an AMM tends to win
An AMM can create a market without requiring a permanent manual queue of makers. Any eligible LP can contribute liquidity under protocol rules, while smart contracts produce deterministic quotes from available reserves.
This is especially useful for permissionless listings and composability. Another smart contract can call the pool directly without opening an account with a centralized operator. The cost of that openness is gas, smart-contract risk, onchain latency and MEV sensitivity.
The main conclusion
DEX and CEX cannot be compared honestly with a one-line table of “security, speed and fees.” They form execution prices differently. A CEX order book combines limit orders and a matching engine. An AMM replaces the book with reserves and a pricing curve. Concentrated liquidity makes capital more efficient while demanding more active range management.
For traders, both systems can be analyzed with the same execution language: spread, depth, fees, impact, slippage, latency and settlement risk. Once those are measured for the actual order size, the marketing boundary between DEX and CEX becomes less important and the real cost of execution becomes much clearer.
FAQ
Are slippage and price impact the same thing?
No. Price impact is the part caused by your order size relative to available liquidity. Slippage also includes market movement, latency and route changes between quote and execution.
Why did my CEX market order fill above the best ask?
The best ask shows only the nearest price level. If it lacks enough volume, the matching engine consumes higher asks, raising the average buy price.
Does an AMM know the market's fair price?
No. Price follows reserves and trades. Arbitrageurs link the pool to external markets by trading discrepancies.
What does x × y = k mean?
In a classic constant-product AMM, the product of the two reserves follows the contract's invariant under its fee mechanics. A swap moves the pool along that curve.
Why can an LP underperform simply holding the tokens?
The AMM automatically rebalances inventory as relative price changes. When price moves far from the starting ratio, the LP position can be worth less than a passive HODL portfolio of the same initial assets. Fees may offset that gap but do not guarantee it.
Does TVL tell me how well my swap will execute?
Not by itself. In concentrated-liquidity AMMs, active liquidity near the current range matters. Likewise on a CEX, total volume does not replace local order-book depth.
This material is educational and informational. It is not financial advice or a trading signal.
