Get Lending Rates
get_lending_ratesGet current on-chain lending supply/borrow APYs for Aave v3 reserves and Compound v3 markets on Ethereum or Base, with per-asset snapshots and Compound utilization. Use for protocol-specific yield comparisons such as USDC on Aave vs Compound.
Use when: Use for protocol-specific lending-rate questions (e.g. 'Aave vs Compound USDC rates'). Prefer over get_yield_rates when the protocols are known; use get_yield_rates for broad pool discovery across many protocols. Do not fall back to web_search when this returns errors — report them.
Limitations: On-chain snapshots of Aave v3 and Compound v3 on Ethereum and Base only; not a multi-protocol yield aggregator. Rates are point-in-time and change per block. Returns an errors list — report each unavailable protocol explicitly and treat empty rates with empty errors as transient RPC unavailability.
Alternatives: get_yield_rates, get_defi_positions, get_liquidation_risk
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assets | No | Optional asset-symbol filter (e.g., ['USDC','DAI']). Case-insensitive. Max 20 symbols. | |
| chain_id | No | Chain ID (1=Ethereum, 8453=Base). | |
| protocol | No | Protocol to query: 'aave-v3', 'compound-v3', or 'all'. | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | On-chain lending market snapshot at data_block_number. Aave rates are derived from ProtocolDataProvider.getReserveData (ray-scaled). Compound rates are derived from Comet getUtilization/getSupplyRate/getBorrowRate (per-second 1e18-scaled), annualized to APY. | |
| rates | Yes | ||
| errors | No | ||
| chain_id | Yes | ||
| protocol | Yes | ||
| data_block_number | Yes |