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 status: frozen, paused
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.
The 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 or borrow.
Supply/Borrow Reserves
import { ReservesRequestFilter } from "@aave/react";
// …
const { data, error, loading } = useReserves({ query: { // your query criteria }, filter: ReservesRequestFilter.Supply, // or ReservesRequestFilter.Borrow});Add a user address to return ReserveUserState for each reserve.
Reserves User State
import { evmAddress } from "@aave/react";
// …
const { data, error, loading } = useReserves({ 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 how to use the useReserve hook.
Borrow APY History
Fetch historical borrow APY data for a specific reserve.
- React
- TypeScript
- GraphQL
Use the useBorrowApyHistory hook to fetch borrow APY history over time.
See below for examples of how to use the useBorrowApyHistory hook.
Supply APY History
Fetch historical supply APY data for a specific reserve.
- React
- TypeScript
- GraphQL
Use the useSupplyApyHistory hook to fetch supply APY history over time.
See below for examples of how to use the useSupplyApyHistory hook.