Blog
All posts

DEX vs CEX: which gives you the better price?

On-chain exchanges now run order books like centralized ones. How to compare DEX and CEX prices, depth and quotes like for like, and what else to weigh.

4 min read

Price ↑BestCentralizedOn-chainQuote
One coin's price on centralized and on-chain exchanges, on the same scale, with an aggregator's quote beside them. The best price moves from one kind of exchange to the other; the quote is shown, not ranked. A drawing, not real prices.

A decentralized exchange, a DEX, used to mean swapping against a pool of tokens at a price that moved as you traded. Many now run order books of their own, with bids, asks, market makers and perpetuals that pay funding, settled on a blockchain rather than in a company's own systems. That makes DEX and CEX prices directly comparable. The site reads both kinds side by side, each from its own public market data, and compares them the same way.

Three kinds of exchange

  • Centralized exchanges (CEXs) such as Kraken, Coinbase and OKX run the order book themselves and hold their customers' money. You trade from an account.
  • On-chain order-book exchanges such as Hyperliquid and Lighter run a book much like a centralized exchange's, but trades settle on a blockchain and you trade from your own wallet. Most price and margin in a stablecoin, such as USDC or USDT.
  • Aggregators such as Jupiter, on Solana, and CoW Protocol, on Ethereum, keep no order book at all. They route a swap across their blockchain's exchanges and market makers, and quote a price for it when asked.

How to compare a DEX and a CEX like for like

Compare the same price. On the spot index, Buying compares each exchange's best ask and Selling its best bid, whether it's a DEX or a CEX. On a coin's page, every exchange's price is the middle of its order book. The same rule for every exchange keeps the ranking about the market, not the kind of exchange; which exchange is cheapest explains how to read it.

Compare in the same currency. A price in USDC isn't quite a price in dollars: stablecoins trade a little either side of $1. The site converts each to dollars at Kraken's live rate, so a gap between a DEX and a CEX is a real gap, not a stablecoin's wobble. Why prices differ shows how much that can matter.

Compare depth, not just the best price. A tight best price with little behind it can cost more for a big order than a slightly wider one with plenty. The Trade simulator on each coin's page walks every book you have on, on-chain or not, for your own amount; what depth means for a big order explains why that matters.

Treat quotes as quotes. An aggregator's price is made for the trade in hand, and can move by the time you swap. So the site shows aggregators beside the order books but never ranks them against them. On the index their cells say Quote, with the price on hover; on a coin's page they quote buying and selling a set amount. Their quotes already have their own fees taken off, and CoW Protocol's the network's costs too.

An example comparison

Made-up figures for one coin, and a $10,000 buy:

Exchange (example) Kind Best ask Average price for $10,000
A Centralized $100.01 $100.02
B Centralized $100.02 $100.03
C On-chain order book $100.00 $100.04
D Aggregator Quote $100.03

Example figures, not market data. C has the best price, A the best fill for this amount, and D's quote is shown but not ranked, as it holds only for the trade it was made for. For a $1,000 order C might come first; for $100,000 the order could be different again.

What else to weigh

Price is one part of the cost. The rest depends on how each kind of exchange works:

  • Fees. Every exchange charges its own trading fees, and they differ by tier. Switch fees on in the Trade simulator to count them at your own.
  • Getting money in and out. On a centralized exchange that means deposits and withdrawals. On-chain it means a wallet, funds on the right blockchain, network fees and, sometimes, a bridge.
  • Who holds your money. A centralized exchange holds it for you, so you rely on the company. On-chain you hold it yourself, and rely on the exchange's smart contracts and the blockchain beneath them.
  • Who can use it. Centralized exchanges ask you to prove who you are; on-chain exchanges ask for a wallet. Both kinds exclude some countries in their terms, even when their prices can be read from anywhere.
  • Who runs the market. On some on-chain exchanges, other teams run some of the markets, each with its own price feed and fees. The note on such a market, on its coin's page, says who.

Compare them yourself

Hyperliquid is one of the four exchanges the site starts with, so Bitcoin's page and its perpetuals already set it beside three centralized exchanges. Switch on others, on-chain and centralized, with the exchange switch at the top of any page or the exchange cards under each index. On perpetuals, compare funding as well as price: funding rates, side by side shows how, and the funding spread trade can pair an on-chain exchange with a centralized one.

Not financial advice. Prices move while you read them.

Share this post

Post on XShare on LinkedIn

More from the blog