# Defi Yield

DeFi yield analysis and optimization, lending rates, LP yields, staking returns, yield...

- Repository: https://github.com/HKUDS/Vibe-Trading (37375 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add HKUDS/Vibe-Trading --skill defi-yield -g -a claude-code -y`
Codex: `npx skills add HKUDS/Vibe-Trading --skill defi-yield -g -a codex -y`
Cursor: `npx skills add HKUDS/Vibe-Trading --skill defi-yield -g -a cursor -y`
Gemini CLI: `npx skills add HKUDS/Vibe-Trading --skill defi-yield -g -a gemini-cli -y`

## Description

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

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

# 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 Source | Mechanism | Typical APY Range | Risk Level |
|-------------|-----------|-------------------|------------|
| Lending (supply) | Earn interest from borrowers | 1-15% (stablecoins 3-8%) | Low-medium |
| Borrowing cost | Interest paid by borrowers | 3-20% | N/A (cost side) |
| LP fees (AMM) | Trading fee share from DEX | 5-50% (varies by pair) | Medium-high |
| Staking | Validator/delegation rewards | 3-15% | Low-medium |
| Liquidity mining | Protocol token incentives | 10-500% (unsustainable) | High |
| Restaking | Re-hypothecated staking yield | 5-20% (ETH + AVS rewards) | Medium-high |
| Points farming | Off-chain points → future airdrop | Unknown (speculative) | Very high |

### 2. Lending Rate Analysis

**Lending rates as market signal:**

```python
# 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"

The rest: https://github.com/HKUDS/Vibe-Trading/blob/HEAD/agent/src/skills/defi-yield/SKILL.md
