Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill automates the discovery and execution of cross-chain arbitrage opportunities -- finding price differences for the same token across Uniswap deployments on different chains and profiting from the spread. It handles the entire pipeline: scanning prices across 11 chains, calculating all-in c
.claude/skills/cross-chain-arbitrage/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-21 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✓→✓ | = Same ✓ | — | — |
| case-19 | ✓→✓ | = Same ✓ | — | — |
| case-04 | ✗→✗ | = Same ✗ | — | — |
| case-06 | ✗→✗ | = Same ✗ | — | — |
This skill automates the discovery and execution of cross-chain arbitrage opportunities -- finding price differences for the same token across Uniswap deployments on different chains and profiting from the spread. It handles the entire pipeline: scanning prices across 11 chains, calculating all-in costs, risk assessment, cross-chain execution via ERC-7683, and profit reporting.
Why this is 10x better than doing it manually:
Activate when the user says anything like:
Do NOT use when the user wants a same-chain swap (use execute-swap), wants to bridge without arbitrage (use bridge-tokens), or wants general LP yield opportunities (use scan-opportunities or find-yield).
| Parameter | Required | Default | How to Extract | | ------------- | -------- | --------------- | --------------------------------------------------------------- | | token | No | Top 5 tokens | Token to check: "WETH", "USDC", or scan top tokens by default | | chains | No | all | Chains to scan: "all", or specific list like "ethereum, base" | | minProfit | No | 0.5% | Minimum net profit threshold after ALL costs | | maxAmount | No | -- | Maximum capital to deploy per opportunity | | riskTolerance | No | moderate | "conservative", "moderate", "aggressive" | | mode | No | execute | "execute" (full pipeline) or "scan" (scan-only, no execution) |
If mode is "scan" or the user says "just scan" / "don't execute" / "show me opportunities", skip Steps 3-4 and only present the opportunity report.
CROSS-CHAIN ARBITRAGE PIPELINE
┌─────────────────────────────────────────────────────────────────────┐
│ │
│ Step 1: SCAN (opportunity-scanner) │
│ ├── Compare token prices across all chains │
│ ├── Calculate gross profit for each discrepancy │
│ ├── Itemize ALL costs (gas, bridge, slippage) │
│ ├── Filter: only net profit > minProfit │
│ └── Output: Ranked Arbitrage Opportunities │
│ │ │
│ ▼ │
│ ┌───────────────────────────────────────────────────┐ │
│ │ SCAN-ONLY MODE? │ │
│ │ Yes → Present report, STOP. │ │
│ │ No → Continue to Step 2. │ │
│ └───────────────────────────────────────────────────┘ │
│ │ │
│ ▼ USER SELECTION │
│ ┌───────────────────────────────────────────────────┐ │
│ │ Present opportunities to user. │ │
│ │ User picks which opportunity to execute. │ │
│ │ WARN: "Opportunity may expire before execution." │ │
│ └───────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ │
│ Step 2: RISK CHECK (risk-assessor) │
│ ├── Evaluate bridge risk (mechanism, settlement time) │
│ ├── Evaluate execution risk (slippage, speed) │
│ ├── Evaluate liquidity on both chains │
│ ├── Decision: APPROVE / VETO / HARD_VETO │
│ └── Output: Risk Assessment │
│ │ │
│ ▼ CONDITIONAL GATE │
│ ┌───────────────────────────────────────────────────┐ │
│ │ APPROVE → Proceed with confirmation │ │
│ │ VETO / HARD_VETO → STOP with report │ │
│ └───────────────────────────────────────────────────┘ │
│ │ │
│ ▼ USER CONFIRMATION │
│ ┌───────────────────────────────────────────────────┐ │
│ │ "Execute this arb? Opportunity may have shifted │ │
│ │ since scan. Confirm to proceed." │ │
│ └───────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ │
│ Step 3: EXECUTE (cross-chain-executor) │
│ ├── Buy on cheaper chain │
│ ├── Bridge to expensive chain via ERC-7683 │
│ ├── Monitor bridge settlement │
│ ├── (Sell on expensive chain if needed) │
│ └── Output: Execution Report │
│ │ │
│ ▼ │
│ │
│ Step 4: REPORT (portfolio-analyst) │
│ ├── Calculate actual profit/loss after all costs │
│ ├── Compare to projected profit │
│ └── Output: P&L Report │
│ │
└─────────────────────────────────────────────────────────────────────┘Before starting:
mcp__uniswap__check_safety_status.mcp__uniswap__get_agent_balance on relevant chains.Delegate to Task(subagent_type:opportunity-scanner) with:
Scan for cross-chain arbitrage opportunities:
- Token: {token or "top 5 tokens by volume: WETH, USDC, USDT, WBTC, DAI"}
- Chains: {chains or "all supported chains"}
- Type: "arb" (arbitrage only)
- Minimum net profit: {minProfit}%
For each price discrepancy found, calculate and itemize:
1. Gross price difference (%)
2. Source chain gas cost (USD)
3. Bridge fee (USD)
4. Destination chain gas cost (USD)
5. Slippage estimate on both sides (USD)
6. NET profit after ALL costs (USD and %)
Only include opportunities where net profit > {minProfit}% after all costs.
Rank by net profit. Include time sensitivity assessment for each opportunity.Present to user:
textStep 1: Arbitrage Scan Complete Token: WETH Chains scanned: 8 (Ethereum, Base, Arbitrum, Optimism, Polygon, BNB, Avalanche, Blast) Opportunities found: 2 (after filtering by {minProfit}% min net profit) # Route Gross Costs Net Profit Time Sensitivity 1 WETH: Arbitrum → Optimism 0.8% $12 total $33 (0.66%) EPHEMERAL ├── Source gas: $0.50 ├── Bridge fee: $2.00 ├── Dest gas: $0.50 └── Slippage: $9.00 (both sides) 2 WETH: Base → Polygon 0.6% $8 total $22 (0.44%) EPHEMERAL ├── Source gas: $0.10 ├── Bridge fee: $3.00 ├── Dest gas: $1.50 └── Slippage: $3.40 (both sides) WARNING: Arbitrage opportunities are ephemeral. These prices were captured at {timestamp} and may change by the time you confirm execution. The actual profit may differ from the estimates above. No opportunities found for: USDC, USDT, WBTC, DAI (spreads < {minProfit}% after costs)
If mode is "scan", stop here:
textArbitrage Scan Report (scan-only mode) {same opportunity table as above} To execute an opportunity, run: "Cross-chain arb, execute opportunity #1" Note: Opportunities are time-sensitive and may no longer be available.
If mode is "execute", ask the user which opportunity to pursue.
Delegate to Task(subagent_type:risk-assessor) with the selected opportunity:
Evaluate risk for this cross-chain arbitrage:
Operation: cross-chain arbitrage
Token: {token}
Source chain: {source_chain}
Destination chain: {dest_chain}
Amount: {amount or maxAmount}
Risk tolerance: {riskTolerance}
Opportunity details (from opportunity-scanner):
- Gross spread: {gross_pct}%
- Estimated net profit: {net_profit_usd} ({net_pct}%)
- Cost breakdown: {full cost itemization}
- Time sensitivity: ephemeral
Evaluate:
1. Bridge risk (settlement mechanism, historical reliability, available liquidity)
2. Execution risk (can the arb close before we complete? slippage may increase)
3. Liquidity risk (sufficient depth on both chains for the trade size)
4. Smart contract risk (pool ages and versions on both chains)
Key concern: arbitrage opportunities are time-sensitive. Factor in the risk that
the price discrepancy may close during bridge settlement (typically 1-10 minutes).Conditional gate:
| Decision | Action | | --------------- | -------------------------------------------------------------------------- | | APPROVE | Present risk summary, proceed to user confirmation | | COND. APPROVE | Show conditions (e.g., "reduce size"). Ask user. | | VETO | STOP. Opportunity too risky at this size/tolerance. Show details. | | HARD_VETO | STOP. Bridge liquidity insufficient or critical risk. Non-negotiable. |
User confirmation (with time-sensitivity warning):
textStep 2: Risk Assessment Passed Decision: APPROVE Composite Risk: MEDIUM Bridge Risk: LOW (ERC-7683, established mechanism) Execution Risk: MEDIUM (arb may close during 2-5 min settlement) Liquidity: LOW (deep pools on both chains) Execute Arbitrage? Route: Buy WETH on Arbitrum → Bridge → (Sell on Optimism) Amount: $5,000 Est. Profit: $33 (0.66%) after all costs Settlement: ~2-5 minutes IMPORTANT: This opportunity was scanned at {timestamp} ({N} seconds ago). The price discrepancy may have changed. Actual profit may differ from estimate. Proceed? (yes/no)
Delegate to Task(subagent_type:cross-chain-executor) with:
Execute this cross-chain arbitrage:
Leg 1 (source chain):
- Chain: {source_chain}
- Action: Buy {token} (swap {capital_token} → {token})
- Amount: {amount}
- Pool: {best pool on source chain}
Leg 2 (bridge):
- Bridge {token} from {source_chain} to {dest_chain}
- Mechanism: ERC-7683
Leg 3 (destination chain — if needed):
- Chain: {dest_chain}
- Action: Sell {token} (swap {token} → {capital_token}) — only if the user
wants to realize profit immediately. Otherwise, hold the {token} on dest chain.
Risk assessment: APPROVED, composite {risk_level}
Time sensitivity: HIGH — execute as quickly as possible.
Monitor bridge settlement and report progress. If bridge takes longer than
expected, warn about potential profit erosion.Present progress updates during execution:
textStep 3: Executing Arbitrage... [1/3] Buying WETH on Arbitrum... Bought 2.55 WETH for $5,000 USDC — Tx: 0x... [2/3] Bridging WETH to Optimism via ERC-7683... Order ID: 0x... — Monitoring settlement... Status: PENDING (elapsed: 45s, expected: 2-5 min) Status: PENDING (elapsed: 2m 15s) Status: SETTLED (elapsed: 3m 02s) — 2.55 WETH received on Optimism [3/3] Holding WETH on Optimism (no sell leg — same token, profit realized) ✓ Arbitrage complete
Delegate to Task(subagent_type:portfolio-analyst) with:
Report on the result of this cross-chain arbitrage:
Execution details:
- Token: {token}
- Source: {source_chain} — bought at ${source_price}
- Destination: {dest_chain} — current price ${dest_price}
- Amount: {amount}
- Bridge order: {order_id}
- Transactions: {tx_hashes}
Calculate:
1. Actual gross profit (price difference realized)
2. All actual costs (gas, bridge fees, slippage — from execution receipts)
3. Net profit/loss
4. Comparison to projected profit from scan
5. Portfolio impactPresent final result:
textStep 4: Arbitrage Report Route: WETH: Arbitrum → Optimism Amount: 2.55 WETH ($5,000) Profit & Loss: Gross spread: $40.00 (0.80%) Source gas: -$0.45 Bridge fee: -$1.80 Dest gas: -$0.00 (held, no sell) Slippage: -$7.50 ───────────────────────── Net profit: $30.25 (0.61%) vs. Projected: $33.00 (0.66%) — actual was 8% less due to slippage Timing: Scan to execution: 45 seconds Bridge settlement: 3 min 02 sec Total elapsed: 3 min 47 sec Portfolio Impact: WETH on Optimism: 2.55 WETH ($5,030.25) Net gain: $30.25 ────────────────────────────────────── Pipeline Summary ────────────────────────────────────── Scan: 2 opportunities found, #1 selected Risk: APPROVED (MEDIUM) Execution: Buy → Bridge → Hold (3 min 47 sec total) Result: +$30.25 net profit (0.61%)
textCross-Chain Arbitrage Complete Route: {token}: {source_chain} -> {dest_chain} Amount: ${amount} Net P&L: +${net_profit} ({net_pct}%) Time: {total_elapsed} Cost Breakdown: Gas: ${gas} Bridge: ${bridge_fee} Slippage: ${slippage} Pipeline: Scan -> Risk -> Execute -> Report (all passed)
textCross-Chain Arbitrage Scan Scanned: {n_tokens} tokens across {n_chains} chains Found: {n_opportunities} opportunities (> {minProfit}% net profit) {opportunity table} To execute: "Cross-chain arb, execute opportunity #N"
textCross-Chain Arbitrage -- Risk Vetoed Opportunity: {token} {source} -> {dest} ({gross_spread}% gross) Risk: VETOED — {reason} {risk dimension details} Pipeline: Scan -> Risk (VETOED) -- No execution.
| Error | User-Facing Message | Suggested Action | | -------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------- | | No opportunities found | "No arb opportunities above {minProfit}% net profit across {chains}." | Lower minProfit or try different tokens | | Opportunity expired | "Price discrepancy has closed since scan. Opportunity no longer profitable." | Re-scan for fresh opportunities | | Risk-assessor VETO | "Risk assessment vetoed: {reason}." | Try smaller amount or different route | | Risk-assessor HARD_VETO | "Blocked: {reason}. Bridge liquidity may be insufficient." | Cannot proceed with this opportunity | | Bridge failed | "Bridge operation failed. Funds should remain on {source_chain}." | Check source wallet balance | | Bridge stuck | "Bridge settlement delayed ({elapsed} vs {expected}). Monitoring..." | Wait or check order ID manually | | Source chain swap failed | "Failed to buy {token} on {source_chain}: {reason}." | Check balance and gas | | Insufficient balance | "Not enough {token} on {source_chain}: have ${X}, need ${Y}." | Reduce amount or bridge funds first | | Safety limit exceeded | "Trade amount exceeds safety spending limits." | Reduce amount or adjust limits | | Wallet not configured | "No wallet configured for transactions." | Set up wallet with setup-agent-wallet | | User declines confirmation | "Arbitrage cancelled. Scan results shown above for reference." | No action needed | | Profit less than projected | "Actual profit (${X}) was less than projected (${Y}) due to price movement." | Expected for ephemeral opportunities | | Negative profit (loss) | "This trade resulted in a loss of ${X} due to price movement during settlement." | Inherent risk of cross-chain arbitrage |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 9 counted toward the lift figure. The other 13 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +5 percentage points is the difference between those two pass rates over the 9 comparable cases. 8 cases got worse with the skill loaded, and they are included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.