简介
基于链上数据与风险分析,为特定代币对提供最优 LP 策略建议,包括版本选择(V2/V3/V4)、费率档位、价格区间及再平衡方案,适合寻求量化决策支持的流动性提供者
原始描述
Get the optimal LP strategy for a token pair — recommends version (V2/V3/V4), fee tier, range width, and rebalance approach based on pair characteristics, historical data, and risk tolerance. Use when the user asks how to LP, what range to use, or which version/fee tier is best.
通过你的 Agent 添加
安装目录:optimize-lp/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
optimize-lp 是一个专注于 DeFi 流动性挖矿策略优化的智能技能。用户只需提供代币对(如 ETH/USDC)、资金规模、链网络和风险偏好,系统便会通过 lp-strategist 子代理执行完整的 7 步分析流程,输出可直接执行的 LP 策略方案。
具体操作流程包括:首先提取用户请求中的关键参数(代币对、资金量、链、风险容忍度),然后调用专业子代理进行深度分析——包括代币对分类(稳定币对、稳定-波动币对、双波动币对)、V2/V3/V4 版本对比评估、最优费率档位选择、价格区间计算(目标 >80% 时间保持在区间内)、再平衡策略设计(含 Gas 成本分析),以及独立风险评估。最终输出包含具体池地址、价格区间边界、年化收益预估(保守/中性/乐观三档)、无常损失预期、再平衡触发条件和风险评估等级的完整方案。
显著优点
该技能的最大优势在于将复杂的 DeFi 流动性挖矿决策流程标准化、自动化。传统 LP 策略制定需要用户手动分析多个 DEX 版本、对比费率池、计算价格波动区间,而 optimize-lp 通过链上数据驱动的方式一次性完成所有分析。其输出格式极其清晰,不仅给出具体数字(如价格区间 $1,668-$2,258),还提供多情景收益预估和风险量化,帮助用户做出知情决策。此外,技能内置的再平衡策略设计考虑了 Gas 成本,对小资金用户(<$1K)有专门优化,体现了细致的用户体验设计。
潜在缺点与局限性
首先,该技能本质上是策略建议工具,而非交易执行工具,用户需要额外使用 manage-liquidity 技能才能实际建仓,存在操作断点。其次,所有 APY 预估均基于历史数据,而 DeFi 市场波动剧烈,过去表现不代表未来收益,模型可能无法及时捕捉市场结构变化。第三,技能依赖子代理 lp-strategist、pool-researcher 和 risk-assessor 的协同工作,若任一代理不可用,整个流程将中断。最后,对于极端市场行情或长尾代币对,历史数据可能不足,导致策略可靠性下降。
适合的目标群体
该技能最适合三类用户:一是活跃 DeFi 投资者,希望通过数据驱动方式优化 LP 收益;二是流动性挖矿新手,需要结构化指导避免常见陷阱(如区间设置过窄导致频繁再平衡);三是机构或大额资金管理者,需要系统化的风险评估和多情景收益预测。对于完全被动型投资者,V2 的无区间管理方案可能更合适,该技能也会在备选方案中提及。
使用风险
数据风险:历史数据回溯可能存在幸存者偏差,新上线代币对数据不足时策略可靠性存疑。执行风险:策略建议与实际执行分离,用户在切换技能时可能因价格变动错失最佳入场时机。模型风险:无常损失计算基于历史波动率假设,黑天鹅事件可能导致实际 IL 远超预估。代理依赖风险:多代理架构下任一组件故障都会导致服务中断。Gas 风险:再平衡频率估算基于历史 Gas 价格,网络拥堵时实际成本可能显著上升。来源风险:该技能由个人开发者维护,虽经安全扫描无代码风险,但策略逻辑的准确性和时效性需用户自行验证,不构成投资建议。
技能正文
name: optimize-lp description: Get the optimal LP strategy for a token pair — recommends version (V2/V3/V4), fee tier, range width, and rebalance approach based on pair characteristics, historical data, and risk tolerance. Use when the user asks how to LP, what range to use, or which version/fee tier is best. model: opus allowed-tools: [Task(subagent_type:lp-strategist)]
Optimize LP
Overview
Provides a focused, actionable LP strategy recommendation for a specific token pair. Delegates to the lp-strategist agent, which analyzes pair volatility, evaluates version options, selects the optimal fee tier, calculates the best range width, and designs a rebalance strategy — all backed by on-chain data and risk analysis.
This skill answers the question: "How should I LP into X/Y?" with a concrete, implementable answer.
When to Use
Activate when the user asks:
- "Best LP strategy for ETH/USDC"
- "How should I LP $10K into ETH/USDC?"
- "Tight or wide range for WETH/USDC?"
- "V2 or V3 for this pair?"
- "What fee tier should I use for UNI/WETH?"
- "Optimize my LP approach for X/Y"
- "What range should I set for my ETH/USDC position?"
- "Should I use concentrated liquidity for this pair?"
Parameters
| Parameter | Required | Default | How to Extract |
|---|---|---|---|
| token0 | Yes | — | First token: "ETH", "WETH", "USDC", or 0x address |
| token1 | Yes | — | Second token |
| capital | No | — | Amount to LP: "$10K", "5 ETH", "$50,000" |
| chain | No | ethereum | "ethereum", "base", "arbitrum", etc. |
| riskTolerance | No | moderate | "conservative", "moderate", "aggressive" |
Workflow
-
Extract parameters from the user's request. Identify the token pair, capital amount (if mentioned), chain, and risk tolerance.
-
Delegate to lp-strategist: Invoke
Task(subagent_type:lp-strategist)with the parameters. The agent performs a 7-step analysis:- Classifies the pair (stable-stable, stable-volatile, volatile-volatile)
- Evaluates V2 vs V3 vs V4 tradeoffs
- Selects optimal fee tier with data backing
- Calculates range width targeting >80% time-in-range
- Designs rebalance strategy with gas cost analysis
- Gets independent risk assessment from risk-assessor
- Produces a recommendation with conservative/moderate/optimistic estimates
-
Present the strategy as a clear, actionable recommendation with specific numbers.
Output Format
LP Strategy for WETH/USDC
Recommendation: V3, 0.05% fee tier
Pool: 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640 (Ethereum)
Range: $1,668 - $2,258 (±15%, medium strategy)
Expected time-in-range: ~82%
Expected Returns (annualized):
Conservative: 8.5% APY (after IL)
Moderate: 15.2% APY (after IL)
Optimistic: 24.1% APY (after IL)
Expected IL:
Conservative: 2.1%
Moderate: 5.8%
Worst case: 12.3%
Rebalance Strategy:
Trigger: Price within 10% of range boundary
Frequency: Every 2-3 weeks (estimated)
Gas cost: ~$15 per rebalance
Risk Assessment: MEDIUM (approved by risk-assessor)
Alternatives Considered:
V3 0.3%: Lower APY (8%) but less competition
V2: No range management, ~4% APY — good for passive
Narrow range (±5%): Higher APY but needs weekly rebalancing
Ready to add liquidity? Say "Add liquidity to WETH/USDC"
Important Notes
- This skill provides a strategy recommendation, not execution. To act on it, use the
manage-liquidityskill. - All APY estimates are based on historical data. Past performance does not guarantee future returns.
- IL estimates are always shown alongside fee APY — never fee APY alone.
- For small positions (<$1K), the recommendation accounts for gas costs eating into returns.
- The lp-strategist internally delegates to
pool-researcherfor data andrisk-assessorfor risk evaluation.
Error Handling
| Error | User-Facing Message | Suggested Action |
|---|---|---|
| Token not found | "Could not find token X on Uniswap." | Provide contract address |
| No pools exist | "No pools found for X/Y on this chain." | Try different chain or check tokens |
| Insufficient data | "Not enough historical data to produce a reliable strategy." | Pool may be too new |
| Agent unavailable | "LP strategist is not available." | Check agent configuration |
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。