All articles
Strategies·July 23, 2026·1 min read

DEX-CEX Arbitrage Bot Architecture: Inventory, Latency and Execution

Visible DEX-CEX spread is not profit. Fees, executable depth, gas, inventory and the risk of completing only one leg determine realized edge.

Visible DEX-CEX spread is not profit. Fees, executable depth, gas, inventory and the risk of completing only one leg determine realized edge.

Normalize quotes

Calculate CEX depth-weighted fill price and DEX output at the intended size. Subtract maker or taker fees, pool fees, gas, slippage and later rebalancing costs. Reject stale inputs.

Pre-position inventory

Hold base and quote assets on both venues so legs can execute immediately. Set inventory targets, venue imbalance limits and free-balance reserves; rebalance separately when conditions are favorable.

Failed-leg recovery

CEX and chain legs cannot be atomic. Define whether to cross the hedge, unwind, hold temporary exposure within a cap or stop the pair. Test recovery with the same care as entry.

On-chain safety

Simulate exact calldata, derive minimum output from the opportunity threshold and centralize nonce management. Private relays may reduce mempool exposure; read Flashbots Protect versus public mempool.

TierZero develops EVM arbitrage bots and their monitoring dashboards.

Need a bot like this built?

We design, build and run trading bots on Solana, Hyperliquid and Polymarket.

Start a project
#EVM#Arbitrage Bot#DEX#CEX