# Yield Analysis

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

- Repository: https://github.com/agiprolabs/claude-trading-skills (507 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-09-03
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add agiprolabs/claude-trading-skills --skill yield-analysis -g -a claude-code -y`
Codex: `npx skills add agiprolabs/claude-trading-skills --skill yield-analysis -g -a codex -y`
Cursor: `npx skills add agiprolabs/claude-trading-skills --skill yield-analysis -g -a cursor -y`
Gemini CLI: `npx skills add agiprolabs/claude-trading-skills --skill yield-analysis -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add agiprolabs/claude-trading-skills`

## Description

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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.

```python
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.

```python
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.

The rest: https://github.com/agiprolabs/claude-trading-skills/blob/HEAD/skills/yield-analysis/SKILL.md
