Market-Specific Crypto, DeFi

DeFi Yield

Paste into Claude, ChatGPT, or any coding agent

This skill provides a comprehensive framework for evaluating, entering, and managing DeFi yield positions. DeFi yield farming involves providing capital to decentralized protocols in exchange for rewards, but the space is rife with unsustainable yields, smart contract risk, and hidden losses from impermanent loss. This skill teaches how to separate real yield from ponzi mechanics, calculate true returns accounting for IL, evaluate protocol safety, and optimize yield across chains and strategies.

When to Use This Skill

  • When evaluating whether a DeFi yield opportunity is legitimate and sustainable
  • When calculating impermanent loss for an LP position or projected LP position
  • When selecting ranges for concentrated liquidity positions (Uniswap V3, etc.)
  • When assessing smart contract risk of a DeFi protocol
  • When comparing yield opportunities across protocols and chains
  • When optimizing compound frequency for yield positions
  • When building a diversified DeFi yield portfolio
  • When evaluating token emissions schedules and their impact on real yield

What This Skill Does

  1. Yield Source Classification: Categorizes yield as real (protocol revenue), inflationary (token emissions), or ponzi (new deposits fund old returns)
  2. Impermanent Loss Calculation: Computes exact IL for standard and concentrated liquidity positions
  3. Concentrated Liquidity Strategy: Recommends range width, rebalancing frequency, and fee tier selection
  4. Smart Contract Risk Assessment: Evaluates audit status, TVL history, team background, contract age, and exploit history
  5. Protocol Evaluation: Builds a composite safety/quality score using TVL, revenue, tokenomics, and governance metrics
  6. Yield Optimization: Calculates optimal compound frequency, compares aggregator options, evaluates cross-chain yield
  7. Red Flag Detection: Identifies unsustainable APYs, rug pull indicators, and hidden risks

How to Use

Yield Evaluation

Evaluate this yield farm: ETH-USDC on Uniswap V3, 0.3% fee tier. Is the yield real?
Compare yield options for $50,000 in stablecoins across DeFi

Impermanent Loss

Calculate impermanent loss if I LP ETH/USDC and ETH goes from $3,500 to $5,000
What's the IL on a concentrated liquidity position with range $3,000-$4,000?

Protocol Risk

Is this protocol safe? Check [protocol name] for smart contract risk
Red flag check on this new yield farm offering 500% APY

Strategy

Build a DeFi yield portfolio with $100,000 targeting 10-15% APY

Data Sources

With MCP/CLI tools connected:

  • DeFiLlama — TVL data, yield rankings, protocol revenue, chain comparison
  • Uniswap MCP (yurenju) — Uniswap V3 pool data, fee analysis, liquidity distribution
  • CoinGecko MCP / CoinGecko Price MCP — Token prices, market cap, FDV for tokenomics analysis
  • Monorail MCP — Cross-chain DeFi aggregation, yield comparison
  • DexScreener — DEX pool data, volume, liquidity depth
  • OpenBB CLI — DeFi analytics dashboard

Without tool access: Ask the user to provide:

  1. Protocol name and chain
  2. Current APY/APR displayed
  3. Token pair and current prices
  4. TVL of the pool/vault
  5. Reward token details (emission schedule if available)
  6. Audit status (if known)

Proceed with analysis using provided data. Flag unknown risk factors clearly.

Methodology

Step 1: Classify the Yield Source

This is the most critical step. The source of yield determines its sustainability.

YIELD SOURCE TAXONOMY:

┌─────────────────────────────────────────────────────────────────┐
│ TIER 1: REAL YIELD (Sustainable)                                │
│ Source: Protocol generates actual revenue from user activity     │
│ Examples:                                                       │
│   - Trading fees (Uniswap, Curve, GMX)                          │
│   - Lending interest (Aave, Compound, Morpho)                   │
│   - Liquidation rewards (Aave, Maker)                           │
│   - Staking yield (ETH staking: ~3-5% APY)                     │
│   - MEV redistribution (Flashbots, MEV-Share)                   │
│ Signal: Yield persists even if token price drops                │
│ Typical APY: 2-15%                                              │
├─────────────────────────────────────────────────────────────────┤
│ TIER 2: INFLATIONARY YIELD (Temporarily sustainable)            │
│ Source: Protocol distributes its own token as rewards            │
│ Examples:                                                       │
│   - Liquidity mining programs (most "farm" APYs)                │
│   - Governance token distributions                              │
│   - Points programs convertible to tokens                       │
│ Signal: Yield collapses if reward token price drops             │
│ Risk: Token supply inflation dilutes value                      │
│ Typical APY: 15-100% (in token terms)                           │
│ WARNING: Convert to USD terms -- if token drops 50%, your       │
│ "100% APY" is actually 50% or less                              │
├─────────────────────────────────────────────────────────────────┤
│ TIER 3: PONZI YIELD (Unsustainable -- AVOID)                   │
│ Source: New depositors' capital pays old depositors' yields     │
│ Examples:                                                       │
│   - "Rebasing" tokens with no revenue                           │
│   - Protocols offering 1000%+ APY with no clear revenue model   │
│   - "Node" protocols that pay yields from new node purchases    │
│ Signal: Yield requires constant new capital inflow              │
│ Risk: Collapse is mathematical certainty                        │
│ Typical APY: 100-100,000% (red flag)                            │
└─────────────────────────────────────────────────────────────────┘

CLASSIFICATION DECISION TREE:
  1. Does the protocol earn fees from actual user activity?
     YES → What % of displayed APY comes from fees vs token emissions?
     NO  → Is the yield 100% from token emissions? → TIER 2 at best
  2. Can the yield be sustained if the reward token price drops 80%?
     YES → TIER 1 (real yield)
     NO  → TIER 2 (inflationary) or TIER 3 (ponzi)
  3. Does the yield require new depositors to sustain?
     YES → TIER 3 (ponzi) -- DO NOT ENTER
     NO  → TIER 1 or TIER 2

Yield sustainability formula:

Real APY = (Protocol Fee Revenue to LPs annually) / TVL × 100

If displayed APY >> Real APY:
  The difference is coming from token emissions.
  Emission-adjusted APY = Real APY + (Emission APY × Token Price Discount Factor)
  Token Price Discount Factor: 0.2-0.5 for most farm tokens (assume 50-80% price decline)

Step 2: Calculate Impermanent Loss

Standard AMM (Uniswap V2, constant product x*y=k)

IL FORMULA (Standard AMM):
  IL% = 2 × √(price_ratio) / (1 + price_ratio) - 1

  Where: price_ratio = new_price / initial_price

IMPERMANENT LOSS TABLE:
  Price Change    IL %       Your Value vs Holding
  ────────────────────────────────────────────────
  ±10%           -0.11%      99.89%
  ±25%           -0.64%      99.36%
  ±50%           -2.02%      97.98%
  ±75%           -3.85%      96.15%
  ±100% (2x)     -5.72%      94.28%
  ±200% (3x)     -13.40%     86.60%
  ±300% (4x)     -20.00%     80.00%
  ±400% (5x)     -25.46%     74.54%
  ±900% (10x)    -42.54%     57.46%

EXAMPLE:
  Deposit: 1 ETH ($3,500) + 3,500 USDC = $7,000 total
  ETH rises to $5,000 (price_ratio = 5000/3500 = 1.4286)
  IL% = 2 × √1.4286 / (1 + 1.4286) - 1 = -0.82%
  LP value: $7,000 × (1 + 42.86% price appreciation) × (1 - 0.82%) = $9,884
  Hold value: $5,000 + $3,500 = $8,500
  Wait -- LP is HIGHER because fees earned exceed IL
  Actual: LP value without fees = $8,500 × 0.9918 = $8,430
  With fees (assuming 25% APY over period): $8,430 + fees > $8,500 → profitable

Concentrated Liquidity (Uniswap V3, Curve V2)

CONCENTRATED LIQUIDITY IL:
  IL is AMPLIFIED within the selected range.
  Amplification Factor ≈ Full_Range_Liquidity / Concentrated_Liquidity_Depth

  Approximate IL for concentrated position:
  IL_concentrated ≈ IL_standard × (Full_Range / Selected_Range)

  EXAMPLE:
    Full range ETH/USDC: $0 to ∞
    Your range: $3,000 to $4,000 (width = $1,000)
    If ETH moves from $3,500 to $4,000:
      Standard IL: ~0.60%
      Concentrated IL: ~3.5% (amplified by ~6x for this narrow range)
    BUT: Fee income is ALSO amplified by the same factor

  CRITICAL: If price exits your range:
    - Below range: You hold 100% of the volatile asset (maximum downside)
    - Above range: You hold 100% of the stable asset (miss all upside)
    - You earn ZERO fees when price is outside your range

Step 3: Concentrated Liquidity Strategy

Range Selection

RANGE WIDTH GUIDELINES:

  Strategy         Range Width    Rebalance    Capital Efficiency
  ──────────────────────────────────────────────────────────────
  Ultra-tight      ±2-5%          Daily        50-100×
  Tight            ±5-10%         2-3 days     10-50×
  Medium           ±10-25%        Weekly       5-10×
  Wide             ±25-50%        Monthly      2-5×
  Full range       0 to ∞         Never        1× (same as V2)

RECOMMENDED BY PAIR TYPE:
  Stablecoin/Stablecoin (USDC/USDT):
    Range: ±0.1-0.5% (e.g., 0.998 to 1.002)
    Fee tier: 0.01%
    Rebalance: Rarely (only on depeg events)

  Correlated pairs (ETH/stETH, WBTC/BTC):
    Range: ±1-3%
    Fee tier: 0.01% or 0.05%
    Rebalance: Weekly

  Major pairs (ETH/USDC, BTC/USDC):
    Range: ±15-30% in trending markets, ±10-15% in ranging markets
    Fee tier: 0.3%
    Rebalance: When price hits 75% of range boundary

  Volatile pairs (ALT/ETH, MEME/USDC):
    Range: ±30-50% or use full range
    Fee tier: 1%
    Rebalance: Infrequently (gas costs may exceed benefits)

RANGE POSITIONING:
  Bullish bias: Shift range upward (e.g., current price $3,500 → range $3,400-$4,200)
  Bearish bias: Shift range downward (e.g., range $2,800-$3,600)
  Neutral: Center range on current price

Fee Tier Selection

FEE TIER DECISION MATRIX:

  Fee Tier  Best For                           Competition Level
  ───────────────────────────────────────────────────────────────
  0.01%     Stablecoin pairs, LST pairs        Very high (thin margins)
  0.05%     Correlated assets, high volume      High
  0.3%      Major pairs (ETH/USDC)             Medium
  1%        Volatile / exotic pairs            Low (fewer LPs)

  Rule of thumb: Higher volatility → higher fee tier
  The fee tier that generates the most VOLUME (not the highest fee) wins

COMPOUNDING:
  Optimal compound frequency = √(2 × annual_fee_income × compound_cost) / annual_fee_income
  Simplified: Compound when unclaimed fees > 2× gas cost of compounding
  Use auto-compounding vaults (Kamino, Arrakis, Gamma) to avoid manual management

Step 4: Smart Contract Risk Assessment

SMART CONTRACT RISK SCORECARD (0-100):

  Category                 Weight   Scoring Criteria
  ────────────────────────────────────────────────────────────
  Audit Status             20%      No audit: 0, Single audit: 10, Multiple audits: 18, Bug bounty: 20
  Code Age                 15%      < 1 month: 0, 1-3 months: 5, 3-12 months: 10, > 1 year: 15
  TVL History              15%      Declining: 0, Stable: 10, Growing: 15
  Team Reputation          15%      Anon: 0, Pseudonymous known: 7, Doxxed: 12, Institutional: 15
  Exploit History          15%      Recent exploit: 0, Past exploit (fixed): 8, No exploits: 15
  Code Complexity          10%      Very complex (custom AMM): 3, Moderate: 7, Simple/forked: 10
  Insurance/Coverage       10%      None: 0, Partial: 5, Nexus Mutual or similar: 10
  ────────────────────────────────────────────────────────────
  TOTAL                    100%

  RISK RATING:
    80-100: LOW RISK -- Suitable for larger allocations (up to 20% of DeFi portfolio)
    60-79:  MODERATE RISK -- Limit to 10% of DeFi portfolio
    40-59:  HIGH RISK -- Limit to 5% of DeFi portfolio
    20-39:  VERY HIGH RISK -- Max 2% of DeFi portfolio, speculative only
    0-19:   EXTREME RISK -- DO NOT DEPOSIT

IMMEDIATE RED FLAGS (override score -- treat as EXTREME RISK):
  - Admin can drain all funds (no timelock, no multisig)
  - Unverified contracts on block explorer
  - Protocol launched < 2 weeks ago with > 50% APY
  - Fork of a protocol that was exploited, with no new audit
  - Team anonymous + no audit + high APY = classic rug setup
  - TVL dropped > 50% in the last 7 days (bank run)
  - Token is non-transferable or has transfer restrictions

Step 5: Protocol Evaluation Framework

PROTOCOL QUALITY MATRIX:

  Metric                Formula / Check                       Healthy Range
  ──────────────────────────────────────────────────────────────────────────
  Fee Revenue / TVL     Annual fees earned / TVL               > 5% = good
  P/F Ratio             FDV / Annual Fee Revenue               < 50 = reasonable
  Token Utility         Does the token capture protocol value? Required for evaluation
  TVL Trend (30d)       Current TVL / TVL 30 days ago          > 0.9 = stable
  TVL Trend (90d)       Current TVL / TVL 90 days ago          > 0.8 = stable
  Revenue Trend         Current monthly revenue vs 3mo avg     Growing = positive
  Emission Schedule     Daily emissions × token price / TVL    < displayed APY difference
  Governance Activity   Recent proposals, voter participation  Active = positive

REVENUE vs EMISSIONS CHECK:
  Real Yield Ratio = Protocol Fee Revenue / (Fee Revenue + Token Emissions Value)

  | Real Yield Ratio | Interpretation                    |
  |------------------|-----------------------------------|
  | > 80%            | Mostly real yield -- sustainable    |
  | 50-80%           | Mixed -- some emission dependency   |
  | 20-50%           | Emission-dependent -- caution       |
  | < 20%            | Almost entirely emissions -- fragile|

TOP-TIER PROTOCOLS (as of assessment date, verify current data):
  Lending: Aave, Morpho, Compound
  DEX: Uniswap, Curve, Balancer
  Liquid Staking: Lido, Rocket Pool, Marinade
  Yield Aggregators: Yearn, Beefy, Kamino
  Perpetuals: GMX, dYdX, Drift

Step 6: Yield Optimization

Auto-Compounding Math

COMPOUND FREQUENCY OPTIMIZATION:

  APY = (1 + APR/n)^n - 1

  Where n = number of compounds per year

  | APR    | Daily Compound APY | Weekly APY | Monthly APY | No Compound |
  |--------|-------------------|------------|-------------|-------------|
  | 10%    | 10.52%            | 10.51%     | 10.47%      | 10.00%      |
  | 25%    | 28.39%            | 28.33%     | 28.07%      | 25.00%      |
  | 50%    | 64.87%            | 64.58%     | 63.21%      | 50.00%      |
  | 100%   | 171.46%           | 169.26%    | 161.30%     | 100.00%     |

  Benefit of compounding = APY - APR
  At 25% APR: daily compound adds +3.39% absolute return

GAS-ADJUSTED OPTIMAL COMPOUND FREQUENCY:
  Compound when: (Unclaimed rewards) × (APR / 365) > Gas cost × 2
  This ensures the compound action generates more yield than it costs

  Example:
    Unclaimed: $500 worth of rewards
    APR: 25%
    Daily yield on unclaimed: $500 × 0.25/365 = $0.34
    Gas cost to compound: $5
    Wait until: $5 × 2 / (0.25/365) = $14,600 unclaimed... or use auto-compounder

  RECOMMENDATION: Use auto-compounding vaults (Beefy, Yearn, Kamino)
  They amortize gas across all depositors, making compounding efficient

Cross-Chain Yield Comparison

CHAIN COMPARISON FACTORS:
  1. Base yield available (typically higher on newer chains due to incentives)
  2. Gas costs (affects compound frequency and rebalancing)
  3. Bridge risk (each bridge is an additional smart contract risk)
  4. Chain security (L1 vs L2 vs sidechain)

  RISK-ADJUSTED YIELD:
    Net Yield = Gross APY - IL estimate - Gas costs - Bridge risk premium

  BRIDGE RISK PREMIUM (subtract from yield):
    | Bridge Type          | Risk Premium |
    |----------------------|-------------|
    | Native rollup bridge | 0.5%        |
    | Canonical bridge     | 1.0%        |
    | Third-party bridge   | 2-5%        |
    | No bridge (same chain)| 0%         |

Step 7: DeFi Yield Portfolio Construction

SAMPLE ALLOCATION FRAMEWORK ($100,000 DeFi Portfolio):

  TIER 1: FOUNDATION (60% -- $60,000)
    Low risk, real yield, blue-chip protocols
    - ETH staking (Lido/Rocket Pool): $20,000 at ~4% APY
    - Stablecoin lending (Aave/Morpho): $20,000 at ~5-8% APY
    - Major pair LP (ETH/USDC Uniswap V3): $20,000 at ~8-15% APY
    Expected blended: ~6-9% APY

  TIER 2: GROWTH (30% -- $30,000)
    Moderate risk, mix of real + emission yield
    - Concentrated liquidity (Uniswap V3 tight range): $15,000 at ~15-30% APY
    - Yield aggregator (Yearn/Beefy best vault): $15,000 at ~10-20% APY
    Expected blended: ~12-25% APY

  TIER 3: SPECULATIVE (10% -- $10,000)
    Higher risk, new protocols, higher yield
    - New protocol incentives: $5,000 at ~30-100% APY
    - Points farming (pre-token protocols): $5,000 at uncertain APY
    Expected blended: varies widely

  PORTFOLIO RULES:
    - Max 20% in any single protocol
    - Max 30% in any single chain
    - Max 10% in any pool < 3 months old
    - Rebalance monthly or when allocation drifts > 5% from targets
    - ALWAYS maintain 10% in liquid stables for emergencies / opportunities

Anti-Patterns

DO NOT do these — they are the most common DeFi yield farming failures:

  1. Chasing the highest APY: If it shows 1000% APY, it is almost certainly unsustainable. The APY is either calculated on a tiny sample period, denominated in a worthless token, or is a ponzi scheme. Always calculate REAL yield first.

  2. Ignoring impermanent loss: Many LPs are unknowingly losing money because IL exceeds fees earned. Always calculate IL for your expected price range and compare against expected fee income.

  3. Not accounting for token emission dilution: A 50% APY paid in a farm token that drops 60% in value gives you a NEGATIVE real return. Always convert to USD terms.

  4. Depositing into unaudited contracts: Smart contract risk is the single largest risk in DeFi. One exploit can wipe out 100% of deposited capital. Never deposit more than you can afford to lose in unaudited protocols.

  5. Using full range on concentrated liquidity pairs: Defeats the purpose of V3. If you want full range, use a V2-style pool instead. Concentrated liquidity requires active management.

  6. Not accounting for gas costs: On Ethereum L1, frequent compounding and rebalancing can eat a significant portion of yield. Calculate net yield after gas.

  7. Over-concentrating in one protocol: Even the best protocols can be exploited. Diversify across protocols, chains, and yield types.

  8. Ignoring unlock schedules: Some yield positions have lock-up periods. Ensure you understand exit liquidity and timelock conditions.

Validation Checkpoints

Input Validation

  • Protocol and pool identified with chain specified
  • Current APY/APR obtained from reliable source (DeFiLlama, protocol UI)
  • Token pair and current prices known
  • TVL and volume data available for the pool
  • Audit status checked
  • Team/governance information reviewed

Output Validation

  • Yield source classified (Tier 1/2/3)
  • Real yield ratio calculated
  • Impermanent loss estimated for expected price range
  • Net yield calculated (gross - IL - gas - bridge risk)
  • Smart contract risk score assigned
  • Protocol evaluation completed
  • Position size appropriate per Risk Management guidelines
  • Exit strategy defined (when to remove liquidity)
  • Red flag checklist completed — no critical flags triggered
  • Concentration limits checked (max per protocol, per chain)

Example

User: “I have $30,000 and want to earn yield on ETH/USDC. Compare Uniswap V3 concentrated LP vs Aave lending.”

Analysis:

## DeFi Yield Comparison: ETH/USDC Strategies

### Option A: Uniswap V3 Concentrated Liquidity (ETH/USDC 0.3%)
- Current pool APR: ~18% (from trading fees)
- Yield source: TIER 1 (real yield -- 100% from trading fees)
- Recommended range: $2,800 - $4,200 (±20% from current $3,500)
- Capital efficiency: ~5× vs full range
- Estimated fee APR in range: ~18%
- Expected IL (if ETH moves ±20%): ~1.5% concentrated IL
- Net projected APY: ~16.5% before compounding
- Gas costs (rebalance monthly on L2): ~$20/year
- Smart contract risk: LOW (Uniswap score: 92/100)
  - Multiple audits, 3+ year track record, highest TVL DEX

### Option B: Aave V3 Lending (supply ETH + USDC)
- ETH supply APR: ~2.5%
- USDC supply APR: ~5.2%
- Blended (50/50): ~3.85% APR
- Yield source: TIER 1 (real yield -- from borrower interest)
- Impermanent loss: ZERO (no LP)
- Net projected APY: ~3.85% (with auto-compound: ~3.93%)
- Smart contract risk: LOW (Aave score: 95/100)
  - Multiple audits, 4+ year track record, battle-tested

### Head-to-Head Comparison
| Factor            | Uniswap V3 CL  | Aave Lending    |
|-------------------|-----------------|-----------------|
| Gross APY         | ~18%            | ~3.85%          |
| Impermanent loss  | ~1.5%/year est. | 0%              |
| Net APY estimate  | ~16.5%          | ~3.85%          |
| Active management | YES (rebalance) | NO (set & forget)|
| Smart contract    | Low risk (92)   | Low risk (95)    |
| Dollar return/yr  | ~$4,950         | ~$1,155          |
| Complexity        | Medium-High     | Low              |

### Risk Assessment (see Risk Management)
- $30,000 in single protocol: OK if < 30% of total portfolio
- Single-chain risk: Deploying on Ethereum L1 or Arbitrum recommended
- Both protocols are TIER 1 real yield with high safety scores

### Recommendation
For a $30,000 position:
- **Active manager**: Uniswap V3 concentrated LP at $2,800-$4,200 range.
  Net ~16.5% = ~$4,950/year. Rebalance when price hits 75% of range boundary.
  Deploy on Arbitrum to reduce gas costs.
- **Passive**: Aave lending. Net ~3.85% = ~$1,155/year. Zero maintenance.
- **Split approach**: $20,000 Uniswap V3 + $10,000 Aave = ~$3,685/year
  with diversification benefit.

Exit triggers:
- Uniswap: Remove liquidity if ETH exits range OR pool volume drops > 50%
- Aave: Withdraw if supply APR drops below 2% OR utilization exceeds 90%