risk-mgmt

Your first DEX Arbitrage bot (5-cycle USDC/WETH radar on Base)

Validate the radar + threshold gate before scaling up

20 min setup + ongoing radar watching · intermediate

What you'll have when finished

  • Have one small arbitrage bot watching USDC/WETH on Base
  • Understand the radar chart and the threshold reference line
  • Know what auto-pause means and when to investigate

Before you start

  • DEX arbitrage is LOW-FREQUENCY by design — do not expect frequent fires
  • A profitable backtest does not exist for this feature — the spreads come from real-time market inefficiencies
  • 3 consecutive losing fires = auto-pause — investigate before resuming. Often the market regime shifted

Walkthrough

  1. Have 100 USDC + tiny ETH on Base

    You need 100 USDC for a 5-cycle x $20-per-cycle test pool AND ~$0.50 of native ETH for the approval gas. If USDC on CoW + Base is already approved from prior DEX features, no new approval needed.

    Success criteria: MetaMask shows ≥ 100 USDC + some native ETH on Base

  2. Open DEX Arbitrage + connect wallet

    DEX Trade → DEX Arbitrage. Connect Wallet. Green Connected banner.

    Success criteria: Green Connected banner visible

  3. Pick Base + USDC/WETH + CoW buy / Velora sell direction

    Chain = Base. Pair = USDC (sell side) → WETH (buy side). Direction = Buy on CoW · Sell on Velora. This is the canonical test combo — most-tested liquidity on both sides.

    Success criteria: All three pickers match the values above

  4. Set min spread = 0.30%, pool size = 5 cycles, daily cap = 5

    Min spread = 0.30 (conservative — covers fees). Pool size = 5 cycles (small test, 10 signatures). Daily cap = 5 (limit blast radius to 5 fires max per day).

    Success criteria: All three numbers match

  5. Sign approval + 10 cycle signatures

    Click Arm Arbitrage Bot. First-time USDC: ERC-20 approval (gas ~$0.05). Then 10 EIP-712 signatures back-to-back (5 cycles × 2 sigs/cycle). Click Sign 10 times in MetaMask.

    Success criteria: All 10 signatures complete; bot row appears with status Armed

  6. Watch the radar for a few hours

    Live opportunity radar polls every 60 seconds and plots spread % vs your threshold line. Current spread shows in the bottom-left status line. If spread > 0.30%, the "⚡ ready to fire" badge appears and the worker submits the cycle. Realistic: you may see 0-5 fires per day depending on market conditions.

    Success criteria: You can read the radar chart and identify when spread crossed the threshold line

  7. Check P&L summary after 24-48 hours

    P&L summary card shows: total fires, profitable count, win rate, today's count vs cap, cumulative net P&L. GOOD: at least 2 fires fired AND win rate > 60% AND net P&L positive. BAD: 0 fires (threshold too tight OR pair too liquid) OR auto-paused (3-loss streak). NEUTRAL: 2-3 fires with mixed results — wait for more data.

    Success criteria: You can articulate what your specific result means and what to adjust if needed

What's next

You have a validated baseline. If GOOD result: scale up by adding a second bot with the reverse direction (Velora buy / CoW sell) — capture both sides of the spread. If BAD with 0 fires: lower threshold to 0.20% AND raise pool size to 10 for higher-frequency testing (accept that some fires may be marginal). If auto-paused: investigate the loss streak before resuming — usually the market regime shifted.