Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Facilitate over-the-counter trades between agents using Uniswap as the settlement layer. Use when user wants to trade tokens directly with another agent, settle an agent-to-agent trade through Uniswap, or execute an OTC swap with a specific counterparty agent. Verifies counterparty identity via ERC-8004, negotiates terms, and settles through Uniswap pools.
.claude/skills/leoyeai-agent-otc-trade/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 70% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 86% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 239% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 287% | 0% |
Facilitates over-the-counter trades between agents using Uniswap as the trustless settlement layer. Instead of agents manually coordinating trades through ad-hoc channels, verifying each other's identity, agreeing on prices, and handling settlement independently, this skill provides a structured pipeline: verify counterparty identity via ERC-8004, agree on terms using Uniswap pool prices as the reference rate, and settle atomically through Uniswap pools.
Why this is 10x better than manual agent-to-agent trading:
Activate when the user says anything like:
Do NOT use when the user wants a regular swap without a specific counterparty (use execute-swap instead), wants to provide liquidity (use manage-liquidity instead), or wants to find trading opportunities (use scan-opportunities instead).
| Parameter | Required | Default | How to Extract | | ------------------- | -------- | ----------- | --------------------------------------------------------------------- | | counterpartyAgent | Yes | -- | Counterparty address (0x...) or ERC-8004 identity | | tokenSell | Yes | -- | Token you are selling: "USDC", "UNI", or 0x address | | tokenBuy | Yes | -- | Token you are buying: "ETH", "UNI", or 0x address | | amount | Yes | -- | Amount to sell: "1000 USDC", "50 UNI", "$5,000 worth" | | chain | No | ethereum | Settlement chain: "ethereum", "base", "arbitrum" | | settlementMethod | No | direct-swap | "direct-swap", "intent" (ERC-7683 cross-chain) | | maxPremium | No | 1% | Max acceptable premium/discount vs pool price | | requireVerified | No | true | Require ERC-8004 verified counterparty (true/false) |
If the user doesn't provide counterpartyAgent, tokenSell/tokenBuy, or amount, ask for them -- never guess OTC trade parameters.
AGENT OTC TRADE PIPELINE
┌──────────────────────────────────────────────────────────────────────┐
│ │
│ Step 1: VERIFY COUNTERPARTY │
│ ├── Check ERC-8004 identity registry │
│ ├── Query reputation score │
│ ├── Determine trust tier (unverified/basic/verified/trusted) │
│ └── Output: Identity report + trust decision │
│ │ │
│ ▼ IDENTITY GATE │
│ ┌───────────────────────────────────────────┐ │
│ │ trusted/verified -> Proceed │ │
│ │ basic -> Warn, ask user │ │
│ │ unverified -> STOP (if required) │ │
│ └───────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ │
│ Step 2: PRICE DISCOVERY │
│ ├── Get current Uniswap pool price for the token pair │
│ ├── Get quote at the OTC trade size │
│ ├── Calculate fair OTC price (pool price + spread) │
│ └── Output: Reference price + OTC terms │
│ │ │
│ ▼ │
│ │
│ Step 3: TERMS AGREEMENT │
│ ├── Present terms to user: price, amounts, fees, settlement method │
│ ├── Compare OTC price vs pool price (premium/discount) │
│ ├── Show total cost including gas and slippage │
│ └── User must explicitly confirm │
│ │ │
│ ▼ │
│ │
│ Step 4: SETTLEMENT │
│ ├── Check wallet balance and approvals │
│ ├── Execute swap via trade-executor (or cross-chain intent) │
│ ├── Verify settlement on-chain │
│ └── Output: Settlement confirmation + tx hash │
│ │ │
│ ▼ │
│ │
│ Step 5: RECORD & REPORT │
│ ├── Record trade in OTC history │
│ ├── Log counterparty, terms, settlement tx │
│ └── Output: Full OTC trade report │
│ │
└──────────────────────────────────────────────────────────────────────┘Delegate to Task(subagent_type:identity-verifier):
Verify the identity and reputation of this agent:
- Agent address: {counterpartyAgent}
- Chain: {chain}
Check the ERC-8004 Identity Registry, Reputation Registry, and Validation
Registry. Return the trust tier (unverified/basic/verified/trusted),
reputation score, registration date, and any flags.Present to user:
textStep 1/5: Counterparty Verification Agent: 0x1234...abcd ERC-8004: Registered (verified tier) Reputation: 78/100 (good) Registered: 2025-11-15 (87 days ago) Trades: 142 completed, 0 disputes Trust Tier: VERIFIED Proceeding to price discovery...
Identity gate logic:
| Trust Tier | Action | | ------------ | ----------------------------------------------------------------------------- | | trusted | Proceed to Step 2 automatically | | verified | Proceed to Step 2 automatically | | basic | Warn user: "Counterparty has basic verification only. Proceed?" Ask to confirm. | | unverified | If requireVerified=true: STOP. Show reason. Suggest verifying first. | | | If requireVerified=false: Warn strongly, ask for explicit confirmation. |
mcp__uniswap__get_token_price for both tokens to establish USD values.mcp__uniswap__get_pool_info for the token pair to get the current pool price.mcp__uniswap__get_quote at the OTC trade size to determine actual execution price including slippage.textStep 2/5: Price Discovery Token Pair: USDC / UNI Pool Price: 1 UNI = $7.10 (USDC/UNI 0.3% V3) Pool TVL: $42M Quote at Size: 1000 USDC -> 140.65 UNI (impact: 0.08%) OTC Reference Rate: $7.10 per UNI Your Trade: 1000 USDC -> ~140.85 UNI Proceeding to terms agreement...
Present the complete trade terms for user confirmation:
textOTC Trade Terms You Sell: 1,000 USDC You Receive: ~140.85 UNI ($999.90) Counterparty: 0x1234...abcd (VERIFIED, rep: 78/100) Pricing: Pool Rate: $7.10 per UNI OTC Rate: $7.10 per UNI (0.00% premium) Slippage: ~0.08% Gas Est: ~$5.00 Settlement: Method: Direct swap via Uniswap V3 Chain: Ethereum Pool: USDC/UNI 0.3% Proceed with this OTC trade? (yes/no)
Only proceed to Step 4 if the user explicitly confirms.
If the OTC price deviates from the pool price by more than maxPremium, warn the user:
textWARNING: OTC rate ($7.25/UNI) is 2.1% above pool rate ($7.10/UNI). This exceeds your max premium of 1%. Proceed anyway? (yes/no)
Delegate to Task(subagent_type:trade-executor):
For direct-swap settlement:
Execute this OTC trade settlement:
- Sell: {amount} {tokenSell}
- Buy: {tokenBuy}
- Chain: {chain}
- Slippage tolerance: based on OTC terms
- Context: This is an OTC trade with counterparty {counterpartyAgent}
(ERC-8004 verified, reputation {score}/100). Settle through the
{fee}% pool.For cross-chain intent settlement:
Use mcp__uniswap__submit_cross_chain_intent with:
tokenIn: tokenSell on source chaintokenOut: tokenBuy on destination chainsourceChain: your chaindestinationChain: counterparty's chaintextStep 5/5: OTC Trade Complete Settlement: Sold: 1,000 USDC Received: 140.85 UNI ($999.90) Slippage: 0.07% Gas: $4.80 Tx: https://etherscan.io/tx/0x... Counterparty: Agent: 0x1234...abcd Trust: VERIFIED (78/100) OTC Terms vs Market: Pool Rate: $7.10/UNI Actual: $7.10/UNI (0.00% premium)
textAgent OTC Trade Complete Trade: Sold: 1,000 USDC Received: 140.85 UNI ($999.90) Counterparty: 0x1234...abcd (VERIFIED) Settlement: Direct swap via USDC/UNI 0.3% (V3) Chain: Ethereum Tx: https://etherscan.io/tx/0x... Pricing: Pool Rate: $7.10/UNI Actual Rate: $7.10/UNI Premium: 0.00% Slippage: 0.07% Gas: $4.80 Counterparty Verification: ERC-8004: Registered, VERIFIED tier Reputation: 78/100 Trade History: 142 completed, 0 disputes
textAgent OTC Trade -- Blocked Counterparty: 0x5678...efgh ERC-8004: NOT REGISTERED Trust Tier: UNVERIFIED Trade blocked: Counterparty is not ERC-8004 verified. Your policy requires verified counterparties (requireVerified=true). Suggestions: - Ask the counterparty to register on ERC-8004 - Use /verify-agent to check their status - Set requireVerified=false to trade with unverified agents (not recommended)
requireVerified=true is strongly recommended.maxPremium parameter (default 1%) prevents accepting trades at significantly worse-than-market rates.submit_cross_chain_intent for settlement. This adds bridge latency but enables cross-chain agent commerce.This skill relies on Uniswap MCP tools for pricing, pool data, quotes, balances, and cross-chain intents. When used in isolation (for example, from a skills catalog), ensure the Agentic Uniswap MCP server is running:
Agentic-Uniswap MCP server@agentic-uniswap/mcp-server| Error | User-Facing Message | Suggested Action | | ------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------- | | Counterparty unverified | "Counterparty agent is not ERC-8004 verified." | Ask counterparty to register, or disable check | | Counterparty not found | "Could not find agent at address {addr}." | Verify the address is correct | | No pool for pair | "No Uniswap pool found for {tokenSell}/{tokenBuy} on {chain}." | Try a different chain or intermediate token | | Premium too high | "OTC rate deviates {X}% from pool rate, exceeding {maxPremium}% limit." | Renegotiate terms or increase maxPremium | | Insufficient balance | "Insufficient {tokenSell} balance: have {X}, need {Y}." | Fund wallet or reduce trade amount | | Settlement failed | "OTC settlement via Uniswap failed: {reason}." | Check liquidity, gas, and retry | | Cross-chain intent failed | "Cross-chain settlement failed: {reason}." | Check bridge status and retry | | Safety check failed | "Trade exceeds safety limits." | Check spending limits with check-safety | | Wallet not configured | "No wallet configured. Cannot execute OTC trades." | Set up wallet with setup-agent-wallet | | Identity service down | "ERC-8004 registry unreachable. Cannot verify counterparty." | Retry later or proceed with caution |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 12,604 | 7,840 | -38% | 1 | 1 | 0% | 2,200 | 4,401 | +100% | 0 | 0 | — |
case-02 | fail→fail | 11,012 | 7,889 | -28% | 1 | 1 | 0% | 2,045 | 4,359 | +113% | 0 | 0 | — |
case-03 | fail→fail | 11,527 | 10,280 | -11% | 1 | 1 | 0% | 2,164 | 4,733 | +119% | 0 | 0 | — |
case-04 | pass→pass | 10,674 | 2,604 | -76% | 1 | 1 | 0% | 1,728 | 4,238 | +145% | 0 | 0 | — |
case-05 | fail→pass | 16,099 | 5,090 | -68% | 1 | 1 | 0% | 2,739 | 4,656 | +70% | 0 | 0 | — |
case-06 | fail→pass | 17,710 | 11,522 | -35% | 1 | 1 | 0% | 3,042 | 5,660 | +86% | 0 | 0 | — |
case-07 | fail→pass | 13,252 | 2,438 | -82% | 1 | 1 | 0% | 2,364 | 4,242 | +79% | 0 | 0 | — |
case-08 | fail→pass | 9,122 | 11,660 | +28% | 1 | 1 | 0% | 1,453 | 4,923 | +239% | 0 | 0 | — |
case-09 | fail→fail | 8,597 | 12,356 | +44% | 1 | 1 | 0% | 1,388 | 4,371 | +215% | 0 | 0 | — |
case-10 | fail→fail | 15,640 | 7,240 | -54% | 1 | 1 | 0% | 2,217 | 5,208 | +135% | 0 | 0 | — |
case-11 | fail→fail | 15,388 | 10,383 | -33% | 1 | 1 | 0% | 1,646 | 4,222 | +157% | 0 | 0 | — |
case-12 | fail→fail | 10,021 | 8,937 | -11% | 1 | 1 | 0% | 1,818 | 4,352 | +139% | 0 | 0 | — |
case-13 | fail→pass | 8,396 | 10,071 | +20% | 1 | 1 | 0% | 1,511 | 5,842 | +287% | 0 | 0 | — |
case-14 | fail→fail | 8,557 | 10,072 | +18% | 1 | 1 | 0% | 1,335 | 4,380 | +228% | 0 | 0 | — |
case-15 | pass→pass | 6,325 | 4,003 | -37% | 1 | 1 | 0% | 1,097 | 4,561 | +316% | 0 | 0 | — |
case-16 | fail→pass | 4,667 | 14,362 | +208% | 1 | 1 | 0% | 917 | 5,549 | +505% | 0 | 0 | — |
case-17 | fail→fail | 7,481 | 11,518 | +54% | 1 | 1 | 0% | 1,486 | 4,649 | +213% | 0 | 0 | — |
case-18 | pass→pass | 8,979 | 2,182 | -76% | 1 | 1 | 0% | 1,414 | 4,144 | +193% | 0 | 0 | — |
case-19 | fail→pass | 12,089 | 5,634 | -53% | 1 | 1 | 0% | 2,027 | 4,860 | +140% | 0 | 0 | — |
case-20 | fail→pass | 9,029 | 3,852 | -57% | 1 | 1 | 0% | 1,041 | 4,588 | +341% | 0 | 0 | — |
case-21 | fail→pass | 10,312 | 8,124 | -21% | 1 | 1 | 0% | 1,702 | 5,561 | +227% | 0 | 0 | — |
case-22 | fail→fail | 4,905 | 7,546 | +54% | 1 | 1 | 0% | 931 | 4,395 | +372% | 0 | 0 | — |
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 14 counted toward the lift figure. The other 8 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 +41 percentage points is the difference between those two pass rates over the 14 comparable cases. 4 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.