Liquidity Hubs
Learn how to discover and access liquidity hubs in Aave v4.
Hub Structure
Hub data provide an aggregate view of a liquidity hub, including:
Identification: id, name, chain, address
Aggregated details: totalSupplied, totalBorrowed
System caps: totalSupplyCap, totalBorrowCap
- TypeScript
- GraphQL
- Solidity
The following TypeScript interfaces illustrate the core Hub type:
Listing Available Hubs
Discover all available Aave Liquidity Hubs across supported networks.
- React
- TypeScript
- GraphQL
- Solidity
Use the useHubs hook to fetch a list of liquidity hubs.
The useHubsAction hook does not watch for updates. Use it when you need on-demand, fresh data (e.g., in an event handler).
See below for some examples of how to use the useHubs hook.
Fetching a Single Hub
Get detailed information about a specific liquidity hub.
- React
- TypeScript
- GraphQL
Use the useHub hook to fetch a specific hub.
See below for some examples of how to use the useHub hook.
Hub Assets
Hub assets are the ERC-20 tokens held by a given hub.
Hub Asset Structure
Hub Asset data provides detailed information about each asset available on a liquidity hub, including:
Identification: id, onchainAssetId, underlying token details
Hub reference: the hub where this asset is available
Summary metrics: supplied/borrowed amounts, APY rates, utilization
Settings: fee receiver, liquidity fees, strategies
User state: user's balance (when user is specified in request)
- TypeScript
- GraphQL
- Solidity
Listing Hub Assets
Discover all available assets on an hub, including their liquidity metrics, APY rates, and user-specific data.
- React
- TypeScript
- GraphQL
- Solidity
Use the useHubAssets hook to fetch assets for a specific hub.
See below for examples of how to use the useHubAssets hook.
Add a user address to return HubAssetUserState for each asset.
Hub Asset User State
import { evmAddress } from "@aave/react";
// …
const { data, loading, error } = useHubAssets({ query: { // your query criteria }, user: evmAddress("0x456…"),});