Uniswap
Assist with Uniswap swaps, liquidity provision, and avoiding common DeFi losses.
Best use case
Uniswap is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Assist with Uniswap swaps, liquidity provision, and avoiding common DeFi losses.
Teams using Uniswap should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/uniswap/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Uniswap Compares
| Feature / Agent | Uniswap | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Assist with Uniswap swaps, liquidity provision, and avoiding common DeFi losses.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## Swap Execution - Slippage tolerance sets max acceptable price change — 0.5% for stablecoins, 1-3% for volatile pairs, higher for low liquidity tokens - "Price impact" and "slippage" are different — impact is immediate effect of your trade size, slippage is protection against price movement - High price impact (>2%) means you're moving the market — split large trades or use limit orders on Uniswap X - Transaction deadline prevents stale swaps — 20-30 minutes default is usually fine, but pending tx beyond deadline will fail ## MEV and Frontrunning - Public swaps on Uniswap are visible in mempool before execution — bots can sandwich your trade - Use MEV protection: swap through Uniswap wallet (built-in protection), or connect via Flashbots Protect RPC - Signs of sandwich: execution price worse than quoted, with suspicious buy before and sell after your tx - Uniswap X routes through private order flow — significantly reduces MEV extraction ## Token Approval Traps - First swap of any token requires approval transaction — this is normal, costs gas, and happens once per token per spender - "Infinite approval" is the default — convenient but risky if Uniswap router is ever compromised - Check and revoke old approvals at revoke.cash — approvals persist forever until explicitly revoked - Approval transaction can succeed while swap fails — user pays gas for approval but swap reverts on slippage ## Fake Tokens - Anyone can create a token with any name and symbol — "USDC" on Uniswap might not be real USDC - Always verify token contract address on CoinGecko, CoinMarketCap, or project's official site - Warning signs: no liquidity, recently created, honeypot (can buy but not sell), tax on transfer - Uniswap shows warning for unverified tokens — don't ignore it, especially for tokens you found via links ## Liquidity Provision - Impermanent loss is real and permanent when you withdraw — LPs lose vs just holding when prices diverge - V3 concentrated liquidity amplifies both gains and losses — narrow range means more fees but higher IL risk - Out-of-range positions earn zero fees — price moves outside your range, you hold 100% of the depreciating asset - V2 is simpler: full range, less management, but less capital efficient — consider for volatile pairs you want to forget ## V3 Position Management - Narrower range = more fees per dollar but more rebalancing — only worth it if you actively manage - Gas costs to adjust positions add up — each add/remove liquidity is a transaction - "Collect fees" is separate from "remove liquidity" — uncollected fees stay in the position - NFT represents your V3 position — losing the NFT means losing access to the liquidity ## Gas Optimization - Approve + swap is two transactions on first use — budget gas for both - L2s (Arbitrum, Base, Optimism) have Uniswap with 10-50x lower fees — same interface, same liquidity depth - Swapping during low gas periods (weekends, UTC night) saves significantly on mainnet - Failed transactions still cost gas — simulate first if unsure about slippage or liquidity ## Failed Swap Causes - "Insufficient liquidity" — try smaller amount or different route - "Slippage exceeded" — price moved during pending period, increase slippage or retry - "Transfer failed" — token has transfer tax or restrictions, may be a scam token - "Deadline exceeded" — transaction was pending too long, just retry - "Approve first" — need to approve token before swap, this is normal ## Uniswap X and Limit Orders - Uniswap X uses off-chain orders filled by market makers — no gas if order isn't filled - Limit orders let you set target price — order sits until price is reached or expires - Partial fills possible — large orders may fill incrementally - Check order status in the app — pending orders can be cancelled ## Safety Checklist Before Large Swaps - Verify token contract address matches official source - Check price impact percentage — high impact means bad execution - Confirm slippage is set appropriately for the pair - Use MEV protection for mainnet trades - Consider splitting very large trades - Double-check recipient address if sending to different wallet
Related Skills
uniswap-v4
Swap tokens and read pool state on Uniswap V4 (Base, Ethereum). Use when the agent needs to: (1) swap ERC20 tokens or ETH via Uniswap V4, (2) get pool info (price, tick, liquidity, fees), (3) find the best pool for a token pair, (4) quote expected swap output via the on-chain V4Quoter, (5) set up Permit2 approvals for the Universal Router, or (6) execute exact-input swaps with proper slippage protection. Supports Base and Ethereum mainnet, plus Base Sepolia testnet. TypeScript with strict types. Write operations need a private key via env var.
uniswap-v4-tools
Tools for querying V4 pools, swap quotes, and hook-enabled liquidity pools.
uniswap-v4-pools
Query and execute swaps on Uniswap V4 pools with hook-enabled custom logic and advanced pool configurations.
uniswap-v4-hooks
Query and execute swaps on Uniswap V4 pools with custom hooks architecture.
uniswap-v4-agent
Execute swaps and query pool info on Uniswap V4 with hooks support across Ethereum, Base, Arbitrum, and Optimism.
uniswap-v4-agent-hooks
Toolkit for AI agents to interact with Uniswap V4 hooks and custom pool configurations.
uniswap-swap-simulation
Simulate and analyze Uniswap swaps including price impact, slippage, optimal routing, and gas estimation. Use when the user asks about swap execution, routing, price impact, or MEV considerations.
uniswap-poolspy
Track newly created Uniswap liquidity pools across 9 networks. Monitor new token listings and early liquidity events in real-time.
uniswap-pool-analysis
Analyze Uniswap pool data including liquidity distribution, fee tiers, tick ranges, and TVL. Use when the user asks about pool metrics, liquidity analysis, or wants to query on-chain pool state.
uniswap-mcp-server
MCP server for Uniswap DEX enabling AI agents to get quotes and execute swaps across all supported chains.
uniswap-agentic-trader
AI agent that autonomously executes DeFi trading strategies through the Uniswap Developer Platform API.
uniswap-agent-sdk
Official SDK for building AI agents that interact with Uniswap pools, swaps, and liquidity provision.