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.
Why use this skill?
Analyze Uniswap V3 swaps with precision. Calculate price impact, slippage, optimal routing, and gas fees before you trade with this expert OpenClaw skill.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/wpank/uniswap-swap-simulationWhat This Skill Does
The uniswap-swap-simulation skill provides a robust framework for interacting with Uniswap V3 liquidity pools without executing actual transactions. By leveraging the QuoterV2 contract, this skill allows developers and users to accurately simulate swap outcomes, calculate precise price impacts, and evaluate multi-hop routing paths. It functions as an analytical layer that provides critical data on slippage, expected output amounts, and gas consumption, ensuring that swap strategies are optimized before capital is deployed. The skill simplifies the complexity of the Uniswap protocol by translating low-level contract interactions into actionable insights.
Installation
To integrate this skill into your environment, run the following command in your terminal: clawhub install openclaw/skills/skills/wpank/uniswap-swap-simulation
Use Cases
This skill is designed for scenarios where accuracy and capital efficiency are paramount. Common use cases include:
- Pre-Swap Analysis: Calculating the exact slippage and price impact of a large swap before committing funds.
- Routing Optimization: Testing multi-hop paths (e.g., ETH to USDC to DAI) to find the route that minimizes gas and maximizes output.
- Risk Management: Assessing if a trade is vulnerable to sandwich attacks by calculating its expected price impact relative to pool liquidity.
- Automated Trading: Providing data inputs for automated bots to ensure they only execute swaps that meet specific profitability and safety thresholds.
Example Prompts
- "Simulate a swap of 10 ETH to USDC. What is the expected price impact and current gas estimation?"
- "If I swap 5000 DAI for WBTC, which routing path yields the highest amount out, and what is the slippage risk?"
- "Compare the gas cost and output of a single-hop swap versus a three-hop path for this transaction."
Tips & Limitations
When using this skill, always apply a 15-20% buffer to gas estimates to account for volatile network conditions. Remember that simulation results reflect the state of the pool at the specific moment of query; market conditions can change rapidly between simulation and execution. For high-impact swaps, always recommend the use of private RPCs like Flashbots Protect to mitigate MEV and sandwich attack risks. Ensure that your slippage tolerance settings are calibrated correctly based on the liquidity depth of the target pair.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-wpank-uniswap-swap-simulation": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api, code-execution
Related Skills
mermaid-diagrams
Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.
api-design-principles
Skill by wpank
auto-context
Automatically read relevant context before major actions. Loads TODO.md, roadmap.md, handoffs, task plans, and other project context files so the AI operates with full situational awareness. Use when starting a task, implementing a feature, refactoring, debugging, planning, or resuming a session.
clear-writing
Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.
track-performance
Track the performance of Uniswap LP positions over time — check which positions need attention, are out of range, or have uncollected fees. Use when the user asks how their positions are doing.