Skills

Yield Analysis

DeFi yield evaluation including fee APR, real vs nominal yield, net APY after costs...

Install

npx skills add agiprolabs/claude-trading-skills --skill yield-analysis -g -a claude-code -y
Category
Engineering
Updated
2mo ago
License
MIT
Context cost
Mediumabout 2,261 tokens
Runs scripts
Yes, review before use

What it does

DeFi yield evaluation including fee APR, real vs nominal yield, net APY after costs, and yield sustainability analysis

Yield Analysis, DeFi Yield Evaluation & Comparison

DeFi yields are often misleading. A pool advertising 200% APY may deliver negative real returns once you account for impermanent loss, gas costs, and emission token depreciation. This skill provides the framework to decompose, evaluate, and compare yield opportunities accurately.

Why Yield Analysis Matters

Most DeFi yield dashboards show nominal yield, the headline number. Real yield requires decomposing that number into its components and subtracting all costs. Without this decomposition:

  • LPs chase high-APY pools that destroy capital through IL
  • Emission-driven yields collapse as reward tokens lose value
  • Gas and rebalancing costs eat into thin margins
  • Opportunity cost is ignored (you could be staking SOL at ~7%)

Yield Components

Every DeFi yield breaks down into one or more of these sources:

1. Trading Fee Income

Swap fees earned by liquidity providers. This is the most sustainable yield source because it comes from real economic activity.

fee_apr = (daily_volume * fee_rate / tvl) * 365
your_daily_fees = daily_volume * fee_rate * (your_liquidity / total_liquidity)

For CLMM pools (concentrated liquidity), fee income is amplified by how tightly you concentrate your range. See the lp-math skill for CLMM mechanics.

2. Token Emissions / Incentives

Protocol reward tokens distributed to LPs. Often the largest component of advertised yields, but frequently unsustainable.

emission_apr = (daily_emission_tokens * token_price * 365) / tvl

The critical question: will the emission token hold its value? If everyone farms and dumps, the token depreciates and actual USD yield is much lower.

3. Lending Interest

Interest earned from lending protocol deposits (Marginfi, Kamino, Solend). Driven by borrowing demand, more sustainable than emissions but fluctuates with utilization.

Read the whole SKILL.md on GitHub

More in Engineering