yield-strategies

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, bor

By defillama · 354 installs

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

Source repository · Upstream listing

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:get yield pools 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 sort by accepts strings like: "apy desc" , "tvl desc" , "apy base desc" , "apy reward desc" Returned Columns Each result includes: symbol , protocol (sub protocol slug), parent protocol , category , chain , apy , apy base , apy reward , apy base borrow , apy reward borrow , tvl , total supply , total borrow Historical Data & Volatility Use period param ( 7d , 30d , 90d , 180d , 365d ) for daily APY/TVL time series history Use include volatility: true to add APY volatility stats ( apy avg 30d , apy median 30d , apy std 30d , cv 30d ) — current queries only Use start date / end date for custom date ranges (overrides period ) Borrowing Costs For lending protocols, borrowing rate data is available: apy base borrow : Base borrowing cost (what you pay) apy reward borrow : Reward offset on borrowing (incentives you earn) Net borrow cost = apy base borrow apy reward borrow 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:get yield pools(stablecoin only: true, category: "Lending", sort by: "apy desc") Example 2: User: "Top ETH yield pools with over $1M TVL" Tool call: defillama:get yield pools(token: "coingecko:ethereum", min tvl: 1000000, sort by: "apy desc") Example 3: User: "Cheapest borrowing rates for stablecoins on Arbitrum" Tool call: defillama:get yield pools(stablecoin only: true, chain: "arbitrum", category: "Lending", include borrow: true, sort by: "apy base borrow asc") Example 4: User: "Where can I earn yield on USDC?" Tool call: defillama:get yield pools(token: "coingecko:usd coin", sort by: "apy desc", min tvl: 100000) Example 5: User: "Aave yields on Ethereum" Tool call: defillama:get yield pools(protocol: "aave", chain: "ethereum", sort by: "apy desc")