← Back to Skills Marketplace
wpank

Uniswap Create Test Pool

by wpank · GitHub ↗ · v0.1.0
cross-platform ✓ Security Clean
759
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install create-test-pool
Description
Deploy a custom Uniswap pool on the local testnet with configurable parameters. Create pools with specific conditions (thin liquidity, wide spreads, exact tick ranges) to test agent behavior under controlled scenarios. Requires a running local testnet.
README (SKILL.md)

Create Test Pool

Overview

Deploys a custom Uniswap pool on the local testnet with exact parameters you specify. This lets you create controlled test environments -- thin liquidity pools, extreme price ranges, specific fee tiers -- to test how agents behave under edge conditions.

Why this is 10x better than doing it manually:

  1. No Solidity scripting: Creating a V3 pool manually requires calling createAndInitializePoolIfNecessary, computing sqrtPriceX96, calculating tick ranges, approving tokens, and calling mint. This does it all with natural language.
  2. Token resolution: Say "WETH/USDC" and it resolves addresses, decimals, and sorts tokens correctly. No need to look up contract addresses.
  3. Automatic funding: If the deployer account doesn't have enough tokens, the tool handles whale impersonation to fund the deployment.
  4. Price-to-tick conversion: Specify a price like "2000" (USDC per WETH) and the tool computes the correct sqrtPriceX96 and tick range.
  5. Edge case testing: Create pools with $100 liquidity to test thin-market behavior, or pools at extreme prices to test boundary conditions.
  6. Verification: After deployment, you can immediately query the pool with get_pool_info to confirm state.

When to Use

Activate when the user says anything like:

  • "Create a WETH/USDC pool with thin liquidity"
  • "Deploy a test pool with 0.05% fee"
  • "Set up a DAI/USDC pool at 1:1"
  • "Create a pool with only $1000 liquidity"
  • "Deploy a V2 pair for testing"
  • "I need a pool with a narrow tick range"
  • "Create a WBTC/WETH pool at the current price"
  • "Set up a pool to test high slippage scenarios"

Do NOT use when no testnet is running (use setup-local-testnet first), or when the user wants to interact with existing mainnet pools (use analyze-pool).

Parameters

Parameter Required Default How to Extract
token0 Yes -- First token: "WETH", "USDC", or a 0x address
token1 Yes -- Second token: "USDC", "DAI", or a 0x address
version No v3 "v2" or "v3"
fee No 3000 Fee tier: 100 (0.01%), 500 (0.05%), 3000 (0.3%), 10000 (1%)
initialPrice No -- Price of token0 in token1 terms (e.g. 2000 for ETH at $2000)
liquidityUsd No 1,000,000 Dollar value of initial liquidity
tickLower No auto V3 lower tick (advanced users only)
tickUpper No auto V3 upper tick (advanced users only)

Workflow

Step 1: Verify Testnet is Running

If the tool returns TESTNET_NOT_RUNNING, tell the user:

No local testnet is running. Let me set one up first.

Then suggest using setup-local-testnet or offer to do it for them.

Step 2: Extract Parameters

Parse the user's request carefully:

  • Token pair: "WETH/USDC", "ETH/DAI", "WBTC/WETH"
    • Map "ETH" to "WETH" (Uniswap uses wrapped ETH)
  • Fee tier: "0.05% fee" → 500, "0.3%" → 3000, "1%" → 10000, "0.01%" → 100
  • Price: "at $2000" → initialPrice: 2000 (for WETH/USDC)
  • Liquidity: "thin liquidity" → liquidityUsd: 1000, "$10M" → liquidityUsd: 10000000
  • Version: "V2 pair" → version: "v2", default is "v3"

Common liquidity descriptions:

  • "thin" / "low" / "shallow" → $1,000 - $10,000
  • "moderate" / "normal" → $100,000 - $1,000,000
  • "deep" / "high" → $10,000,000+

Step 3: Fund Deployer If Needed

If the pool requires tokens the deployer might not have, call mcp__uniswap__fund_test_account first to ensure the deployer (account #1: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266) has sufficient tokens.

Step 4: Deploy the Pool

Call mcp__uniswap__deploy_mock_pool with the extracted parameters.

Step 5: Verify and Present

Present the deployed pool with full details:

Test Pool Deployed

  Pool:       WETH/USDC (V3, 0.05% fee)
  Address:    0xNEW...
  Price:      1 WETH = 2,000 USDC
  Liquidity:  ~$1,000,000
  Tick Range: -204714 to -199514 (±50% around current price)

  Token0: USDC  0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48  (6 decimals)
  Token1: WETH  0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2  (18 decimals)

  Test Scenarios This Pool Enables:
  - Swap testing: "Get a quote for 1 WETH → USDC"
  - LP testing: "Add liquidity to the WETH/USDC pool"
  - Price impact: "What's the price impact of swapping 100 WETH?"
  - Time-dependent: "Advance 7 days and check fee accumulation"

Step 6: Suggest Follow-ups

  Next Steps:
  - Query pool state: "Get info on pool 0xNEW..."
  - Test a swap against this pool
  - Create another pool with different parameters
  - Advance time to test fee accumulation: "Time travel 7 days"

Important Notes

  • Tokens are automatically sorted. Uniswap requires token0 \x3C token1 by address. The tool handles this.
  • V3 pools need initialization. The tool calls createAndInitializePoolIfNecessary which sets the initial price.
  • Default tick range is ±50%. If no tick range is specified, liquidity is spread across a wide range around the initial price.
  • Deployer is Anvil account #1. The first Anvil default account is used for deployment.
  • Pool may already exist on fork. If you fork Ethereum and try to create a WETH/USDC 0.05% pool, it already exists. The tool will add liquidity to the existing pool.
  • V2 pools always have 0.3% fee. The fee parameter is ignored for V2.

Error Handling

Error User-Facing Message Suggested Action
TESTNET_NOT_RUNNING "No local testnet is running." Run setup-local-testnet first
TESTNET_TOKEN_NOT_FOUND "Cannot resolve token X." Use a well-known symbol or provide the 0x address
TESTNET_CONTRACT_NOT_FOUND "NonfungiblePositionManager not found on this chain." Fork Ethereum mainnet which has all V3 contracts
TESTNET_DEPLOY_POOL_FAILED "Failed to deploy pool: {reason}" Check token balances, fund deployer if needed
Usage Guidance
This skill appears internally coherent for deploying Uniswap test pools on a local testnet. Before installing, ensure: (1) you run it only against an isolated local testnet (never mainnet); (2) you trust the platform-provided mcp__uniswap__* tools that will actually perform deployments and 'whale impersonation' (review those tool implementations if possible); (3) you accept that the model may autonomously call the allowed tools unless your agent enforces confirmation prompts; and (4) the skill has no published source/homepage in the metadata—if you need auditability, request or inspect the underlying tool implementations or the repository referenced in the README before use.
Capability Analysis
Type: OpenClaw Skill Name: create-test-pool Version: 0.1.0 The skill is designed to deploy custom Uniswap pools on a local testnet for testing purposes. All instructions in `SKILL.md` guide the AI agent to use pre-approved tools (`mcp__uniswap__deploy_mock_pool`, `mcp__uniswap__fund_test_account`, etc.) exclusively within a 'local testnet' environment, explicitly mentioning 'Anvil account #1' and 'mock pool'. There is no evidence of intent to exfiltrate data, establish persistence, execute arbitrary remote code, or perform prompt injection against the agent for malicious purposes. The installation instructions in `README.md` use standard `npx` commands pointing to a GitHub repository, which is a common and acceptable practice for skill distribution.
Capability Assessment
Purpose & Capability
Name/description (create local Uniswap test pools) align with the declared instructions and allowed tools (deploy_mock_pool, fund_test_account, get_pool_info, search_tokens). No unrelated environment variables, binaries, or config paths are requested.
Instruction Scope
SKILL.md stays on-topic: extract parameters, fund a test deployer, deploy a pool, and verify. One noteworthy behavior: it explicitly describes 'whale impersonation' / automatic funding of the deployer account. That is coherent for a local testnet but implies the skill (via the allowed tool) will perform account impersonation or node-level actions — expected for local test environments, but something to be aware of.
Install Mechanism
Instruction-only skill with no install spec or code files. Nothing is written to disk by the skill itself, so install risk is minimal.
Credentials
No environment variables, secrets, or external credentials are requested. The declared needs are proportionate to the described functionality.
Persistence & Privilege
The skill is not marked 'always' and has no explicit disableModelInvocation flag, so the model could invoke it autonomously when eligible. Because it performs actions on a local testnet rather than accessing external secrets, this is lower risk, but be aware it can trigger deployments/funding on your local testnet without additional manual confirmation unless your agent/platform enforces prompt-level approvals.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install create-test-pool
  3. After installation, invoke the skill by name or use /create-test-pool
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release: Easily deploy custom Uniswap pools on a local testnet with configurable parameters for controlled agent testing. - Deploys V2 or V3 pools with chosen tokens, price, fee, liquidity, and tick range. - Resolves token addresses/symbols, sets up initial liquidity, and auto-funds test accounts. - Handles price-to-tick math, token sorting, and selects defaults for sensible edge-case testing. - Includes built-in error handling and next-step guidance after pool creation. - Requires a running local testnet; suggests setup if not detected.
Metadata
Slug create-test-pool
Version 0.1.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Uniswap Create Test Pool?

Deploy a custom Uniswap pool on the local testnet with configurable parameters. Create pools with specific conditions (thin liquidity, wide spreads, exact tick ranges) to test agent behavior under controlled scenarios. Requires a running local testnet. It is an AI Agent Skill for Claude Code / OpenClaw, with 759 downloads so far.

How do I install Uniswap Create Test Pool?

Run "/install create-test-pool" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Uniswap Create Test Pool free?

Yes, Uniswap Create Test Pool is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Uniswap Create Test Pool support?

Uniswap Create Test Pool is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Uniswap Create Test Pool?

It is built and maintained by wpank (@wpank); the current version is v0.1.0.

💬 Comments