Skip to main content

CEX-DEX Arbitrage

What it is

Centralized exchanges quote prices on internal order books; decentralized exchanges quote prices algorithmically from on-chain liquidity pools (Uniswap v2/v3, Curve, PancakeSwap, etc.). The two surfaces don't always agree. When the gap exceeds gas + bridge + fee costs, the trade is: buy where it's cheap, sell where it's expensive, settle the leg — usually by swapping on the DEX and unwinding the CEX leg, or vice versa.

This is the strategy MEV searchers grind on-chain alongside; doing it as a non-MEV trader means you're competing with the bots on the DEX side and the market makers on the CEX side. The remaining alpha is in:

  • Long-tail tokens that majors don't market-make.
  • Cross-chain inefficiencies where bridge friction prevents arbs from closing immediately.
  • DEX-listing pre-CEX-listing windows where price discovery happens on-chain first.

When it works

  • The asset has liquidity on both surfaces — DEX pool TVL ≥ your trade size × 10 to keep AMM slippage tolerable.
  • Bridge to/from the relevant chain is fast and cheap relative to spread. For an Ethereum L1 round-trip, gas alone can be $20–200 — minor arbs aren't worth attempting.
  • You hold pre-positioned inventory on both sides (USDC on a CEX + USDC on the chain). Bridging per-trade is rarely profitable.
  • The MEV ecosystem hasn't already eaten the gap. If a Flashbots searcher can atomically rebalance the pool, your latency advantage is zero.

Data you need

Endpoint coverage flag

DataMaxi+ surfaces DEX swap data, not full pool-state snapshots (reserves/sqrtPriceX96). Accurate execution-quote modeling for v3 concentrated-liquidity pools usually requires reading the pool contract directly via RPC. Use these endpoints for opportunity detection; do the precise quote on-chain at execution time.

API recipe

Compare a DEX swap rate against the CEX ticker for the same asset. First, latest DEX trades for a token on Ethereum:

curl -G 'https://api.datamaxiplus.com/api/v1/dex/trade' \
-H 'X-DTMX-APIKEY: '"$YOUR_API_KEY" \
--data-urlencode 'chain=ethereum' \
--data-urlencode 'exchange=uniswap-v3' \
--data-urlencode 'pool=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640'

Risks & caveats

  • Gas volatility. A 50 bps gap on Ethereum L1 becomes negative if base fee spikes 5x mid-trade. Model gas as a stochastic input, not a constant.
  • MEV. Public-mempool swaps get sandwiched. Use private RPC (Flashbots Protect, MEV Blocker) or batch through CoW Swap / 1inch Fusion when sizing matters.
  • Bridge risk. Bridges have been the largest source of crypto loss ever (~$2B+ cumulative). Native bridges are slow (7-day Optimism, 12s LayerZero, etc.). Choose deliberately.
  • Oracle / pricing lag. The DEX trade endpoint reflects last-confirmed swap; concentrated-liquidity pool state can change with the next block. Quote on-chain at execution time, not from cached REST data.
  • CEX withdrawal-network mismatch. Many CEXs disable specific networks intermittently (e.g., Binance pausing Arbitrum withdrawals for 30 min). Always check wallet status pre-trade.
  • Atomicity asymmetry. Your on-chain leg is atomic; your CEX leg isn't. If the CEX leg fails (margin call, kill switch, latency), you're left with unhedged exposure.
  • Token-tax tokens. Some long-tail tokens charge transfer tax on-chain. Your effective DEX execution is worse than the quoted pool price.

Further reading