Source profileQuality 85/100

HKUDS/Vibe-Trading/agent/src/skills/defi-yield/SKILL.md

defi-yield

DeFi yield analysis and optimization — lending rates, LP yields, staking returns, yield farming strategies, risk-adjusted yield comparison, and protocol-level sustainability assessment.

Source repository stars
29,558
Declared platforms
0
Static risk flags
0
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

DeFi yield analysis and optimization — lending rates, LP yields, staking returns, yield farming strategies, risk-adjusted yield comparison, and protocol-level sustainability assessment.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/HKUDS/Vibe-Trading --skill "agent/src/skills/defi-yield"
    Safe inspection promptEditorial

    Inspect the Agent Skill "defi-yield" from https://github.com/HKUDS/Vibe-Trading/blob/3a752d5a8ed088633040893de1cc9e6dc712596f/agent/src/skills/defi-yield/SKILL.md at commit 3a752d5a8ed088633040893de1cc9e6dc712596f. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      5. Yield Sustainability Assessment

      Warning signs of unsustainable yield: 1. APY 100% with no clear revenue source → token emissions will dilute to zero 2. Protocol TVL growing but token price declining → mercenary capital chasing yield 3. Yield declining month-over-month while TVL is stable → emissions being cut…

      APY 100% with no clear revenue source → token emissions will dilute to zeroProtocol TVL growing but token price declining → mercenary capital chasing yieldYield declining month-over-month while TVL is stable → emissions being cut
    2. 02

      Sustainability Assessment

      Review the “Sustainability Assessment” section in the pinned source before continuing.

      Review and apply the “Sustainability Assessment” source section.
    3. 03

      Core Concepts

      Lending rates as market signal:

      Lending rates as market signal:
    4. 04

      1. DeFi Yield Sources

      Review the “1. DeFi Yield Sources” section in the pinned source before continuing.

      Review and apply the “1. DeFi Yield Sources” source section.
    5. 05

      2. Lending Rate Analysis

      Lending rates as market signal:

      Lending rates as market signal:

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score85/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars29,558SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    HKUDS/Vibe-Trading
    Skill path
    agent/src/skills/defi-yield/SKILL.md
    Commit
    3a752d5a8ed088633040893de1cc9e6dc712596f
    License
    MIT
    Collected
    2026-08-04
    Default branch
    main
    View the original SKILL.md

    DeFi Yield Analysis & Optimization

    Overview

    Analyze and compare yields across DeFi protocols — lending, liquidity provision, staking, and yield farming — to identify the best risk-adjusted opportunities and assess sustainability. DeFi yields are a real-time proxy for crypto market leverage demand, capital allocation, and protocol health.

    Core Concepts

    1. DeFi Yield Sources

    Yield SourceMechanismTypical APY RangeRisk Level
    Lending (supply)Earn interest from borrowers1-15% (stablecoins 3-8%)Low-medium
    Borrowing costInterest paid by borrowers3-20%N/A (cost side)
    LP fees (AMM)Trading fee share from DEX5-50% (varies by pair)Medium-high
    StakingValidator/delegation rewards3-15%Low-medium
    Liquidity miningProtocol token incentives10-500% (unsustainable)High
    RestakingRe-hypothecated staking yield5-20% (ETH + AVS rewards)Medium-high
    Points farmingOff-chain points → future airdropUnknown (speculative)Very high

    2. Lending Rate Analysis

    Lending rates as market signal:

    # High borrow rates = high leverage demand = bullish sentiment
    # Low borrow rates = low leverage demand = bearish / waiting
    
    def lending_rate_signal(borrow_rate_stable, borrow_rate_eth):
        """Analyze DeFi lending rates for market sentiment."""
        if borrow_rate_stable > 15:
            stable_signal = "extreme_demand"    # Leveraged long via stablecoin borrowing
        elif borrow_rate_stable > 8:
            stable_signal = "elevated_demand"
        elif borrow_rate_stable > 3:
            stable_signal = "normal"
        else:
            stable_signal = "low_demand"        # Bear market, no one borrowing
    
        if borrow_rate_eth > 10:
            eth_signal = "extreme_demand"       # Shorting or leveraged strategies
        elif borrow_rate_eth > 5:
            eth_signal = "elevated"
        else:
            eth_signal = "low_demand"
    
        return stable_signal, eth_signal
    

    Key lending protocols:

    ProtocolChainSpecializationTVL Range
    Aave V3Multi-chainBlue-chip lending, institutional grade$10-20B
    Compound V3Ethereum, BaseConservative, USDC-focused$3-5B
    MakerDAO/SkyEthereumCDP-based DAI/USDS minting$8-15B
    MorphoEthereumRate optimization, P2P matching$3-8B
    SparkEthereumMakerDAO lending arm$2-5B
    KaminoSolanaConcentrated LP + lending$1-3B

    3. LP Yield Analysis

    Impermanent Loss (IL) — the core risk of LP positions:

    def impermanent_loss(price_ratio_change):
        """
        Calculate impermanent loss for a 50/50 AMM pool.
        price_ratio_change: new_price / old_price of the volatile asset.
        """
        r = price_ratio_change
        il = 2 * (r ** 0.5) / (1 + r) - 1
        return il * 100  # Return as percentage
    
    # Examples:
    # Price +25% → IL = -0.6%
    # Price +50% → IL = -2.0%
    # Price +100% (2x) → IL = -5.7%
    # Price +200% (3x) → IL = -13.4%
    # Price -50% → IL = -5.7%
    # Price -75% → IL = -20.0%
    

    LP yield = fee income + token incentives - impermanent loss

    def net_lp_yield(fee_apy, incentive_apy, estimated_il_annualized):
        """Calculate risk-adjusted LP yield."""
        gross_yield = fee_apy + incentive_apy
        net_yield = gross_yield - abs(estimated_il_annualized)
        return net_yield
    
    # Example: ETH/USDC pool
    # Fee APY: 15%, Incentive APY: 20%, Estimated IL: 8%
    # Net yield: 15% + 20% - 8% = 27%
    

    LP pool evaluation criteria:

    MetricGoodMediocreAvoid
    Fee APY / TVL> 10%5-10%< 5%
    IL risk (based on pair volatility)< 5% annualized5-15%> 15%
    TVL stability (30d change)Growing or stableDeclining < 10%Declining > 30%
    Volume/TVL ratio> 0.5x daily0.1-0.5x< 0.1x
    Incentive dependency< 30% of yield30-70%> 70% (unsustainable)

    4. Staking Yield Analysis

    ETH staking ecosystem:

    MethodAPYRiskLiquidity
    Solo validator~3.5%Slashing, downtimeLocked (exit queue)
    Lido (stETH)~3.3%Smart contract, governanceLiquid (stETH tradeable)
    Rocket Pool (rETH)~3.2%Smart contract, more decentralizedLiquid
    Coinbase (cbETH)~3.0%Custodial, regulatoryLiquid
    EigenLayer restaking~3.5% + AVS rewardsSmart contract, slashing riskSemi-liquid

    Staking yield signal:

    # ETH staking yield trends
    # Rising yield = more transactions / MEV = network activity increasing (bullish)
    # Falling yield = less activity = network cooling down
    
    # Restaking yield premium
    restaking_premium = eigenlayer_yield - native_staking_yield
    if restaking_premium > 3:
        signal = "high_restaking_demand"     # AVS demand strong
    elif restaking_premium > 1:
        signal = "moderate_premium"
    else:
        signal = "low_premium"               # Restaking risk not compensated
    

    5. Yield Sustainability Assessment

    The "real yield" test:

    def yield_sustainability(protocol):
        """
        Real yield = yield funded by actual economic activity (fees, revenue)
        Token yield = yield funded by token emissions (inflationary, unsustainable)
        """
        total_yield_usd = protocol.total_yield_distributed_per_year
        fee_revenue_usd = protocol.annual_fee_revenue
        token_emission_usd = protocol.annual_token_emissions_at_market_price
    
        real_yield_pct = fee_revenue_usd / total_yield_usd * 100
        token_yield_pct = token_emission_usd / total_yield_usd * 100
    
        if real_yield_pct > 80:
            sustainability = "highly_sustainable"   # Revenue-funded
        elif real_yield_pct > 50:
            sustainability = "partially_sustainable"
        elif real_yield_pct > 20:
            sustainability = "emission_dependent"    # Mostly token incentives
        else:
            sustainability = "ponzi_risk"            # Almost entirely token-funded
    
        return sustainability, real_yield_pct
    

    Warning signs of unsustainable yield:

    1. APY > 100% with no clear revenue source → token emissions will dilute to zero
    2. Protocol TVL growing but token price declining → mercenary capital chasing yield
    3. Yield declining month-over-month while TVL is stable → emissions being cut
    4. Protocol governance voting to increase emissions → short-term pump, long-term dilution
    5. Multiple yield sources stacking (lending + LP + staking + points) → complexity hides risk

    6. Risk-Adjusted Yield Comparison Framework

    def risk_adjusted_yield(opportunities):
        """Compare DeFi opportunities on risk-adjusted basis."""
        scored = []
        for opp in opportunities:
            # Base yield
            base = opp.apy
    
            # Risk deductions
            smart_contract_risk = -2 if opp.audit_status == "unaudited" else -0.5
            il_risk = -opp.estimated_il if opp.type == "LP" else 0
            protocol_risk = -1 if opp.tvl < 50_000_000 else 0  # Small protocol risk
            chain_risk = -0.5 if opp.chain != "ethereum" else 0  # Non-ETH chain risk
            sustainability_risk = -(base * 0.3) if opp.real_yield_pct < 30 else 0
    
            # Adjusted yield
            adjusted = base + smart_contract_risk + il_risk + protocol_risk + chain_risk + sustainability_risk
    
            scored.append({
                "protocol": opp.name,
                "base_apy": base,
                "adjusted_apy": adjusted,
                "risk_level": opp.risk_level,
            })
    
        return sorted(scored, key=lambda x: x["adjusted_apy"], reverse=True)
    

    Data Sources

    SourceAccessData Available
    DeFi Llama YieldsFreeAPY across 1000+ pools/protocols
    Aave/Compound dashboardsFreeReal-time lending rates
    Dune AnalyticsFreeCustom yield queries
    DeBankFreePortfolio yield tracking
    TokenTerminalFree/PaidProtocol revenue and earnings
    EigenLayer dashboardFreeRestaking rates and AVS yields

    Output Format

    ## DeFi Yield Analysis — [Date]
    
    ### Market Yield Overview
    - **Stablecoin lending (Aave USDC)**: X.X% supply APY
    - **ETH staking**: X.X% base + X.X% restaking premium
    - **Top LP yields**: [pool1 X%, pool2 X%]
    - **Yield trend**: [rising / stable / compressing]
    
    ### Top Opportunities (Risk-Adjusted)
    | Rank | Protocol | Pool/Strategy | Base APY | Adjusted APY | Risk |
    |------|----------|--------------|----------|-------------|------|
    | 1 | [protocol] | [pool] | X.X% | X.X% | Low |
    | 2 | [protocol] | [pool] | X.X% | X.X% | Medium |
    | 3 | [protocol] | [pool] | X.X% | X.X% | Medium |
    
    ### Lending Market Signal
    - **Stablecoin borrow rates**: X.X% → [high leverage demand / normal / low]
    - **ETH borrow rates**: X.X% → [shorting demand / normal]
    - **Utilization rates**: [high / normal / low]
    
    ### Sustainability Assessment
    | Protocol | Real Yield % | Token Yield % | Verdict |
    |----------|-------------|---------------|---------|
    | [protocol] | XX% | XX% | Sustainable |
    | [protocol] | XX% | XX% | Emission-dependent |
    
    ### Yield Strategy Recommendation
    - **Conservative**: [stablecoin lending on Aave/Compound, X-X% APY]
    - **Balanced**: [ETH staking + restaking, X-X% APY]
    - **Aggressive**: [LP on DEX with hedged IL, X-X% net APY]
    
    ### Risk Warnings
    1. [Smart contract risk: protocol X is unaudited]
    2. [IL risk: volatile pair X/Y estimated IL X%]
    3. [Sustainability risk: protocol Y >80% token-funded]
    

    Notes

    • DeFi yields are highly variable and can change within hours; quoted APYs are point-in-time snapshots
    • "APY" in DeFi often assumes compounding that requires manual action (claiming + restaking); true returns may be lower
    • Smart contract risk is the dominant risk in DeFi; even audited protocols have been exploited (multi-sig, oracle manipulation)
    • Tax implications of DeFi yield vary by jurisdiction; yield farming income is taxable in most countries
    • This framework is for research purposes only and does not constitute investment advice

    Alternatives

    Compare before choosing

    Computed 10042,968

    coreyhaines31/marketingskills

    ab-testing

    When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

    Computed 10042,968

    coreyhaines31/marketingskills

    churn-prevention

    When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers o

    Computed 10023,781

    alirezarezvani/claude-skills

    app-store-optimization

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

    Computed 10014,225

    wanshuiyin/Auto-claude-code-research-in-sleep

    citation-audit

    Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.