Skip to main content
The arbitrage scanner compares spot prices across all 6 supported DEXes and surfaces pairs where the spread exceeds 0.5%. On Monad’s ~400 ms block time, profitable windows can be extremely short - this scanner is designed for low-latency polling or WebSocket-driven triggering.

How It Works

  1. getArbitrageAlerts queries all DEX pairs and returns alerts where spreadPct > 0.5%
  2. getAllSwapQuotes gives a full breakdown of what each DEX would pay for a specific trade
  3. detectDexArbitrage checks a single token pair and returns the best buy/sell combination

Full Example

Example Output

Checking a Specific Pair

Continuous Scanner with Alerting

Cross-Oracle Price Discrepancy

For a deeper check, combine DEX arbitrage scanning with oracle discrepancy detection:

Notes

  • Monad’s ~400 ms block time means arbitrage windows close faster than on Ethereum. Target spreads above 0.8% to account for gas costs and execution latency.
  • getAllSwapQuotes returns routes sorted by amountOut descending - the first element is always the best available quote.
  • OpenOcean is included in the scan but may introduce latency from the REST API call. If speed is critical, filter it out: quotes.filter(q => q.dex !== 'openocean').
  • amountOut values are returned as strings in wei (token decimals vary - USDC uses 6 decimals, most ERC20s use 18).