defillama/defillama-skills

yield-strategies

Guide for querying DeFi yield and APY data using get_yield_pools.

First seen Mar 26, 2026

Installation

$ npx skills add defillama/defillama-skills --skill yield-strategies

Summary

  • Guide for querying DeFi yield and APY data using get_yield_pools.
  • Covers pool filtering by token, chain, protocol, category, stablecoin-only mode, and capacity assessment.
  • Explains APY conventions, lending vs borrowing rates, and sort options.
  • Use when users ask about yields, APY, lending rates, borrowing costs, best pools, or DeFi yield strategies.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from defillama/defillama-skills · top by installs.

npx skills add defillama/defillama-skills

Browse all from defillama/defillama-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 29
Default branch master
Open issues 1
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,733 B
  • docs SUMMARY.md 375 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 346 installs

SKILL.md

DeFi Yield Strategies

APY Convention

APY values are already percentages: apy = 2.32 means 2.32%.

Do NOT multiply by 100. This is the most common mistake when working with yield data.

Tool: defillama:getyieldpools

Filtering Guide

Want Parameter Example
Pools with specific token token "coingecko:ethereum"
Pools on specific chain chain "ethereum"
Pools from specific protocol protocol "aave"
Pools from protocol category category "Lending", "DEXes"
Only stablecoin pools stablecoin_only true
Minimum APY threshold min_apy 5 (= 5%)
Minimum TVL min_tvl 1000000 (= $1M)
Include borrow-side data include_borrow true

Key Distinction

  • "ETH pools" = token filter: token: "coingecko:ethereum"
  • "Pools on Ethereum" = chain filter: chain: "ethereum"

Token Family Matching

The token param expects canonical token keys (e.g., coingecko:ethereum) and uses dim.pool_set() for family resolution. coingecko:ethereum finds pools containing ETH, wETH, stETH, cbETH, and all other variants in the ETH family -- not just native ETH.

Sort Options

sortby accepts strings like: "apy desc", "tvl desc", "apybase desc", "apy_reward desc"

Returned Columns

Each result includes: symbol, protocol (sub-protocol slug), parentprotocol, category, chain, apy, apybase, apyreward, apybaseborrow, apyrewardborrow, tvl, totalsupply, total_borrow

Historical Data & Volatility

  • Use period param (7d, 30d, 90d, 180d, 365d) for daily APY/TVL time-series history
  • Use includevolatility: true to add APY volatility stats (apyavg30d, apymedian30d, apystd30d, cv30d) — current queries only
  • Use startdate / enddate for custom date ranges (overrides period)

Borrowing Costs

For lending protocols, borrowing rate data is available:

  • apybaseborrow: Base borrowing cost (what you pay)
  • apyrewardborrow: Reward offset on borrowing (incentives you earn)
  • Net borrow cost = apybaseborrow - apyrewardborrow

Use include_borrow: true to ensure borrow columns are populated.

Capacity Assessment

When allocating capital, check pool TVL. Allocating more than 10% of a pool's TVL may cause significant rate impact or slippage. Larger pools absorb capital more easily.

Examples

Example 1: User: "Best stablecoin lending yields" Tool call: defillama:getyieldpools(stablecoinonly: true, category: "Lending", sortby: "apy desc")

Example 2: User: "Top ETH yield pools with over $1M TVL" Tool call: defillama:getyieldpools(token: "coingecko:ethereum", mintvl: 1000000, sortby: "apy desc")

Example 3: User: "Cheapest borrowing rates for stablecoins on Arbitrum" Tool call: defillama:getyieldpools(stablecoinonly: true, chain: "arbitrum", category: "Lending", includeborrow: true, sortby: "apybase_borrow asc")

Example 4: User: "Where can I earn yield on USDC?" Tool call: defillama:getyieldpools(token: "coingecko:usd-coin", sortby: "apy desc", mintvl: 100000)

Example 5: User: "Aave yields on Ethereum" Tool call: defillama:getyieldpools(protocol: "aave", chain: "ethereum", sort_by: "apy desc")