defi-lending
БесплатноБез исполняемых скриптовНе проверенCheck DeFi lending and borrowing rates, supply/borrow APY, positions, health factors, and protocol comparisons. Use when asked about lending rates, borrowing…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
DeFi Lending
Query lending/borrowing rates, positions, and protocol data across major DeFi lending platforms.
APIs
DefiLlama Yields (Free, no auth) — Best starting point
Base: https://yields.llama.fi
All lending pools with APY:
web_fetch url="https://yields.llama.fi/pools"
Returns ~10k+ pools. Filter client-side by
projectandchain. Key fields:apy(supply APY),apyBorrow(borrow APY),tvlUsd,pool(unique ID)
Single pool detail + history:
web_fetch url="https://yields.llama.fi/chart/POOL_ID"
Filter tips: Search response for "project":"aave-v3", "project":"compound-v3", "project":"morpho", "project":"spark".
Aave V3 Subgraph (Free, no auth)
Get all reserves with rates:
exec command="curl -s -X POST 'https://api.thegraph.com/subgraphs/name/aave/protocol-v3' -H 'Content-Type: application/json' -d '{\"query\":\"{reserves(first:100){name symbol underlyingAsset liquidityRate variableBorrowRate stableBorrowRate availableLiquidity totalCurrentVariableDebt totalDeposits reserveFactor baseLTVasCollateral reserveLiquidationThreshold}}\"}"
Rates are in RAY (27 decimals). Convert:
rate / 1e27 * 100= APY%
User positions on Aave:
exec command="curl -s -X POST 'https://api.thegraph.com/subgraphs/name/aave/protocol-v3' -H 'Content-Type: application/json' -d '{\"query\":\"{userReserves(where:{user:\\\"0xUSER_ADDRESS_LOWERCASE\\\"}){reserve{symbol}currentATokenBalance currentVariableDebt currentStableDebt}}\"}"
Multi-chain Aave subgraph endpoints:
| Chain | Subgraph |
|---|---|
| Ethereum | aave/protocol-v3 |
| Arbitrum | aave/protocol-v3-arbitrum |
| Optimism | aave/protocol-v3-optimism |
| Polygon | aave/protocol-v3-polygon |
| Base | aave/protocol-v3-base |
| Avalanche | aave/protocol-v3-avalanche |
See references/aave-v3.md for contract addresses per chain.
Aave V3 On-Chain via RPC
Get user account data (health factor, total collateral/debt):
exec command="curl -s -X POST https://eth.llamarpc.com -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"to\":\"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\",\"data\":\"0xbf92857c000000000000000000000000USER_ADDRESS_NO_0x\"},\"latest\"],\"id\":1}'"
Returns: totalCollateralBase, totalDebtBase, availableBorrowsBase, currentLiquidationThreshold, ltv, healthFactor All values in base currency (USD with 8 decimals). Health factor has 18 decimals. Health factor < 1.0 = liquidatable. Warn user if < 1.5.
Morpho (GraphQL API)
Get Morpho Blue markets:
exec command="curl -s -X POST 'https://blue-api.morpho.org/graphql' -H 'Content-Type: application/json' -d '{\"query\":\"{markets(first:20 orderBy:TotalSupplyUsd orderDirection:Desc){items{uniqueKey loanAsset{symbol address} collateralAsset{symbol address} lltv state{supplyApy borrowApy totalSupplyUsd totalBorrowUsd utilization}}}}\"}"
Morpho Vaults (curated lending):
exec command="curl -s -X POST 'https://blue-api.morpho.org/graphql' -H 'Content-Type: application/json' -d '{\"query\":\"{vaults(first:20 orderBy:TotalAssetsUsd orderDirection:Desc){items{name symbol address chain{id} state{totalAssetsUsd apy netApy fee} asset{symbol}}}}\"}"
Compound V3 (Comet)
Get base asset rates via RPC (getSupplyRate, getBorrowRate):
exec command="curl -s -X POST https://eth.llamarpc.com -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"to\":\"0xc3d688B66703497DAA19211EEdff47f25384cdc3\",\"data\":\"0xd955b861\"},\"latest\"],\"id\":1}'"
Compound V3 Comet (USDC market) on Ethereum:
0xc3d688B66703497DAA19211EEdff47f25384cdc30xd955b861=getSupplyRate(0),0xa5b4ff79=getBorrowRate(0)Rate is per-second. APY =(1 + rate/1e18)^(365*24*3600) - 1
Usage Tips
- Start with DefiLlama yields for a quick comparison across all protocols
- Use Aave subgraph for detailed position data and historical rates
- Health factor = total collateral * liquidation threshold / total debt
- When comparing rates, note: supply APY includes incentive rewards on DefiLlama (
apyReward) - Morpho typically offers better rates than Aave/Compound by matching lenders to borrowers
- For large positions, check utilization rate — high utilization can affect withdrawal liquidity
Установить defi-lending в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл defi-lending?
Check DeFi lending and borrowing rates, supply/borrow APY, positions, health factors, and protocol comparisons. Use when asked about lending rates, borrowing costs, Aave rates, Compound APY, Morpho markets, lending protocol comparison, health factor, or liquidation risk.
Как установить скилл defi-lending?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл defi-lending запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic