본문으로 건너뛰기
cccskills
무료GitHub에 공개

defi-yield

Compare yields from decentralized finance lending, liquidity provision, and staking. Assess returns alongside price-related losses, smart contract risks, and dependence on token rewards, then organize opportunities by risk and the sustainability of their income sources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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

설치 방법 보기

이럴 때 유용합니다

  • Compare lending and staking yields with their risks
  • Estimate liquidity pool returns after price-related losses
  • Assess whether rewards depend on token issuance
  • Read borrowing rates as signals of market demand

포함된 파일(1)

  • SKILL.md10.0 KB

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

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Compare a Chinese company's US depositary receipts, Hong Kong shares, and mainland shares after adjusting for exchange rates and share ratios. Analyze pricing gaps, valuation differences, and delisting risks to support research into its different listings.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Compare A-share and H-share pricing gaps
  • Measure ADR premiums against Hong Kong shares
  • Review US delisting risks and Hong Kong listing alternatives
HKUDS/Vibe-Trading3.6만2026년 10월 22일 업데이트

akshare

무료

Retrieve stock prices, futures quotes, exchange rates, and economic indicators with the free Python library AKShare. The skill explains market-specific functions, symbol formats, and data preparation for analysis and testing strategies against historical data.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Retrieve historical prices for Chinese, US, and Hong Kong stocks
  • Collect Chinese GDP and consumer price data
  • Check futures quotes and foreign exchange rates
HKUDS/Vibe-Trading3.6만2026년 10월 22일 업데이트

alpha-zoo

무료

Explore bundled libraries of investment factors, signals used to compare securities, and inspect individual formulas and metadata. Evaluate a factor or an entire library across a chosen universe and period, producing aggregate performance statistics and an HTML report.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Find bundled momentum or reversal factors
  • Inspect a named factor's formula and metadata
  • Compare a factor library across a chosen universe and period
HKUDS/Vibe-Trading3.6만2026년 10월 22일 업데이트

Assess whether a Chinese A-share company may receive ST or *ST risk warnings next financial year. Review financial forecasts, dividends, audit opinions, and regulatory penalties, then report risk severity separately from confidence in the prediction.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing a Chinese A-share company's future ST risk
  • Assessing escalation risk for an existing ST or *ST stock
  • Checking revenue, equity, and dividend warning signs
HKUDS/Vibe-Trading3.6만2026년 10월 22일 업데이트

Plan portfolio allocations across assets using risk, correlations, return forecasts, and trading costs. Compare five optimization methods, produce settings for config.json, and define rebalancing rules that adjust holdings back toward their target weights.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Comparing allocations across stocks, bonds, and gold
  • Choosing an optimizer based on return forecasts and correlations
  • Preparing portfolio settings for config.json
HKUDS/Vibe-Trading3.6만2026년 10월 22일 업데이트

Diagnose failed or abnormal backtests, which test trading strategies on historical data. Inspect result files, strategy code, and configuration to identify bugs, make targeted repairs, rerun tests, and verify the updated metrics.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Investigating backtest execution errors
  • Finding why a strategy produces no trades
  • Checking delayed trades or low capital usage
HKUDS/Vibe-Trading3.6만2026년 10월 22일 업데이트

HKUDS의 스킬 모두 보기

이 스킬의 문제 신고