liquidity-planner

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Liquidity Position Planning

流动性头寸规划

Plan and generate deep links for creating liquidity positions on Uniswap v2, v3, and v4.
Runtime Compatibility: This skill uses
AskUserQuestion
for interactive prompts. If
AskUserQuestion
is not available in your runtime, collect the same parameters through natural language conversation instead.
为在Uniswap v2、v3和v4上创建流动性头寸提供规划并生成深度链接。
运行时兼容性: 本Skill使用
AskUserQuestion
实现交互式提示。如果你的运行环境不支持
AskUserQuestion
,请通过自然语言对话收集相同的参数。

Overview

概述

Plan liquidity positions by:
  1. Gathering LP intent (token pair, amount, version)
  2. Checking current pool price and liquidity
  3. Suggesting price ranges based on current price
  4. Generating a deep link that opens in the Uniswap interface with parameters pre-filled
The generated link opens Uniswap with all parameters ready for position creation.
Note: Browser opening (
xdg-open
/
open
) may fail in SSH, containerized, or headless environments. Always display the URL prominently so users can copy and access it manually if needed.
通过以下步骤规划流动性头寸:
  1. 收集LP意向(代币对、数量、版本)
  2. 查看当前资金池价格和流动性情况
  3. 根据当前价格建议价格区间
  4. 生成可直接打开Uniswap界面并预填参数的深度链接
生成的链接会打开Uniswap,所有参数已准备就绪,可直接创建头寸。
注意: 在SSH、容器化或无头环境中,使用
xdg-open
/
open
打开浏览器可能会失败。请始终突出显示URL,以便用户在需要时手动复制访问。

Workflow

工作流程

Step 1: Gather LP Intent

步骤1:收集LP意向

Extract from the user's request:
ParameterRequiredDefaultExample
Token AYes-ETH, USDC, address
Token BYes-USDC, WBTC, address
AmountYes-1 ETH, $1000
ChainNoEthereumBase, Arbitrum
VersionNoV3v2, v3, v4
Fee TierNoAuto0.05%, 0.3%, 1%
Price RangeNoSuggestFull range, ±5%, custom
If any required parameter is missing, use AskUserQuestion with structured options:
For missing chain:
json
{
  "questions": [
    {
      "question": "Which chain do you want to provide liquidity on?",
      "header": "Chain",
      "options": [
        { "label": "Base (Recommended)", "description": "Low gas, growing DeFi ecosystem" },
        { "label": "Ethereum", "description": "Deepest liquidity, higher gas" },
        { "label": "Arbitrum", "description": "Low fees, high volume" },
        { "label": "Optimism", "description": "Low fees, Ethereum L2" }
      ],
      "multiSelect": false
    }
  ]
}
For missing token pair:
json
{
  "questions": [
    {
      "question": "Which token pair do you want to provide liquidity for?",
      "header": "Pair",
      "options": [
        { "label": "ETH / USDC", "description": "Most popular pair, high volume" },
        { "label": "ETH / USDT", "description": "High volume stablecoin pair" },
        { "label": "WBTC / ETH", "description": "Blue chip crypto pair" },
        { "label": "Custom pair", "description": "Specify your own tokens" }
      ],
      "multiSelect": false
    }
  ]
}
Always use forms instead of plain text questions for better UX.
从用户请求中提取以下信息:
参数必填默认值示例
Token A-ETH, USDC, 地址
Token B-USDC, WBTC, 地址
Amount-1 ETH, $1000
ChainEthereumBase, Arbitrum
VersionV3v2, v3, v4
Fee TierAuto0.05%, 0.3%, 1%
Price RangeSuggestFull range, ±5%, custom
如果缺少任何必填参数,请使用带结构化选项的
AskUserQuestion
当缺少Chain时:
json
{
  "questions": [
    {
      "question": "Which chain do you want to provide liquidity on?",
      "header": "Chain",
      "options": [
        { "label": "Base (Recommended)", "description": "Low gas, growing DeFi ecosystem" },
        { "label": "Ethereum", "description": "Deepest liquidity, higher gas" },
        { "label": "Arbitrum", "description": "Low fees, high volume" },
        { "label": "Optimism", "description": "Low fees, Ethereum L2" }
      ],
      "multiSelect": false
    }
  ]
}
当缺少代币对时:
json
{
  "questions": [
    {
      "question": "Which token pair do you want to provide liquidity for?",
      "header": "Pair",
      "options": [
        { "label": "ETH / USDC", "description": "Most popular pair, high volume" },
        { "label": "ETH / USDT", "description": "High volume stablecoin pair" },
        { "label": "WBTC / ETH", "description": "Blue chip crypto pair" },
        { "label": "Custom pair", "description": "Specify your own tokens" }
      ],
      "multiSelect": false
    }
  ]
}
为获得更好的用户体验,请始终使用表单而非纯文本提问。

Step 2: Resolve Token Addresses

步骤2:解析代币地址

Resolve token symbols to addresses. See
../../references/chains.md
for common tokens by chain.
For unknown tokens, use web search and verify on-chain.
将代币符号解析为对应地址。请参考
../../references/chains.md
获取各链的常用代币信息。
对于未知代币,请使用网络搜索并在链上验证其地址。

Input Validation (Required Before Any Shell Command)

输入验证(执行任何Shell命令前必须完成)

Before interpolating user-provided values into any shell command, validate all inputs:
  • Token addresses MUST match:
    ^0x[a-fA-F0-9]{40}$
  • Chain/network names MUST be from the allowed list in
    ../../references/chains.md
  • Amounts MUST be valid decimal numbers (match:
    ^[0-9]+\.?[0-9]*$
    )
  • Reject any input containing shell metacharacters (
    ;
    ,
    |
    ,
    $
    ,
    `
    ,
    &
    ,
    (
    ,
    )
    ,
    >
    ,
    <
    ,
    \
    )
在将用户提供的参数插入任何Shell命令之前,请验证所有输入:
  • 代币地址必须匹配正则:
    ^0x[a-fA-F0-9]{40}$
  • 链/网络名称必须来自
    ../../references/chains.md
    中的允许列表
  • 数量必须是有效的十进制数(匹配正则:
    ^[0-9]+\.?[0-9]*$
  • 拒绝任何包含Shell元字符的输入(
    ;
    ,
    |
    ,
    $
    ,
    `
    ,
    &
    ,
    (
    ,
    )
    ,
    >
    ,
    <
    ,
    \

Step 3: Discover Available Pools

步骤3:查找可用资金池

Before fetching metrics, verify the pool exists and discover available fee tiers.
Find pools for a token using DexScreener:
bash
undefined
在获取指标之前,请验证资金池是否存在并发现可用的手续费层级。
使用DexScreener查找代币的所有Uniswap资金池:
bash
undefined

Get all Uniswap pools for a token (replace {network} and {address})

Get all Uniswap pools for a token (replace {network} and {address})

IMPORTANT: Validate address matches ^0x[a-fA-F0-9]{40}$ and network is from allowed list

IMPORTANT: Validate address matches ^0x[a-fA-F0-9]{40}$ and network is from allowed list

curl -s "https://api.dexscreener.com/token-pairs/v1/{network}/{address}" |
jq '[.[] | select(.dexId == "uniswap")] | map({ pairAddress, pair: "(.baseToken.symbol)/(.quoteToken.symbol)", version: .labels[0], liquidity: .liquidity.usd, volume24h: .volume.h24 })'

**Network IDs:** `ethereum`, `base`, `arbitrum`, `optimism`, `polygon`, `unichain`

**From the results, identify:**

- Available pools and their addresses (multiple = different fee tiers)
- Pool TVL (`liquidity.usd`) to assess liquidity depth
- Version (v3 or v4) from `labels[0]`

**If no Uniswap pools found:** The pair may not have an existing pool. Inform the user they would be creating a new pool and setting the initial price.
curl -s "https://api.dexscreener.com/token-pairs/v1/{network}/{address}" |
jq '[.[] | select(.dexId == "uniswap")] | map({ pairAddress, pair: "(.baseToken.symbol)/(.quoteToken.symbol)", version: .labels[0], liquidity: .liquidity.usd, volume24h: .volume.h24 })'

**网络ID:** `ethereum`, `base`, `arbitrum`, `optimism`, `polygon`, `unichain`

**从结果中确认:**

- 可用资金池及其地址(多个地址代表不同手续费层级)
- 资金池总锁仓价值(TVL,`liquidity.usd`),用于评估流动性深度
- 从`labels[0]`获取版本信息(v3或v4)

**如果未找到Uniswap资金池:** 该代币对可能尚未创建资金池。请告知用户他们将创建新资金池并设置初始价格。

Step 4: Assess Pool Liquidity

步骤4:评估资金池流动性

Evaluate if the pool has sufficient liquidity:
TVL RangeAssessmentRecommendation
> $1MDeep liquiditySafe for most position sizes
$100K - $1MModerateSuitable for positions up to ~$10K
$10K - $100KThinWarn user about slippage risk, suggest smaller positions
< $10KVery thinWarn strongly - high IL risk, price impact on entry/exit
For thin liquidity pools, present a warning:
markdown
⚠️ **Low Liquidity Warning**

This pool has only ${tvl} TVL. Consider:

- Your position will be a significant % of the pool
- Entry/exit may move the price against you
- Impermanent loss risk is amplified in thin pools
- You may want to use a wider price range for safety
评估资金池是否具备足够的流动性:
TVL范围评估结果建议
> $1M深度流动性适合大多数头寸规模
$100K - $1M中等流动性适合规模不超过约$10K的头寸
$10K - $100K流动性稀薄警告用户注意滑点风险,建议减小头寸规模
< $10K流动性极稀薄强烈警告 - 无常损失风险高,进出资金会对价格产生影响
对于流动性稀薄的资金池,请显示以下警告:
markdown
⚠️ **低流动性警告**

该资金池的总锁仓价值仅为${tvl}。请考虑:

- 你的头寸将占资金池的较大比例
- 进出资金可能会导致价格对你不利
- 稀薄资金池会放大无常损失风险
- 为安全起见,你可能需要设置更宽的价格区间

Step 5: Fetch Pool Metrics

步骤5:获取资金池指标

Before suggesting ranges, fetch pool data for informed decisions. See
references/data-providers.md
for full API details.
Get pool APY and volume with DefiLlama:
bash
undefined
在建议价格区间之前,请获取资金池数据以做出明智决策。请参考
references/data-providers.md
获取完整的API详情。
使用DefiLlama获取资金池APY和交易量:
bash
undefined

Find Uniswap V3 pools for a token pair

Find Uniswap V3 pools for a token pair

curl -s "https://yields.llama.fi/pools" | jq '[.data[] | select(.project == "uniswap-v3" and .chain == "Ethereum" and (.symbol | test("WETH.*USDC|USDC.*WETH")))]'

**Response fields to use:**

| Field         | Use For                  |
| ------------- | ------------------------ |
| `apy`         | Show expected yield      |
| `tvlUsd`      | Assess pool depth        |
| `volumeUsd1d` | Estimate fee earnings    |
| `volumeUsd7d` | Check volume consistency |

**Get current prices with DexScreener:**

```bash
curl -s "https://yields.llama.fi/pools" | jq '[.data[] | select(.project == "uniswap-v3" and .chain == "Ethereum" and (.symbol | test("WETH.*USDC|USDC.*WETH")))]'

**需使用的响应字段:**

| 字段         | 用途                  |
| ------------- | ------------------------ |
| `apy`         | 显示预期收益率          |
| `tvlUsd`      | 评估资金池深度        |
| `volumeUsd1d` | 估算手续费收入    |
| `volumeUsd7d` | 检查交易量稳定性 |

**使用DexScreener获取当前价格:**

```bash

Get token prices from the pool data (already fetched in Step 3)

Get token prices from the pool data (already fetched in Step 3)

curl -s "https://api.dexscreener.com/token-pairs/v1/{network}/{address}" |
jq '[.[] | select(.dexId == "uniswap")][0] | { baseTokenPrice: .baseToken.priceUsd, quoteTokenPrice: .quoteToken.priceUsd }'

**Compare fee tiers (if APY data available):**

```bash
curl -s "https://api.dexscreener.com/token-pairs/v1/{network}/{address}" |
jq '[.[] | select(.dexId == "uniswap")][0] | { baseTokenPrice: .baseToken.priceUsd, quoteTokenPrice: .quoteToken.priceUsd }'

**比较手续费层级(如果有APY数据):**

```bash

Find all fee tier variants and compare APY

Find all fee tier variants and compare APY

curl -s "https://yields.llama.fi/pools" | jq '[.data[] | select(.project == "uniswap-v3" and (.symbol | test("WETH.*USDC")))] | map({symbol, tvlUsd, apy, volumeUsd1d})'

If APIs are unavailable, fall back to web search for price estimates.
curl -s "https://yields.llama.fi/pools" | jq '[.data[] | select(.project == "uniswap-v3" and (.symbol | test("WETH.*USDC")))] | map({symbol, tvlUsd, apy, volumeUsd1d})'

如果API不可用,请通过网络搜索获取价格估算。

Step 6: Suggest Price Ranges

步骤6:建议价格区间

Based on current price and pair type, present range options using AskUserQuestion.
For major pairs (ETH/USDC, ETH/WBTC):
json
{
  "questions": [
    {
      "question": "What price range do you want for your position? (Current: ~3,200 USDC/ETH)",
      "header": "Range",
      "options": [
        {
          "label": "±10% (Recommended)",
          "description": "2,880 - 3,520 USDC. Higher fees, monitor weekly"
        },
        { "label": "±20%", "description": "2,560 - 3,840 USDC. Balanced risk/reward" },
        { "label": "±50%", "description": "1,600 - 4,800 USDC. Rarely out of range" },
        { "label": "Full Range", "description": "Never out of range, lower fee efficiency" }
      ],
      "multiSelect": false
    }
  ]
}
For stablecoin pairs (USDC/USDT, DAI/USDC):
json
{
  "questions": [
    {
      "question": "What price range for your stablecoin position?",
      "header": "Range",
      "options": [
        { "label": "±0.5% (Recommended)", "description": "0.995 - 1.005. Tight range, high fees" },
        { "label": "±1%", "description": "0.99 - 1.01. Standard for stables" },
        { "label": "±2%", "description": "0.98 - 1.02. Safer, lower fees" },
        { "label": "Full Range", "description": "Maximum safety, lowest fees" }
      ],
      "multiSelect": false
    }
  ]
}
Recommendation logic:
  • Stablecoin pairs (USDC/USDT): Default to ±0.5-1%
  • Correlated pairs (ETH/stETH): Default to ±2-5%
  • Major pairs (ETH/USDC): Default to ±10-20%
  • Volatile pairs: Default to ±30-50% or full range
根据当前价格和代币对类型,使用
AskUserQuestion
提供区间选项。
对于主流代币对(ETH/USDC、ETH/WBTC):
json
{
  "questions": [
    {
      "question": "What price range do you want for your position? (Current: ~3,200 USDC/ETH)",
      "header": "Range",
      "options": [
        {
          "label": "±10% (Recommended)",
          "description": "2,880 - 3,520 USDC. Higher fees, monitor weekly"
        },
        { "label": "±20%", "description": "2,560 - 3,840 USDC. Balanced risk/reward" },
        { "label": "±50%", "description": "1,600 - 4,800 USDC. Rarely out of range" },
        { "label": "Full Range", "description": "Never out of range, lower fee efficiency" }
      ],
      "multiSelect": false
    }
  ]
}
对于稳定币对(USDC/USDT、DAI/USDC):
json
{
  "questions": [
    {
      "question": "What price range for your stablecoin position?",
      "header": "Range",
      "options": [
        { "label": "±0.5% (Recommended)", "description": "0.995 - 1.005. Tight range, high fees" },
        { "label": "±1%", "description": "0.99 - 1.01. Standard for stables" },
        { "label": "±2%", "description": "0.98 - 1.02. Safer, lower fees" },
        { "label": "Full Range", "description": "Maximum safety, lowest fees" }
      ],
      "multiSelect": false
    }
  ]
}
推荐逻辑:
  • 稳定币对(USDC/USDT):默认选择±0.5-1%
  • 关联代币对(ETH/stETH):默认选择±2-5%
  • 主流代币对(ETH/USDC):默认选择±10-20%
  • 高波动代币对:默认选择±30-50%或全区间

Step 7: Determine Fee Tier

步骤7:确定手续费层级

If multiple fee tiers exist for the pair, let the user choose using pool data from Step 3.
Present fee tier options with APY data:
json
{
  "questions": [
    {
      "question": "Which fee tier? (Based on current pool data)",
      "header": "Fee Tier",
      "options": [
        { "label": "0.30% (Recommended)", "description": "TVL: $15M, APY: 12.5%, highest volume" },
        { "label": "0.05%", "description": "TVL: $8M, APY: 8.2%, lower fees per trade" },
        { "label": "1.00%", "description": "TVL: $2M, APY: 18.1%, less competition" }
      ],
      "multiSelect": false
    }
  ]
}
Fee tier guidelines:
FeeTick SpacingBest For
0.01% (100)1Stablecoin pairs
0.05% (500)10Correlated pairs (ETH/stETH)
0.30% (3000)60Most pairs (default)
1.00% (10000)200Exotic/volatile pairs
v4 Fee Tiers: Dynamic fees possible with hooks. Default to similar V3 tiers.
If pool data shows one tier with significantly higher APY or volume, recommend that tier.
如果代币对存在多个手续费层级,请使用步骤3中的资金池数据让用户选择。
结合APY数据提供手续费层级选项:
json
{
  "questions": [
    {
      "question": "Which fee tier? (Based on current pool data)",
      "header": "Fee Tier",
      "options": [
        { "label": "0.30% (Recommended)", "description": "TVL: $15M, APY: 12.5%, highest volume" },
        { "label": "0.05%", "description": "TVL: $8M, APY: 8.2%, lower fees per trade" },
        { "label": "1.00%", "description": "TVL: $2M, APY: 18.1%, less competition" }
      ],
      "multiSelect": false
    }
  ]
}
手续费层级指南:
手续费刻度间距适用场景
0.01% (100)1稳定币对
0.05% (500)10关联代币对(ETH/stETH)
0.30% (3000)60大多数代币对(默认)
1.00% (10000)200小众/高波动代币对
v4手续费层级: 可通过钩子实现动态手续费。默认使用与V3类似的层级。
如果资金池数据显示某一层级的APY或交易量显著更高,请推荐该层级。

Step 8: Generate Deep Link

步骤8:生成深度链接

Construct the Uniswap position creation URL:
Base URL:
https://app.uniswap.org/positions/create
URL Parameters:
ParameterDescriptionFormat
chain
Network name
ethereum
,
base
, etc.
currencyA
First tokenAddress or
NATIVE
currencyB
Second tokenAddress or
NATIVE
priceRangeState
Range configurationJSON (encode quotes only)
depositState
Deposit amountsJSON (encode quotes only)
fee
Fee tier configurationJSON (encode quotes only)
hook
v4 hook address (optional)Address or
undefined
step
Flow step
1
(for create)
IMPORTANT: URL Encoding
Only encode the double quotes (
"
%22
) in JSON values. Do NOT encode braces
{}
or colons
:
.
priceRangeState JSON structure:
For full range:
json
{
  "priceInverted": false,
  "fullRange": true,
  "minPrice": "",
  "maxPrice": "",
  "initialPrice": "",
  "inputMode": "price"
}
For custom range:
json
{
  "priceInverted": false,
  "fullRange": false,
  "minPrice": "2800",
  "maxPrice": "3600",
  "initialPrice": "",
  "inputMode": "price"
}
depositState JSON structure:
json
{ "exactField": "TOKEN0", "exactAmounts": { "TOKEN0": "1.0" } }
Note: Use
TOKEN0
for currencyA,
TOKEN1
for currencyB.
fee JSON structure:
json
{ "feeAmount": 3000, "tickSpacing": 60, "isDynamic": false }
Tick spacing by fee:
FeeTick Spacing
100 (0.01%)1
500 (0.05%)10
3000 (0.30%)60
10000 (1.00%)200
构建Uniswap头寸创建URL:
基础URL:
https://app.uniswap.org/positions/create
URL参数:
参数描述格式
chain
网络名称
ethereum
,
base
, etc.
currencyA
第一个代币地址或
NATIVE
currencyB
第二个代币地址或
NATIVE
priceRangeState
区间配置JSON(仅转义双引号)
depositState
存入金额JSON(仅转义双引号)
fee
手续费层级配置JSON(仅转义双引号)
hook
v4钩子地址(可选)地址或
undefined
step
流程步骤
1
(用于创建)
重要提示:URL编码
仅转义JSON值中的双引号(
"
%22
)。请勿转义大括号
{}
或冒号
:
priceRangeState JSON结构:
全区间:
json
{
  "priceInverted": false,
  "fullRange": true,
  "minPrice": "",
  "maxPrice": "",
  "initialPrice": "",
  "inputMode": "price"
}
自定义区间:
json
{
  "priceInverted": false,
  "fullRange": false,
  "minPrice": "2800",
  "maxPrice": "3600",
  "initialPrice": "",
  "inputMode": "price"
}
depositState JSON结构:
json
{ "exactField": "TOKEN0", "exactAmounts": { "TOKEN0": "1.0" } }
注意:
currencyA
对应
TOKEN0
currencyB
对应
TOKEN1
fee JSON结构:
json
{ "feeAmount": 3000, "tickSpacing": 60, "isDynamic": false }
手续费对应的刻度间距:
手续费刻度间距
100 (0.01%)1
500 (0.05%)10
3000 (0.30%)60
10000 (1.00%)200

Step 9: Present Output and Open Browser

步骤9:展示结果并打开浏览器

Format the response with:
  1. Summary of the position parameters
  2. Price range visualization (if not full range)
  3. Considerations about IL and management
  4. Open the browser automatically using system command
Example output format:
markdown
undefined
按以下格式展示响应:
  1. 头寸参数摘要
  2. 价格区间可视化(如果不是全区间)
  3. 关于无常损失和头寸管理的注意事项
  4. 使用系统命令自动打开浏览器
示例输出格式:
markdown
undefined

Liquidity Position Summary

流动性头寸摘要

ParameterValue
PairETH / USDC
ChainBase
VersionV3
Fee Tier0.30%
Deposit1 ETH + equivalent USDC
参数
代币对ETH / USDC
Base
版本V3
手续费层级0.30%
存入金额1 ETH + 等额USDC

Pool Analytics

资金池分析

MetricValue
Current APY12.5%
24h Volume$2.1M
7d Volume$14.8M
Pool TVL$15.2M
指标
当前APY12.5%
24小时交易量$2.1M
7天交易量$14.8M
资金池总锁仓价值$15.2M

Price Range

价格区间

MetricValue
Current Price~3,200 USDC per ETH
Min Price2,800 USDC per ETH
Max Price3,600 USDC per ETH
Range Width±12.5%
指标
当前价格~3,200 USDC/ETH
最低价格2,800 USDC/ETH
最高价格3,600 USDC/ETH
区间宽度±12.5%

Considerations

注意事项

  • Impermanent Loss: If ETH moves outside your range, you'll hold 100% of one asset
  • Rebalancing: Monitor position and adjust range if price moves significantly
  • Fee Earnings: Tighter ranges earn more fees but require more active management
  • Gas Costs: Creating and managing positions costs gas
  • APY Note: Shown APY is historical and may vary with market conditions
Opening Uniswap in your browser...

**After displaying the summary, open the URL in the browser:**

```bash
  • 无常损失:如果ETH价格超出你的区间,你将持有100%的单一资产
  • 再平衡:监控头寸,如果价格大幅变动,请调整区间
  • 手续费收益:区间越窄,手续费收益越高,但需要更积极的管理
  • Gas成本:创建和管理头寸需要支付Gas费
  • APY说明:展示的APY为历史数据,可能随市场情况变化
正在打开Uniswap浏览器界面...

**展示摘要后,在浏览器中打开URL:**

```bash

Linux - note: only quotes are encoded (%22), not braces or colons

Linux - 注意:仅转义双引号(%22),不转义大括号或冒号

macOS

macOS


**Environment limitations:** Browser opening may fail in remote SSH, containerized, or headless environments. If `xdg-open`/`open` fails, display the full URL prominently so users can copy and paste it manually:

```markdown
**[Click here to open in Uniswap](https://app.uniswap.org/positions/create?...)**

Or copy this URL: `https://app.uniswap.org/positions/create?...`
Always present the summary and URL so users can review and create the position.

**环境限制:** 在远程SSH、容器化或无头环境中,打开浏览器可能会失败。如果`xdg-open`/`open`执行失败,请突出显示完整URL,以便用户手动复制粘贴:

```markdown
**[点击此处打开Uniswap](https://app.uniswap.org/positions/create?...)**

或复制以下URL:`https://app.uniswap.org/positions/create?...`
请始终展示摘要和URL,以便用户查看并创建头寸。

Version Selection

版本选择

For detailed version comparison (v2/v3/v4 differences, fee tiers, tick spacing), see
references/position-types.md
.
Quick Guide:
  • V2: Full range only, simplest, lowest gas
  • V3: Concentrated liquidity, most common choice
  • V4: Advanced features with hooks, limited availability
如需详细的版本对比(v2/v3/v4差异、手续费层级、刻度间距),请参考
references/position-types.md
快速指南:
  • V2:仅支持全区间,操作最简单,Gas费最低
  • V3:支持集中流动性,最常用的选择
  • V4:通过钩子实现高级功能,目前可用性有限

Important Considerations

重要注意事项

Impermanent Loss (IL)

无常损失(IL)

Warn users about IL risk:
  • IL occurs when token prices diverge from entry price
  • Tighter ranges amplify IL but also fee earnings
  • Full range minimizes IL but reduces fee efficiency
警告用户注意无常损失风险:
  • 当代币价格与入场价格偏离时,会产生无常损失
  • 区间越窄,无常损失越大,但手续费收益也越高
  • 全区间可最小化无常损失,但会降低手续费效率

Position Management

头寸管理

Concentrated liquidity requires active management:
  • Monitor if price stays in range
  • Rebalance when price approaches range boundaries
  • Consider gas costs for position adjustments
集中流动性需要积极管理:
  • 监控价格是否保持在区间内
  • 当价格接近区间边界时,进行再平衡
  • 考虑头寸调整的Gas成本

Capital Requirements

资金要求

For V3 positions with custom range:
  • Depositing single-sided is possible if current price is outside range
  • Within range: both tokens required in ratio determined by price and range
对于V3自定义区间头寸:
  • 如果当前价格超出区间,可单边存入单一代币
  • 如果当前价格在区间内:需要按价格和区间确定的比例存入两种代币

Supported Chains

支持的链

All Uniswap-supported chains - see
references/position-types.md
for version availability by chain.
支持所有Uniswap兼容链 - 请参考
references/position-types.md
查看各链支持的版本。

Additional Resources

额外资源

Reference Files

参考文件

  • ../../references/chains.md
    - Chain configuration and token addresses (shared with swap-planner)
  • references/position-types.md
    - v2/v3/v4 differences, fee tiers, tick spacing
  • references/data-providers.md
    - DexScreener and DefiLlama APIs for pool discovery and yields
  • ../../references/chains.md
    - 链配置和代币地址(与swap-planner共享)
  • references/position-types.md
    - v2/v3/v4差异、手续费层级、刻度间距
  • references/data-providers.md
    - 用于资金池发现和收益率查询的DexScreener与DefiLlama API

URL Encoding

URL编码

JSON parameters in deep links should have only double quotes encoded (
"
%22
). Do NOT encode braces
{}
, colons
:
, or commas
,
.
text
?priceRangeState={%22fullRange%22:true}
Decodes to:
json
{ "fullRange": true }
Why? The Uniswap interface expects JSON-like parameter structure. Full URL encoding of braces and colons breaks parsing. Only quotes need encoding to avoid URL syntax conflicts.
深度链接中的JSON参数仅需转义双引号
"
%22
)。请勿转义大括号
{}
、冒号
:
或逗号
,
text
?priceRangeState={%22fullRange%22:true}
解码后为:
json
{ "fullRange": true }
原因: Uniswap界面期望JSON格式的参数结构。对大括号和冒号进行完整URL编码会导致解析失败。仅转义双引号即可避免URL语法冲突。