liquidity-planner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLiquidity Position Planning
流动性头寸规划
Plan and generate deep links for creating liquidity positions on Uniswap v2, v3, and v4.
Runtime Compatibility: This skill usesfor interactive prompts. IfAskUserQuestionis not available in your runtime, collect the same parameters through natural language conversation instead.AskUserQuestion
为在Uniswap v2、v3和v4上创建流动性头寸提供规划并生成深度链接。
运行时兼容性: 本Skill使用实现交互式提示。如果你的运行环境不支持AskUserQuestion,请通过自然语言对话收集相同的参数。AskUserQuestion
Overview
概述
Plan liquidity positions by:
- Gathering LP intent (token pair, amount, version)
- Checking current pool price and liquidity
- Suggesting price ranges based on current price
- 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) may fail in SSH, containerized, or headless environments. Always display the URL prominently so users can copy and access it manually if needed.open
通过以下步骤规划流动性头寸:
- 收集LP意向(代币对、数量、版本)
- 查看当前资金池价格和流动性情况
- 根据当前价格建议价格区间
- 生成可直接打开Uniswap界面并预填参数的深度链接
生成的链接会打开Uniswap,所有参数已准备就绪,可直接创建头寸。
注意: 在SSH、容器化或无头环境中,使用/xdg-open打开浏览器可能会失败。请始终突出显示URL,以便用户在需要时手动复制访问。open
Workflow
工作流程
Step 1: Gather LP Intent
步骤1:收集LP意向
Extract from the user's request:
| Parameter | Required | Default | Example |
|---|---|---|---|
| Token A | Yes | - | ETH, USDC, address |
| Token B | Yes | - | USDC, WBTC, address |
| Amount | Yes | - | 1 ETH, $1000 |
| Chain | No | Ethereum | Base, Arbitrum |
| Version | No | V3 | v2, v3, v4 |
| Fee Tier | No | Auto | 0.05%, 0.3%, 1% |
| Price Range | No | Suggest | Full 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 |
| Chain | 否 | Ethereum | Base, Arbitrum |
| Version | 否 | V3 | v2, v3, v4 |
| Fee Tier | 否 | Auto | 0.05%, 0.3%, 1% |
| Price Range | 否 | Suggest | Full 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 for common tokens by chain.
../../references/chains.mdFor 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
undefinedGet 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 })'
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 })'
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 Range | Assessment | Recommendation |
|---|---|---|
| > $1M | Deep liquidity | Safe for most position sizes |
| $100K - $1M | Moderate | Suitable for positions up to ~$10K |
| $10K - $100K | Thin | Warn user about slippage risk, suggest smaller positions |
| < $10K | Very thin | Warn 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 for full API details.
references/data-providers.mdGet pool APY and volume with DefiLlama:
bash
undefined在建议价格区间之前,请获取资金池数据以做出明智决策。请参考获取完整的API详情。
references/data-providers.md使用DefiLlama获取资金池APY和交易量:
bash
undefinedFind 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:**
```bashcurl -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获取当前价格:**
```bashGet 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 }'
jq '[.[] | select(.dexId == "uniswap")][0] | { baseTokenPrice: .baseToken.priceUsd, quoteTokenPrice: .quoteToken.priceUsd }'
**Compare fee tiers (if APY data available):**
```bashcurl -s "https://api.dexscreener.com/token-pairs/v1/{network}/{address}" |
jq '[.[] | select(.dexId == "uniswap")][0] | { baseTokenPrice: .baseToken.priceUsd, quoteTokenPrice: .quoteToken.priceUsd }'
jq '[.[] | select(.dexId == "uniswap")][0] | { baseTokenPrice: .baseToken.priceUsd, quoteTokenPrice: .quoteToken.priceUsd }'
**比较手续费层级(如果有APY数据):**
```bashFind 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:
| Fee | Tick Spacing | Best For |
|---|---|---|
| 0.01% (100) | 1 | Stablecoin pairs |
| 0.05% (500) | 10 | Correlated pairs (ETH/stETH) |
| 0.30% (3000) | 60 | Most pairs (default) |
| 1.00% (10000) | 200 | Exotic/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/createURL Parameters:
| Parameter | Description | Format |
|---|---|---|
| Network name | |
| First token | Address or |
| Second token | Address or |
| Range configuration | JSON (encode quotes only) |
| Deposit amounts | JSON (encode quotes only) |
| Fee tier configuration | JSON (encode quotes only) |
| v4 hook address (optional) | Address or |
| Flow step | |
IMPORTANT: URL Encoding
Only encode the double quotes ( → ) in JSON values. Do NOT encode braces or colons .
"%22{}: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 for currencyA, for currencyB.
TOKEN0TOKEN1fee JSON structure:
json
{ "feeAmount": 3000, "tickSpacing": 60, "isDynamic": false }Tick spacing by fee:
| Fee | Tick 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/createURL参数:
| 参数 | 描述 | 格式 |
|---|---|---|
| 网络名称 | |
| 第一个代币 | 地址或 |
| 第二个代币 | 地址或 |
| 区间配置 | JSON(仅转义双引号) |
| 存入金额 | JSON(仅转义双引号) |
| 手续费层级配置 | JSON(仅转义双引号) |
| v4钩子地址(可选) | 地址或 |
| 流程步骤 | |
重要提示: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" } }注意:对应,对应。
currencyATOKEN0currencyBTOKEN1fee 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:
- Summary of the position parameters
- Price range visualization (if not full range)
- Considerations about IL and management
- Open the browser automatically using system command
Example output format:
markdown
undefined按以下格式展示响应:
- 头寸参数摘要
- 价格区间可视化(如果不是全区间)
- 关于无常损失和头寸管理的注意事项
- 使用系统命令自动打开浏览器
示例输出格式:
markdown
undefinedLiquidity Position Summary
流动性头寸摘要
| Parameter | Value |
|---|---|
| Pair | ETH / USDC |
| Chain | Base |
| Version | V3 |
| Fee Tier | 0.30% |
| Deposit | 1 ETH + equivalent USDC |
| 参数 | 值 |
|---|---|
| 代币对 | ETH / USDC |
| 链 | Base |
| 版本 | V3 |
| 手续费层级 | 0.30% |
| 存入金额 | 1 ETH + 等额USDC |
Pool Analytics
资金池分析
| Metric | Value |
|---|---|
| Current APY | 12.5% |
| 24h Volume | $2.1M |
| 7d Volume | $14.8M |
| Pool TVL | $15.2M |
| 指标 | 值 |
|---|---|
| 当前APY | 12.5% |
| 24小时交易量 | $2.1M |
| 7天交易量 | $14.8M |
| 资金池总锁仓价值 | $15.2M |
Price Range
价格区间
| Metric | Value |
|---|---|
| Current Price | ~3,200 USDC per ETH |
| Min Price | 2,800 USDC per ETH |
| Max Price | 3,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:**
```bashLinux - note: only quotes are encoded (%22), not braces or colons
Linux - 注意:仅转义双引号(%22),不转义大括号或冒号
macOS
macOS
open "https://app.uniswap.org/positions/create?..."
**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.
open "https://app.uniswap.org/positions/create?..."
**环境限制:** 在远程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.mdQuick 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 for version availability by chain.
references/position-types.md支持所有Uniswap兼容链 - 请参考查看各链支持的版本。
references/position-types.mdAdditional Resources
额外资源
Reference Files
参考文件
- - Chain configuration and token addresses (shared with swap-planner)
../../references/chains.md - - v2/v3/v4 differences, fee tiers, tick spacing
references/position-types.md - - DexScreener and DefiLlama APIs for pool discovery and yields
references/data-providers.md
- - 链配置和代币地址(与swap-planner共享)
../../references/chains.md - - v2/v3/v4差异、手续费层级、刻度间距
references/position-types.md - - 用于资金池发现和收益率查询的DexScreener与DefiLlama API
references/data-providers.md
URL Encoding
URL编码
JSON parameters in deep links should have only double quotes encoded ( → ). Do NOT encode braces , colons , or commas .
"%22{}:,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语法冲突。