Affiliated company Matrixed.Link: official Chainlink node operator running 500+ live price feeds
Market Structure

CEX vs DEX Pricing: Where Each Method Breaks

An exchange price is a trade on one venue's book; a DEX price is a pool read at a block. See where each breaks and why teams can read both.

7 min read

A price from a centralized exchange (CEX) is a trade printed by one venue’s matching engine. A price from a decentralized exchange (DEX) is arithmetic on a pool’s reserves at a given block. Each is dependable where its own market is active and breaks where that market is absent: an exchange has no price for an asset it does not list. A pool prices whatever trades have moved it, whatever liquidity stands behind the number.

For a risk, treasury or protocol team that matters more than fees or custody. If you consume a price, the useful question is what was measured, where and at which moment. This article covers how each price is formed, where each one fails and how the two fit together.

Why one asset has two prices

Anyone who has compared two price pages knows the numbers rarely match. A peer-reviewed study of trade-level data (Makarov and Schoar, Journal of Financial Economics, February 2020) found recurrent arbitrage opportunities across exchanges, with price gaps much larger across countries than within them. The authors point to capital controls as one reason arbitrage capital moves slowly. The data came from 2017 and 2018, so read it as evidence of the mechanism, not of today’s gaps.

Pools sit under the same pull. Uniswap’s documentation notes that because of arbitrage, the reserve ratio of a pair is typically close to the market price. Arbitrageurs link the two models, which pulls them together and is why a gap between them carries information.

What an exchange price is

Most publicly accessible markets use a central limit order book: buyers and sellers post orders organized by price level that trades fill as demand shifts. The price you read from an exchange is the latest execution against that book or the top bid and offer sitting in it.

Two things follow from that design.

  • The price is a print from one venue’s own matching engine. A venue’s public interface returns that venue’s price levels and that venue’s executions, so you read what the venue publishes.
  • Disclosure is a matter of rules as well as design. IOSCO’s 2023 recommendations for crypto markets say post-trade prices, times and volumes of individual transactions should be public and free to the fullest extent practicable.

For a major pair on an active venue this works well: many trades, a visible book, a fresh timestamp. The breaks appear at the edges of what a venue lists and publishes.

What a DEX price is

A constant-product pool holds reserves of two tokens and prices them with x * y = k. A trade changes the reserves and the relative price moves with them. Trades that are large relative to the pool’s liquidity move the price more, an effect called price impact. No order waits for a counterparty: the price is a function of the pool’s state.

That state lives on-chain, so anyone can read it at a named block. The block pins the moment. Ethereum produces a block about every twelve seconds. Uniswap v2 pairs record the market price at the start of each block, set by the last transaction in the previous one. A reading at a given block is something a second party can reproduce.

A single pool is still a single view. Its price follows arbitrage rather than an order book of its own. How several pools combine into one reading is covered in DEX-native price feeds, explained.

Where the exchange picture breaks

These are structural limits, not a verdict on any venue.

  • Listing is the venue’s decision. IOSCO’s recommendations ask platforms to set and disclose standards for admitting assets to trading and for removing them. An asset that is not admitted has no price on that venue to read. One that is removed stops having one.
  • Some assets trade in pools. A token whose trading happens in pools can leave exchange books quiet or absent. The exchange price then describes a market the asset rarely visits, if it describes one at all.
  • One venue is one market. The same asset trades on many venues. The study above shows their prices can differ persistently. Choosing one venue’s number means choosing a market.

Where the DEX picture breaks

The pool side has limits of its own, just as real.

  • Liquidity against trade size. A pool with little liquidity prices a trade of any size with the same formula, so a modest order can move the number a long way. The price is accurate about that pool and says little about the wider market.
  • One block can be enough. OWASP’s smart contract risk list names spot price manipulation through large trades, flash loans or just-in-time liquidity within the same block. In February 2020 a lending protocol that read DEX prices as its oracle was attacked this way: large trades inside one flash-loan transaction moved the price it read, while other platforms still showed the old one (Qin, Zhou, Livshits and Gervais). The longer treatment is in price oracle manipulation.
  • Averaging has its own terms. The Uniswap v2 oracle documentation says the cost of manipulating a simple TWAP rises roughly in line with pool liquidity and with the averaging window. For larger pools over longer periods the documentation calls the attack impractical. It also notes that factors such as network congestion can lower the cost. A longer window also means the number reflects older prices.
  • A quiet pool keeps its last state. The price is set by the last transaction, so a pool with no trades reports the same reading block after block. That is accurate about state and silent about time. OWASP lists stale or stuck data among the failure modes for contracts that do not enforce freshness, so staleness is a risk on the pool side too.

These limits are what liquidity weighting, outlier handling and status labels address. ML Data combines pool readings, weights them by liquidity and screens out outliers before publishing; the approach is described on the methodology page.

We already buy exchange data: why add a DEX-native feed?

Because the two inputs fail in different ways.

Exchange price Pool price
Reads Executions on a venue’s book Reserves at a block
Silent when No listing or venue unavailable No trades, state unchanged
Misleading when One venue stands for a fragmented market Liquidity is low or a block is pushed

A team that reads both can treat a gap as a signal. When the numbers part, one of them is describing a market the other is not. Which one depends on the asset and the moment. That is a prompt to look at liquidity and timestamps, not a ranking of venues.

Settlement is a second reason. Aave’s documentation describes an oracle contract for each reserve that reports the market price of the asset, which is essential for determining collateralization requirements. For positions in such protocols, the price the protocol’s oracle reports is part of the logic that decides outcomes, whatever its source. A team that monitors them needs to know which price that is, next to the exchange price it already holds.

An exchange-derived feed and a DEX-native one answer the same question from different evidence. The data feeds overview shows how ML Data’s feeds fit next to exchange-derived data.

Reading a disagreement

When two sources disagree, four checks cover most of the ground:

  1. Do the timestamps match, to the block or to the second?
  2. Is each reading one venue or one pool, or a combination?
  3. How much liquidity stood behind each reading, compared with the size your positions would trade?
  4. Is the reading a recent print or an unchanged state, with a known time of its last change?

The BTC/USD and USDC/USD feed pages show an on-chain reading with its block time beside the rate, so the timestamp and freshness checks can be run on them directly. Put the exchange price you already hold next to the same moment and note which of the two moved.

Sources

Frequently asked

Questions & answers

What is the difference between a CEX and a DEX?

A centralized exchange matches buyers and sellers in an order book run by one operator. Its price is the latest trade there. A decentralized exchange uses smart contracts and liquidity pools. Its price is computed from the pool's reserves. Both set prices through trading; they differ in who runs the market and what state a reader can inspect.

Why are crypto prices different on exchanges?

Each exchange has its own order book and prints its own trades. Research on trade-level data from 2017 and 2018 found recurrent arbitrage gaps across exchanges, wider across countries than within them. Pools stay near the market price through arbitrage, the same process that narrows gaps between venues.

Which price is right when two sources disagree?

Neither by default. Each is a reading of a different market at a particular moment. Start with the timestamps, then ask how much liquidity stood behind each reading compared with the size you care about. A gap can mean one source describes a market the other cannot see.

Can DEX prices be manipulated?

Yes, at the level of a single pool. Large trades or flash loans inside one block can move a spot price. A February 2020 attack on a lending protocol worked that way. The cost of moving a time-weighted average rises roughly with pool liquidity and with the length of the window.

Why do some tokens have no price on centralized exchanges?

Each exchange decides which assets to admit to trading and when to remove them; IOSCO recommends that platforms set and disclose standards for it. A token that trades mainly in on-chain pools can therefore have no listing on a given exchange and no price there, while its pool price exists on-chain.

Get in touch

Ready for price data you can defend?

Whether you are a protocol pricing collateral, a risk team monitoring depegs, an asset manager marking a book or an exchange onboarding a data vendor, our team is ready to help.

Our affiliate Matrixed.Link is trusted by
ChainlinkEnjinPolygondRPC