← News & Guides
GUIDES/SEP 25, 2026·18 MIN READ

DEX arbitrage: how price gaps form between on-chain and centralized markets

DEX arbitrage trades price gaps between on-chain pools and centralized exchanges. Learn how AMMs set prices and how gas, slippage, and token risk affect returns

DEX arbitrage: how price gaps form between on-chain and centralized markets

Part 1 of a four-part series on DEX arbitrage.

DEX arbitrage trades price differences between on-chain markets and centralized exchanges, or between two on-chain venues.

The basic idea hasn't changed: buy an asset where it is cheaper and sell it where it is more expensive. Execution is different. On-chain trades involve liquidity pools, network fees, smart contracts, and transactions that may fail before they are confirmed.

Order books and liquidity pools

Centralized exchanges such as Binance and Bybit usually match buyers and sellers through an order book. Traders place bids and asks, and the exchange executes orders when those prices cross.

Many DEXs use automated market makers instead.

Uniswap and PancakeSwap are common AMM examples. Jupiter is an aggregator: it searches across liquidity sources on Solana and routes the trade rather than setting a single pool price itself.

Not every DEX uses an AMM. Some run on-chain order books or hybrid systems. The execution model needs to be checked before treating two quotes as comparable.

How an AMM sets the price

An AMM pool is a smart contract holding two assets. An ETH-USDC pool, for example, contains reserves of ETH and USDC supplied by liquidity providers.

When a trader buys ETH, the pool receives USDC and releases ETH. The balance between the two reserves changes, which moves the price.

A classic constant-product pool uses:

$$x \times y = k$$

Here, xxx and yyy are the token reserves, while kkk remains constant before accounting for fees.

Larger trades move the reserves further and receive a worse average price. This is price impact.

The formula is common, but it isn't universal. Concentrated-liquidity pools, stablecoin curves, and other AMM designs calculate prices differently.

Why DEX and CEX prices diverge

An on-chain pool and a centralized order book have separate liquidity. A large swap may move the DEX price without producing the same move on the CEX.

The reverse can happen during a sharp market move. The centralized exchange updates quickly, while an isolated pool remains near its previous price until an arbitrageur trades against it.

Several factors can keep the gap open:

  • Limited liquidity in the pool

  • A large swap that moved the pool price

  • Network congestion and transaction costs

  • Different trading activity across venues

  • Delayed arbitrage execution

  • Deposits or withdrawals paused on the CEX

A displayed gap may therefore reflect an opportunity. It may also reflect a market that cannot be traded or rebalanced.

What a DEX-CEX trade looks like

Suppose a token is cheaper in an on-chain pool than on a centralized exchange.

The trader buys it through the DEX and sells the same amount on the CEX. If the token is cheaper on the CEX, the direction is reversed.

The trade is easiest when capital is already available on both sides. Waiting for a blockchain deposit or exchange withdrawal gives the price gap time to close.

DEX-to-DEX arbitrage on the same chain can sometimes be executed in one transaction. If either swap fails, the entire transaction can revert. That makes atomic execution possible.

A CEX leg cannot be included in the same on-chain transaction. The two sides settle in different systems, so one may complete while the other fails.

The quoted spread is not the return

A DEX quote already depends on trade size. Buying $100 and buying $100,000 from the same pool will not produce the same average price.

The full calculation should include:

$$\begin{aligned} \text{Net PnL} ={}& \text{Sell proceeds} - \text{Buy cost} \\ &- \text{DEX fee} - \text{CEX fee} \\ &- \text{Gas} - \text{Slippage} \\ &- \text{Transfer costs} \end{aligned}$$

Gas is paid even when the expected profit is small. On networks with variable transaction fees, a route that works during quiet conditions may stop working when blockspace becomes expensive.

Failed transactions can also cost money. The swap may revert, but the network fee is still spent.

Price impact and slippage are different

Price impact comes from your own trade moving through the pool’s liquidity curve.

Slippage is the difference between the expected execution and the final execution. It may be caused by another transaction reaching the pool first, the market moving, or the route changing before confirmation.

A slippage tolerance protects the trade from filling too far away from the quote. Setting it too wide exposes the transaction to a poor fill. Setting it too tight increases the chance that the swap reverts.

The useful quote is the expected output for your exact trade size, not the pool’s headline price.

MEV can take the edge

A pending on-chain transaction may be visible before confirmation. Other actors can react to it.

A searcher may submit a competing arbitrage transaction with a higher priority fee. A poorly protected swap may also be exposed to sandwiching, where transactions are placed before and after it to worsen the fill.

A profitable quote at submission is not guaranteed to survive until execution. Transaction routing, private submission, gas settings, and slippage limits can affect the outcome.

Speed matters, but transaction construction matters too.

Token risk comes before price

DEXs can list tokens without the review process used by most centralized exchanges. A ticker and logo are not enough to identify the asset.

Check the contract address. Fake tokens may copy the name of a legitimate asset, while malicious contracts may prevent selling, charge extreme transfer taxes, or allow an administrator to change token behavior.

Before trading an unfamiliar token, verify:

  • The contract address

  • Whether buying and selling both work

  • Transfer taxes and restrictions

  • Available liquidity

  • Token minting or freezing permissions

  • Whether the CEX accepts deposits for that exact token and network

A 20% spread is worthless if the token cannot be sold or deposited.

Capital still needs to be rebalanced

Buying on a DEX and selling on a CEX leaves more tokens on-chain and more quote currency inside the exchange account. Repeating the same direction eventually drains one side.

Rebalancing may require an exchange withdrawal, an on-chain transfer, or a bridge. Each step adds cost and delay.

ArbLens combines balances from supported exchanges and on-chain wallets in one view. It doesn't scan DEX prices or execute arbitrage. It shows whether the capital needed for both sides is available and records the transfers used to rebalance it.

#DEX#arbitrage#AMM#liquidity#slippage