[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CT1M168EP0GV1P5HCHQR0T":3,"skill-same:01M6CT1M168EP0GV1P5HCHQR0T":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":14,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M6CT1M168EP0GV1P5HCHQR0T","yield-management",null,"DeFi yield farming, position tracking, impermanent loss calculation, health factor monitoring, and portfolio optimization","lucid-fdn\u002Flucid-plugins","lucid-fdn","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93290671?v=4","01M6CT12EHKN5DWVD9NAK6WSXT","Lucid","01M6CT12K0ARYZ8D28MK4G89F8",0,"MIT","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-defi\u002Fskill\u002Freferences\u002Fyield-management\u002FSKILL.md",[],[19,20,21,22,23,24,25,26],"management","yield management","monitoring","defi","Optimization","health","tracking","portfolio","2026-11-10 10:12:30",false,"---\nname: yield-management\ndescription: \"DeFi yield farming, position tracking, impermanent loss calculation, health factor monitoring, and portfolio optimization\"\n---\n\n# Yield Management\n\nTrack DeFi yield positions across protocols, calculate impermanent loss, monitor health factors for lending positions, discover yield opportunities, assess risk, and optimize portfolio allocation between yield sources.\n\n## Yield Management Procedure\n\nWhen the user asks about DeFi yields or positions, follow this procedure:\n\n1. **Identify the request type**:\n\n| Request Type | Action | Key Output |\n|-------------|--------|------------|\n| \"Track my positions\" | Position Overview | All DeFi positions with current yields |\n| \"What's my IL?\" | IL Calculation | Impermanent loss for LP positions |\n| \"Is my lending safe?\" | Health Factor Check | Liquidation risk assessment |\n| \"Find best yields\" | Opportunity Discovery | Ranked yield opportunities |\n| \"Compare protocols\" | Protocol Comparison | Side-by-side yield and risk analysis |\n| \"Optimize my portfolio\" | Portfolio Rebalancing | Yield vs risk optimization |\n\n2. **Fetch position data** from on-chain sources and protocol APIs.\n\n3. **Apply calculations** from reference files.\n\n4. **Present results** with risk warnings and actionable recommendations.\n\n## Position Types\n\n### Supported DeFi Position Types\n\n| Type | Description | Yield Source | Key Risk |\n|------|-------------|-------------|----------|\n| Lending | Supply assets to lending protocol | Interest from borrowers | Utilization spike, protocol risk |\n| Borrowing | Borrow against collateral | Leverage (indirect) | Liquidation if health factor \u003C 1 |\n| LP (Liquidity Provision) | Provide liquidity to DEX pool | Trading fees + incentives | Impermanent loss |\n| Staking | Lock tokens for network security | Protocol inflation \u002F rewards | Lock-up period, slashing |\n| Farming | LP + stake LP tokens for rewards | Incentive tokens | IL + reward token price decline |\n| Vault | Deposit into auto-compounding vault | Strategy-dependent | Smart contract risk |\n| Perps | Perpetual futures positions | Funding rate | Liquidation, funding rate flip |\n| Options | Options strategies (covered calls, etc.) | Premiums | Assignment risk, time decay |\n\n### Position Data Schema\n\n| Field | Type | Description |\n|-------|------|-------------|\n| protocol | string | Protocol name (Aave, Uniswap, etc.) |\n| chain | string | Blockchain |\n| type | string | Position type (lending, LP, etc.) |\n| tokens | array | Token(s) in position |\n| deposited_value_usd | number | Value at time of deposit |\n| current_value_usd | number | Current market value |\n| apy_current | number | Current annualized yield % |\n| apy_7d_avg | number | 7-day average APY |\n| rewards_earned_usd | number | Total rewards earned |\n| health_factor | number | For lending\u002Fborrowing positions (null otherwise) |\n| il_percentage | number | For LP positions (null otherwise) |\n| entry_date | timestamp | When position was opened |\n| last_harvest | timestamp | Last reward claim date |\n\n## Yield Calculations\n\n### APY vs APR\n\n```\nAPR (Annual Percentage Rate):\n  Simple interest, not compounded\n  APR = (reward_per_period \u002F principal) * periods_per_year * 100\n\nAPY (Annual Percentage Yield):\n  Compound interest\n  APY = ((1 + reward_per_period \u002F principal) ^ periods_per_year - 1) * 100\n\nConversion:\n  APY = (1 + APR \u002F n) ^ n - 1\n  APR = n * ((1 + APY) ^ (1\u002Fn) - 1)\n\n  Where n = compounding periods per year\n    Daily compounding: n = 365\n    Weekly: n = 52\n    Monthly: n = 12\n\nExample:\n  APR = 20%, daily compounding\n  APY = (1 + 0.20\u002F365)^365 - 1 = 22.13%\n```\n\n### Yield Projection\n\n```\nfunction projectYield(principal, apy, days):\n    daily_rate = (1 + apy\u002F100) ^ (1\u002F365) - 1\n    projected_value = principal * (1 + daily_rate) ^ days\n    yield_earned = projected_value - principal\n\n    return {\n        projected_value: projected_value,\n        yield_earned: yield_earned,\n        yield_pct: (yield_earned \u002F principal) * 100,\n        daily_yield: principal * daily_rate,\n        monthly_yield: principal * ((1 + daily_rate)^30 - 1)\n    }\n```\n\n## Impermanent Loss\n\nSee `references\u002Fil-calculator.md` for detailed formulas, scenarios, and worked examples.\n\n### Quick IL Formula\n\n```\nGiven initial price ratio r0 and current price ratio r1:\n  r = r1 \u002F r0  (relative price change)\n\n  IL = 2 * sqrt(r) \u002F (1 + r) - 1\n\n  IL is always negative (representing a loss relative to holding)\n  IL = 0% when r = 1 (no price change)\n  IL = -5.72% when r = 2 (one token doubles)\n  IL = -25.00% when r = 4 (one token quadruples)\n  IL = -100% when r -> infinity (one token goes to zero or infinity)\n```\n\n### Net LP Return\n\n```\nNet LP Return = Trading Fees Earned + Incentive Rewards + IL (negative)\n\nProfitable LP: fees + rewards > |IL|\nUnprofitable LP: fees + rewards \u003C |IL|\n\nBreak-Even APY = |IL%| \u002F holding_period_in_years\n  Example: IL = -5%, held for 6 months\n  Break-Even APY = 5% \u002F 0.5 = 10% APY needed from fees to break even\n```\n\n## Health Factor Monitoring\n\nFor lending\u002Fborrowing positions, health factor determines liquidation risk.\n\n### Health Factor Formula\n\n```\nHealth Factor = (Collateral Value * Liquidation Threshold) \u002F Borrow Value\n\n  Collateral Value = sum(collateral_amount[i] * price[i] * collateral_factor[i])\n  Borrow Value = sum(borrow_amount[i] * price[i])\n\n  Health Factor > 1.0:  Safe (no liquidation)\n  Health Factor = 1.0:  Liquidation threshold (can be liquidated)\n  Health Factor \u003C 1.0:  Undercollateralized (will be liquidated)\n```\n\n### Liquidation Thresholds by Protocol\n\n| Protocol | Chain | Typical LTV | Liquidation Threshold | Liquidation Penalty |\n|----------|-------|------------|----------------------|-------------------|\n| Aave V3 | Multi-chain | 80% | 82.5% | 5% |\n| Compound V3 | Ethereum | 80% | 83% | 5% |\n| Spark (MakerDAO) | Ethereum | 80% | 83% | 13% |\n| Solend | Solana | 75% | 80% | 5% |\n| Marginfi | Solana | 80% | 85% | 5% |\n\n### Health Factor Alerts\n\n| Health Factor | Risk Level | Alert | Recommended Action |\n|--------------|-----------|-------|-------------------|\n| > 2.0 | Safe | None | Monitor weekly |\n| 1.5 - 2.0 | Low Risk | Info | Monitor daily |\n| 1.2 - 1.5 | Medium Risk | Warning | Consider adding collateral |\n| 1.05 - 1.2 | High Risk | Urgent | Add collateral or repay debt immediately |\n| 1.0 - 1.05 | Critical | Emergency | Liquidation imminent — act NOW |\n| \u003C 1.0 | Liquidated | Alert | Position being\u002Fhas been liquidated |\n\n### Price Drop Calculator\n\n```\nHow far can collateral price drop before liquidation?\n\n  max_price_drop_pct = (1 - 1 \u002F health_factor) * 100\n\n  Example: Health Factor = 1.5\n  Max drop = (1 - 1\u002F1.5) * 100 = 33.3%\n  Collateral price can drop 33.3% before liquidation.\n\n  Example: Health Factor = 1.2\n  Max drop = (1 - 1\u002F1.2) * 100 = 16.7%\n```\n\n## Yield Opportunity Discovery\n\n### Discovery Sources\n\n| Source | Data Points | Coverage |\n|--------|------------|---------|\n| DeFiLlama Yields | APY, TVL, project, chain | 1000+ pools |\n| Protocol APIs | Real-time APY, user positions | Per-protocol |\n| On-chain data | Current pool stats, reserve ratios | All DeFi |\n\n### DeFiLlama Yield API\n\n```\nGET https:\u002F\u002Fyields.llama.fi\u002Fpools\n\nResponse per pool:\n  pool: unique identifier\n  chain: blockchain name\n  project: protocol name\n  symbol: pool token symbols\n  tvlUsd: total value locked\n  apy: current APY (%)\n  apyBase: base APY from fees\n  apyReward: reward APY from incentives\n  stablecoin: boolean\n  ilRisk: \"yes\"\u002F\"no\"\n  exposure: \"single\"\u002F\"multi\"\n  predictions: { predictedClass, binnedConfidence }\n```\n\n### Opportunity Ranking\n\n```\nfunction rankOpportunities(pools, risk_tolerance):\n    for each pool:\n        risk_score = assessPoolRisk(pool)  # 0-100\n        reward_score = pool.apy\n\n        # Risk-adjusted yield\n        if risk_tolerance == \"conservative\":\n            adj_yield = pool.apy * (1 - risk_score\u002F100) * 1.5\n        elif risk_tolerance == \"moderate\":\n            adj_yield = pool.apy * (1 - risk_score\u002F200)\n        elif risk_tolerance == \"aggressive\":\n            adj_yield = pool.apy  # Raw APY, minimal risk discount\n\n        pool.ranking_score = adj_yield\n\n    return sorted(pools, by: ranking_score, descending)\n```\n\n## Risk Assessment\n\n### Per-Position Risk Factors\n\n| Factor | Weight | Score Criteria |\n|--------|--------|---------------|\n| Smart Contract Risk | 30% | Audit status, TVL, time deployed, incident history |\n| IL Risk | 20% | Volatile pair = high, stable pair = low, single-sided = none |\n| Liquidation Risk | 20% | Health factor proximity to 1.0 |\n| Protocol Risk | 15% | TVL trend, governance, insurance |\n| Reward Token Risk | 15% | Sustainability of emissions, reward token price trend |\n\n### Reward Sustainability Assessment\n\n```\nSustainable Yield:\n  Base APY (from trading fees \u002F interest) is sustainable long-term\n  Reward APY (from token emissions) is usually temporary\n\nCheck reward sustainability:\n  reward_emission_rate = tokens_per_day * token_price\n  protocol_revenue = daily_fees_earned\n\n  If reward_emission > protocol_revenue * 5:\n    -> Unsustainable (emissions far exceed revenue)\n    -> APY will likely decrease significantly\n    -> Weight base APY more heavily in projections\n```\n\n## Portfolio Optimization\n\n### Rebalancing Recommendations\n\n```\nfunction optimizeYieldPortfolio(positions, target_risk):\n    current_allocation = calculateAllocation(positions)\n    current_risk = calculatePortfolioRisk(positions)\n    current_yield = calculateWeightedAPY(positions)\n\n    recommendations = []\n\n    # Check for overconcentration\n    for each position:\n        if position.allocation > 30%:\n            recommendations.push(\"REDUCE: \" + position.protocol +\n                \" allocation from \" + position.allocation + \"% to \u003C 30%\")\n\n    # Check for underperforming positions\n    for each position:\n        if position.apy \u003C median_apy * 0.5 AND position.risk_score > median_risk:\n            recommendations.push(\"EXIT: \" + position.protocol +\n                \" — below average yield with above average risk\")\n\n    # Check for better opportunities\n    opportunities = discoverOpportunities(target_risk)\n    for each opp in top_3_opportunities:\n        if opp.adj_yield > current_yield * 1.2:\n            recommendations.push(\"CONSIDER: \" + opp.protocol +\n                \" offering \" + opp.apy + \"% APY\")\n\n    # Check health factors\n    for each lending_position:\n        if lending_position.health_factor \u003C 1.5:\n            recommendations.push(\"URGENT: Improve health factor on \" +\n                lending_position.protocol)\n\n    return recommendations\n```\n\n## Alert Configuration\n\n| Alert Type | Trigger | Default Threshold |\n|-----------|---------|-------------------|\n| Health Factor Low | HF drops below threshold | \u003C 1.3 |\n| Health Factor Critical | HF approaching liquidation | \u003C 1.1 |\n| Yield Drop | APY drops significantly | -50% from entry APY |\n| IL Threshold | IL exceeds acceptable level | -10% |\n| Reward Claim Available | Unclaimed rewards exceed threshold | > $50 |\n| TVL Drop | Protocol TVL declining | -25% in 7 days |\n| Position Expiry | Fixed-term position nearing end | 7 days before expiry |\n\n## Protocol Details\n\nSee `references\u002Fprotocols.md` for detailed information on supported protocols including Aave, Compound, Uniswap, Curve, Convex, Yearn, GMX, Lido, Raydium, and Marinade.\n\nSee `references\u002Fil-calculator.md` for comprehensive impermanent loss formulas and scenarios.\n\nSee `references\u002Fposition-types.md` for detailed risk\u002Freturn profiles of each position type.","# Yield Management\n\nTrack DeFi yield positions across protocols, calculate impermanent loss, monitor health factors for lending positions, discover yield opportunities, assess risk, and optimize portfolio allocation between yield sources.\n\n## Yield Management Procedure\n\nWhen the user asks about DeFi yields or positions, follow this procedure:\n\n1. **Identify the request type**:\n\n| Request Type | Action | Key Output |\n|-------------|--------|------------|\n| \"Track my positions\" | Position Overview | All DeFi positions with current yields |\n| \"What's my IL?\" | IL Calculation | Impermanent loss for LP positions |\n| \"Is my lending safe?\" | Health Factor Check | Liquidation risk assessment |\n| \"Find best yields\" | Opportunity Discovery | Ranked yield opportunities |\n| \"Compare protocols\" | Protocol Comparison | Side-by-side yield and risk analysis |\n| \"Optimize my portfolio\" | Portfolio Rebalancing | Yield vs risk optimization |\n\n2. **Fetch position data** from on-chain sources and protocol APIs.\n\n3. **Apply calculations** from reference files.\n\n4. **Present results** with risk warnings and actionable recommendations.\n\n## Position Types\n\n### Supported DeFi Position Types\n\n| Type | Description | Yield Source | Key Risk |\n|------|-------------|-------------|----------|\n| Lending | Supply assets to lending protocol | Interest from borrowers | Utilization spike, protocol risk |\n| Borrowing | Borrow against collateral | Leverage (indirect) | Liquidation if health factor \u003C 1 |\n| LP (Liquidity Provision) | Provide liquidity to DEX pool | Trading fees + incentives | Impermanent loss |\n| Staking | Lock tokens for network security | Protocol inflation \u002F rewards | Lock-up period, slashing |\n| Farming | LP + stake LP tokens for rewards | Incentive tokens | IL + reward token price decline |\n| Vault | Deposit into auto-compounding vault | Strategy-dependent | Smart contract risk |\n| Perps | Perpetual futures positions | Funding rate | Liquidation, funding rate flip |\n| Options | Options strategies (covered calls, etc.) | Premiums | Assignment risk, time decay |\n\n### Position Data Schema\n\n| Field | Type | Description |\n|-------|------|-------------|\n| protocol | string | Protocol name (Aave, Uniswap, etc.) |\n| chain | string | Blockchain |\n| type | string | Position type (lending, LP, etc.) |\n| tokens | array | Token(s) in position |\n| deposited_value_usd | number | Value at time of deposit |\n| current_value_usd | number | Current market value |\n| apy_current | number | Current annualized yield % |\n| apy_7d_avg | number | 7-day average APY |\n| rewards_earned_usd | number | Total rewards earned |\n| health_factor | number | For lending\u002Fborrowing positions (null otherwise) |\n| il_percentage | number | For LP positions (null otherwise) |\n| entry_date | timestamp | When position was opened |\n| last_harvest | timestamp | Last reward claim date |\n\n## Yield Calculations\n\n### APY vs APR\n\n```\nAPR (Annual Percentage Rate):\n  Simple interest, not compounded\n  APR = (reward_per_period \u002F principal) * periods_per_year * 100\n\nAPY (Annual Percentage Yield):\n  Compound interest\n  APY = ((1 + reward_per_period \u002F principal) ^ periods_per_year - 1) * 100\n\nConversion:\n  APY = (1 + APR \u002F n) ^ n - 1\n  APR = n * ((1 + APY) ^ (1\u002Fn) - 1)\n\n  Where n = compounding periods per year\n    Daily compounding: n = 365\n    Weekly: n = 52\n    Monthly: n = 12\n\nExample:\n  APR = 20%, daily compounding\n  APY = (1 + 0.20\u002F365)^365 - 1 = 22.13%\n```\n\n### Yield Projection\n\n```\nfunction projectYield(principal, apy, days):\n    daily_rate = (1 + apy\u002F100) ^ (1\u002F365) - 1\n    projected_value = principal * (1 + daily_rate) ^ days\n    yield_earned = projected_value - principal\n\n    return {\n        projected_value: projected_value,\n        yield_earned: yield_earned,\n        yield_pct: (yield_earned \u002F principal) * 100,\n        daily_yield: principal * daily_rate,\n        monthly_yield: principal * ((1 + daily_rate)^30 - 1)\n    }\n```\n\n## Impermanent Loss\n\nSee `references\u002Fil-calculator.md` for detailed formulas, scenarios, and worked examples.\n\n### Quick IL Formula\n\n```\nGiven initial price ratio r0 and current price ratio r1:\n  r = r1 \u002F r0  (relative price change)\n\n  IL = 2 * sqrt(r) \u002F (1 + r) - 1\n\n  IL is always negative (representing a loss relative to holding)\n  IL = 0% when r = 1 (no price change)\n  IL = -5.72% when r = 2 (one token doubles)\n  IL = -25.00% when r = 4 (one token quadruples)\n  IL = -100% when r -> infinity (one token goes to zero or infinity)\n```\n\n### Net LP Return\n\n```\nNet LP Return = Trading Fees Earned + Incentive Rewards + IL (negative)\n\nProfitable LP: fees + rewards > |IL|\nUnprofitable LP: fees + rewards \u003C |IL|\n\nBreak-Even APY = |IL%| \u002F holding_period_in_years\n  Example: IL = -5%, held for 6 months\n  Break-Even APY = 5% \u002F 0.5 = 10% APY needed from fees to break even\n```\n\n## Health Factor Monitoring\n\nFor lending\u002Fborrowing positions, health factor determines liquidation risk.\n\n### Health Factor Formula\n\n```\nHealth Factor = (Collateral Value * Liquidation Threshold) \u002F Borrow Value\n\n  Collateral Value = sum(collateral_amount[i] * price[i] * collateral_factor[i])\n  Borrow Value = sum(borrow_amount[i] * price[i])\n\n  Health Factor > 1.0:  Safe (no liquidation)\n  Health Factor = 1.0:  Liquidation threshold (can be liquidated)\n  Health Factor \u003C 1.0:  Undercollateralized (will be liquidated)\n```\n\n### Liquidation Thresholds by Protocol\n\n| Protocol | Chain | Typical LTV | Liquidation Threshold | Liquidation Penalty |\n|----------|-------|------------|----------------------|-------------------|\n| Aave V3 | Multi-chain | 80% | 82.5% | 5% |\n| Compound V3 | Ethereum | 80% | 83% | 5% |\n| Spark (MakerDAO) | Ethereum | 80% | 83% | 13% |\n| Solend | Solana | 75% | 80% | 5% |\n| Marginfi | Solana | 80% | 85% | 5% |\n\n### Health Factor Alerts\n\n| Health Factor | Risk Level | Alert | Recommended Action |\n|--------------|-----------|-------|-------------------|\n| > 2.0 | Safe | None | Monitor weekly |\n| 1.5 - 2.0 | Low Risk | Info | Monitor daily |\n| 1.2 - 1.5 | Medium Risk | Warning | Consider adding collateral |\n| 1.05 - 1.2 | High Risk | Urgent | Add collateral or repay debt immediately |\n| 1.0 - 1.05 | Critical | Emergency | Liquidation imminent — act NOW |\n| \u003C 1.0 | Liquidated | Alert | Position being\u002Fhas been liquidated |\n\n### Price Drop Calculator\n\n```\nHow far can collateral price drop before liquidation?\n\n  max_price_drop_pct = (1 - 1 \u002F health_factor) * 100\n\n  Example: Health Factor = 1.5\n  Max drop = (1 - 1\u002F1.5) * 100 = 33.3%\n  Collateral price can drop 33.3% before liquidation.\n\n  Example: Health Factor = 1.2\n  Max drop = (1 - 1\u002F1.2) * 100 = 16.7%\n```\n\n## Yield Opportunity Discovery\n\n### Discovery Sources\n\n| Source | Data Points | Coverage |\n|--------|------------|---------|\n| DeFiLlama Yields | APY, TVL, project, chain | 1000+ pools |\n| Protocol APIs | Real-time APY, user positions | Per-protocol |\n| On-chain data | Current pool stats, reserve ratios | All DeFi |\n\n### DeFiLlama Yield API\n\n```\nGET https:\u002F\u002Fyields.llama.fi\u002Fpools\n\nResponse per pool:\n  pool: unique identifier\n  chain: blockchain name\n  project: protocol name\n  symbol: pool token symbols\n  tvlUsd: total value locked\n  apy: current APY (%)\n  apyBase: base APY from fees\n  apyReward: reward APY from incentives\n  stablecoin: boolean\n  ilRisk: \"yes\"\u002F\"no\"\n  exposure: \"single\"\u002F\"multi\"\n  predictions: { predictedClass, binnedConfidence }\n```\n\n### Opportunity Ranking\n\n```\nfunction rankOpportunities(pools, risk_tolerance):\n    for each pool:\n        risk_score = assessPoolRisk(pool)  # 0-100\n        reward_score = pool.apy\n\n        # Risk-adjusted yield\n        if risk_tolerance == \"conservative\":\n            adj_yield = pool.apy * (1 - risk_score\u002F100) * 1.5\n        elif risk_tolerance == \"moderate\":\n            adj_yield = pool.apy * (1 - risk_score\u002F200)\n        elif risk_tolerance == \"aggressive\":\n            adj_yield = pool.apy  # Raw APY, minimal risk discount\n\n        pool.ranking_score = adj_yield\n\n    return sorted(pools, by: ranking_score, descending)\n```\n\n## Risk Assessment\n\n### Per-Position Risk Factors\n\n| Factor | Weight | Score Criteria |\n|--------|--------|---------------|\n| Smart Contract Risk | 30% | Audit status, TVL, time deployed, incident history |\n| IL Risk | 20% | Volatile pair = high, stable pair = low, single-sided = none |\n| Liquidation Risk | 20% | Health factor proximity to 1.0 |\n| Protocol Risk | 15% | TVL trend, governance, insurance |\n| Reward Token Risk | 15% | Sustainability of emissions, reward token price trend |\n\n### Reward Sustainability Assessment\n\n```\nSustainable Yield:\n  Base APY (from trading fees \u002F interest) is sustainable long-term\n  Reward APY (from token emissions) is usually temporary\n\nCheck reward sustainability:\n  reward_emission_rate = tokens_per_day * token_price\n  protocol_revenue = daily_fees_earned\n\n  If reward_emission > protocol_revenue * 5:\n    -> Unsustainable (emissions far exceed revenue)\n    -> APY will likely decrease significantly\n    -> Weight base APY more heavily in projections\n```\n\n## Portfolio Optimization\n\n### Rebalancing Recommendations\n\n```\nfunction optimizeYieldPortfolio(positions, target_risk):\n    current_allocation = calculateAllocation(positions)\n    current_risk = calculatePortfolioRisk(positions)\n    current_yield = calculateWeightedAPY(positions)\n\n    recommendations = []\n\n    # Check for overconcentration\n    for each position:\n        if position.allocation > 30%:\n            recommendations.push(\"REDUCE: \" + position.protocol +\n                \" allocation from \" + position.allocation + \"% to \u003C 30%\")\n\n    # Check for underperforming positions\n    for each position:\n        if position.apy \u003C median_apy * 0.5 AND position.risk_score > median_risk:\n            recommendations.push(\"EXIT: \" + position.protocol +\n                \" — below average yield with above average risk\")\n\n    # Check for better opportunities\n    opportunities = discoverOpportunities(target_risk)\n    for each opp in top_3_opportunities:\n        if opp.adj_yield > current_yield * 1.2:\n            recommendations.push(\"CONSIDER: \" + opp.protocol +\n                \" offering \" + opp.apy + \"% APY\")\n\n    # Check health factors\n    for each lending_position:\n        if lending_position.health_factor \u003C 1.5:\n            recommendations.push(\"URGENT: Improve health factor on \" +\n                lending_position.protocol)\n\n    return recommendations\n```\n\n## Alert Configuration\n\n| Alert Type | Trigger | Default Threshold |\n|-----------|---------|-------------------|\n| Health Factor Low | HF drops below threshold | \u003C 1.3 |\n| Health Factor Critical | HF approaching liquidation | \u003C 1.1 |\n| Yield Drop | APY drops significantly | -50% from entry APY |\n| IL Threshold | IL exceeds acceptable level | -10% |\n| Reward Claim Available | Unclaimed rewards exceed threshold | > $50 |\n| TVL Drop | Protocol TVL declining | -25% in 7 days |\n| Position Expiry | Fixed-term position nearing end | 7 days before expiry |\n\n## Protocol Details\n\nSee `references\u002Fprotocols.md` for detailed information on supported protocols including Aave, Compound, Uniswap, Curve, Convex, Yearn, GMX, Lido, Raydium, and Marinade.\n\nSee `references\u002Fil-calculator.md` for comprehensive impermanent loss formulas and scenarios.\n\nSee `references\u002Fposition-types.md` for detailed risk\u002Freturn profiles of each position type.",{"name":5,"description":7},"main","60a187a694df4ce725464b7578e08ad46a73340f","lucid-defi\u002Fskill\u002Freferences\u002Fyield-management","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins","https:\u002F\u002Fgithub.com\u002Flucid-fdn","2026-03-26 06:06:06",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add lucid-fdn\u002Flucid-plugins --skill yield-management",{"tool":44,"command":45},"bunx","bunx skills add lucid-fdn\u002Flucid-plugins --skill yield-management",{"tool":47,"command":48},"pnpm","pnpm dlx skills add lucid-fdn\u002Flucid-plugins --skill yield-management","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-defi\u002Fskill\u002Freferences\u002Fyield-management\u002FSKILL.md",true,[52,58,62],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fil-calculator.md","REFERENCE","参考文档",7621,"https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-defi\u002Fskill\u002Freferences\u002Fyield-management\u002Freferences\u002Fil-calculator.md",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fposition-types.md",9143,"https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-defi\u002Fskill\u002Freferences\u002Fyield-management\u002Freferences\u002Fposition-types.md",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fprotocols.md",8610,"https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-defi\u002Fskill\u002Freferences\u002Fyield-management\u002Freferences\u002Fprotocols.md",[67,76,101,113,129,148],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":27},"01M6CT442ZA942TW2E4GM9B47B","lucid-PLUGIN_NAME","PLUGIN_DESCRIPTION","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002Fdocs\u002FSKILL.md",[],[74,75],"lucid PLUGIN NAME","plugin",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":92,"publishedAt":27},"01M6CT41PA1EKESRMFV5V775TW","social-content","Generate short-form video content optimized for social media platforms","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-video\u002Fskill\u002Freferences\u002Fsocial-content\u002FSKILL.md",[82,87],{"categoryNo":83,"categoryName":84,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[93,94,95,96,97,98,99,100],"social","social content","content","short","social media","Media","Video","generate",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":108,"publishedAt":27},"01M6CT3Z4SPEJQYJNZ60ZBDKMF","personalized-outreach","Generate 1:1 personalized video for sales prospecting and customer success","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-video\u002Fskill\u002Freferences\u002Fpersonalized-outreach\u002FSKILL.md",[107],{"categoryNo":83,"categoryName":84,"taxonomyType":85,"taxonomyTypeDesc":86},[109,100,110,99,111,112],"personalized outreach","sales","prospecting","customer",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":122,"publishedAt":27},"01M6CT3WH4C1TMMSWY25XBEM19","data-reports","Generate animated data report videos from KPIs, charts, and analytics","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-video\u002Fskill\u002Freferences\u002Fdata-reports\u002FSKILL.md",[119],{"categoryNo":120,"categoryName":121,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000033","数据分析师",[123,124,125,126,127,100,128],"data","data reports","reports","Charts","report","analytics",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":139,"publishedAt":27},"01M6CT3TJTWDVGM0CY356RS99V","lucid-video","Agent-native video generation using Remotion — MCP server + OpenClaw plugin","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-video\u002Fskill\u002FSKILL.md",[135,136],{"categoryNo":83,"categoryName":84,"taxonomyType":85,"taxonomyTypeDesc":86},{"categoryNo":137,"categoryName":138,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000023","Skill与智能体开发",[140,99,141,142,143,144,145,146,147,75],"lucid video","server","MCP","openclaw","mcp server","openclaw plugin","video generation","Remotion",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":27},"01M6CT3RP3ZWEJBA5Q3X8J4XV4","lucid-veille","Content monitoring, AI digest generation, and multi-platform auto-publishing","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-veille\u002Fskill\u002Freferences\u002Flucid-veille\u002FSKILL.md",[],[155,156,21,157,158,159,95],"lucid veille","supabase","auto","publishing","digest"]