← 返回
AI智能 中文

Uniswap Execute Swap

Execute a Uniswap token swap. Use when user wants to swap, trade, buy, or sell tokens. Handles quotes, safety checks, simulation, and execution autonomously. Supports V2, V3, V4, UniswapX, and cross-chain routing on all supported chains.
执行Uniswap代币兑换,适用于代币的交换、交易、买卖。自主完成报价、安全检查、模拟及执行,支持所有兼容链的V2、V3、V4、UniswapX与跨链路由。
wpank
AI智能 clawhub v0.1.0 1 版本 99921.1 Key: 无需
★ 0
Stars
📥 1,267
下载
💾 39
安装
1
版本
#latest

概述

Execute Swap

Execute a token swap on Uniswap with full safety validation.

Activation

Use this skill when the user says any of:

  • "Swap X for Y"
  • "Buy X with Y"
  • "Sell X for Y"
  • "Trade X for Y"
  • "Exchange X to Y"
  • "Convert X to Y"

Input Extraction

Extract these parameters from the user's message:

ParameterRequiredDefaultSource
--------------------------------------
tokenInYesToken name/symbol/address
tokenOutYesToken name/symbol/address
amountYesNumeric value
chainNoethereumChain name or context
slippageNo0.5%Explicit percentage
routingNoauto"via V3", "use UniswapX", etc.

Workflow

  1. Validate inputs: Resolve token symbols using search_tokens. Confirm chain is supported.
  1. Pre-flight safety check: Call check_safety_status to verify:
    • Spending limits have room for this trade
    • Rate limits are not exhausted
    • Circuit breaker is not tripped
  1. Delegate to trade-executor: Launch Task(subagent_type:trade-executor) with:
    • tokenIn, tokenOut, amount, chain
    • slippageTolerance (in bps)
    • routingPreference (auto/v2/v3/v4/uniswapx)
  1. Report result to the user in a clear format:
Swap Executed Successfully

  Input:  500.00 USDC
  Output: 0.1538 WETH ($499.55)
  Price:  1 WETH = $3,248.04
  Impact: 0.01%
  Gas:    $0.42

  Tx: https://basescan.org/tx/0xABC...

  Safety: All 7 checks passed

Error Handling

ErrorUser MessageSuggested Action
-------------------------------------
SAFETY_SPENDING_LIMIT_EXCEEDED"This swap would exceed your $X daily limit."Reduce amount or wait
SAFETY_TOKEN_NOT_ALLOWED"TOKEN is not on your allowlist."Add to config
SAFETY_SIMULATION_FAILED"Swap simulation failed: [reason]."Check addresses, try smaller
INSUFFICIENT_LIQUIDITY"Not enough liquidity at acceptable slippage."Try smaller amount

MCP server dependency

This skill relies on Uniswap MCP tools for chain support lookup, token search, safety checks, and swap execution.

When used in isolation (for example, from a skills catalog), ensure the Agentic Uniswap MCP server is running:

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 02:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Code Review

wpank
涵盖安全、性能、可维护性、正确性和测试的系统化代码审查模式,包含严重等级、结构化反馈指南、审查流程及需避免的反模式。适用于审查 PR、建立审查标准或提升审查质量。
★ 31 📥 17,134
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 244,100
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,061 📥 799,434