Reserves#
Learn how to discover and access reserves in Aave v4 spokes.
Reserve Data Structure#
Reserve data provides comprehensive information about each asset's lending and borrowing conditions, including:
Identification: IDs, spoke, chain
Underlying token information
Supply information: APY, liquidity, caps, collateral configuration
Borrow information: APY, available liquidity, utilization rates, caps
Reserve configuration: collateral factor, liquidation bonus, liquidation fee, collateral risk
Reserve status: frozen, paused
User incentives: extra APY and borrow discounts (see Incentive Programs)
User-specific state: balances, borrowable amounts, collateral usage (when user is specified in request)
- TypeScript
- GraphQL
- Solidity
The following TypeScript interfaces illustrate the core Reserve type:
Listing Available Reserves#
Discover all available reserves given some criteria.
- React
- TypeScript
- GraphQL
- Solidity
Use the useReserves hook (or the imperative useReservesAction variant) to fetch a list of reserves.
useReservesAction hook does not watch for updates. Use it when you
need on-demand, fresh data (e.g., in an event handler).You can query reserves as follows.
Filter reserves by supply, borrow, or collateral.
Add a user address to return ReserveUserState for each reserve.
Reserves User State
import { evmAddress } from "@aave/react";
// …
const request: ReservesRequest = { query: { // your query criteria }, user: evmAddress("0x456…"),};Sort reserves by asset name, user balance, APYs, collateral factor, or available amounts.
Specify a different currency to return fiat amounts in.
Fetching a Single Reserve#
Get detailed information about a specific reserve.
- React
- TypeScript
- GraphQL
Use the useReserve hook to fetch a specific reserve.
See below for examples of ReserveRequest objects.
Include user-specific state for the reserve.
With User State
import { evmAddress } from "@aave/react";
const request: ReserveRequest = { query: { // your query criteria }, user: evmAddress("0x456…"),};Finally, you can specify a different time window or currency for the data.
Borrow APY History#
Fetch historical borrow APY data for a specific reserve. By default, Merkl rewards are included in the returned rates; pass includeRewards: false for protocol base rates only.
- React
- TypeScript
- GraphQL
Use the useBorrowApyHistory hook to fetch borrow APY history over time.
See below for examples of BorrowApyHistoryRequest objects.
Supply APY History#
Fetch historical supply APY data for a specific reserve. By default, Merkl rewards are included in the returned rates; pass includeRewards: false for protocol base rates only.
- React
- TypeScript
- GraphQL
Use the useSupplyApyHistory hook to fetch supply APY history over time.
See below for examples of SupplyApyHistoryRequest objects.
Reserve Holders#
Fetch a paginated list of the top holders for a specific reserve, filtered by suppliers or borrowers.
- React
- TypeScript
- GraphQL
Use the useReserveHolders hook to fetch reserve holders for a specific reserve.
Filter by ReserveHoldersFilter.Supplied (default) or ReserveHoldersFilter.Borrowed.