Uniswap Cross Chain Arbitrage
Find and execute cross-chain arbitrage opportunities. Scans prices across all chains, evaluates profitability after all costs (gas, bridge fees, slippage), assesses risk, and executes if profitable. Uses ERC-7683 for cross-chain settlement. Supports scan-only mode for research without execution.
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install clawskills:wpank~cross-chain-arbitragecURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/clawskills%3Awpank~cross-chain-arbitrage/file -o cross-chain-arbitrage.mdGit 仓库获取源码
git clone https://github.com/openclaw/skills/commit/41c32442cb48ff4f8c98e4b1867f29a40eefce01# Cross-Chain Arbitrage
## Overview
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:**
1. **Simultaneous multi-chain price scanning**: Manually checking ETH prices on Ethereum, Base, Arbitrum, Optimism, Polygon, and 6 other chains takes significant effort. The opportunity-scanner does this across all supported chains in seconds.
2. **All-in cost calculation**: The most common arbitrage mistake is ignoring costs. This skill itemizes every cost component (source gas, bridge fee, destination gas, slippage on both sides) and only presents opportunities that are profitable *after* all costs.
3. **Time-sensitivity awareness**: Arbitrage opportunities are ephemeral -- they can disappear in seconds. The skill warns about this throughout and moves quickly, but honestly flags when an opportunity may have closed by the time the user confirms.
4. **Risk-gated execution**: Before any capital moves, the risk-assessor evaluates bridge risk, execution risk, and liquidity. A VETO stops the pipeline.
5. **Scan-only mode**: Not ready to execute? Use scan-only mode to just see what opportunities exist without committing capital.
## When to Use
Activate when the user says anything like:
- "Find ETH arbitrage across chains"
- "Cross-chain arb opportunities"
- "Are there any price differences for WETH across chains?"
- "Profit from price differences"
- "Scan for arbitrage on Base vs Ethereum"
- "Is there an arb opportunity for USDC?"
- "Cross-chain arbitrage with $5K"
- "Just scan for arb -- don't execute" (scan-only mode)
**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`).
## Parameters
| 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.
## Workflow
```
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 │
│ │
└─────────────────────────────────────────────────────────────────────┘
```
### Step 0: Pre-Flight
Before starting:
1. Check safety status via `mcp__uniswap__check_safety_status`.
2. Check wallet balances via `mcp__uniswap__get_agent_balance` on relevant chains.
3. If wallet has no fu