Exploiting temporary price differences for the same asset across two or more markets.
Detect
Compare the price of the same asset across two venues.
Size the trade
Estimate how much can be traded before the price difference closes due to slippage.
Execute
Buy on the cheaper venue and sell on the more expensive one, ideally in the same transaction.
Settle
Fees, gas, and slippage are subtracted from the gross price difference to find the real result.
In efficient markets, identical assets should trade at the same price everywhere. On-chain, prices can briefly diverge between pools due to uneven trading activity, making a temporary gap available to whoever acts on it first.
These gaps are usually small and close within seconds, because many independent participants (and automated bots) are competing to capture them - this is what keeps markets efficient in the first place.
Gas costs, slippage, and trading fees all eat into the theoretical gap, and on public mempools other participants can see and outbid a pending transaction before it confirms.
Is arbitrage risk-free?
No. Price gaps can close before your transaction confirms, gas costs can exceed the gap, and competing transactions can be prioritized ahead of yours.
Want to see the math with numbers you control?
Open the simulator