CEX-DEX Arbitrage
When a centralized exchange's price moves faster than an on-chain pool can react, the gap between the two is a race that automated bots, not human traders, are built to win.
Prerequisites: Automated Market Makers, MEV Searcher Strategies
An on-chain liquidity pool only updates its price when someone trades against it. A centralized exchange updates its price continuously, order by order, as new information arrives. Between those two update speeds sits an arbitrage: whenever the centralized price moves and the on-chain pool has not yet caught up, the pool is quoting a stale price, and anyone fast enough to trade against it before it updates can buy low on-chain and sell high on the centralized exchange (or the reverse).
This is CEX-DEX arbitrage, and in practice it is fought almost entirely by automated bots rather than people, because the window between a centralized price move and the first profitable on-chain trade is often a single block or less.
CEX-DEX arbitrage exists because on-chain pools only reprice when traded against, while centralized exchanges reprice continuously — the lag between the two is the opportunity, and it is small enough that only automated, low-latency infrastructure can reliably capture it.
Who actually gets the trade
Because only the first transaction to land captures the profit, this is a winner-take-all race decided by who sees the CEX price move first, who computes the optimal trade size fastest, and who pays enough in priority fees to be included first. That last part means the arbitrage is never fully free money: bots bid away a large share of the edge in gas or block-builder payments just to win the race, which is one reason the effective spread captured is smaller than the raw price gap suggests.
Worked example
ETH trades at $3,000 on a major centralized exchange. A large sell order hits, dropping the CEX price to $2,970 within a second. An on-chain ETH/USDC pool still prices ETH near $3,000 because nobody has traded against it yet. A bot buys 10 ETH from the pool at an average price of $3,002 (small slippage from the trade itself) — a total cost of $30,020 — and immediately sells the same 10 ETH on the centralized exchange at $2,970 for $29,700.
That trade alone loses money ($29,700 vs $30,020 paid): the bot has the direction backwards. The correct trade when the CEX price drops is to sell into the pool (which still thinks ETH is worth $3,000) and buy the ETH back cheaper on the CEX: sell 10 ETH on-chain for roughly $29,950 net of slippage, then buy it back on the CEX at $2,970 for $29,700, netting about $250 before gas. After a $40 priority fee to win the block, the bot nets roughly $210 — small on a percentage basis, but repeatable dozens of times a day across many pools and pairs, which is why the strategy is run as infrastructure rather than as a one-off trade.
The liquidity providers on the other side of these trades are not bystanders — they are structurally the ones paying. Every CEX-DEX arbitrage that succeeds does so by trading against the pool at a stale price, which is exactly the mechanism behind loss-versus-rebalancing: LPs lose to informed flow precisely when prices are moving, which is also when trading fees matter least to compensate them.
Related concepts
Practice in interviews
Further reading
- Milionis et al., Automated Market Making and Loss-Versus-Rebalancing