Skip to main content
Hub-and-spoke lending. Liquidity sits in a Hub; users supply, borrow and repay through Spokes, and each Spoke addresses its assets by reserve id rather than by token address.

Notes

  • Arc’s market lists USDC, EURC, WETH and cirBTC. The Main Spoke carries all four; the Forex Spoke carries USDC and EURC
  • A chain can carry several Hubs, and a Spoke draws on one or more of them: getReserveId(hub, assetId) needs the Hub the asset lives in. Base carries only an equities market (tokenized stocks and USDC) with no core hub
  • Each chain also has a Treasury Spoke, which collects fees; it is not a market and is not registered
  • Hub, Spokes and their implementations are upgradeable (EIP-1967) proxies
  • Addresses come from bgd-labs/aave-address-book (AaveV4Ethereum, AaveV4Base, AaveV4Avalanche, AaveV4Arc)

Its names in a program

On Ethereum, AaveV4 is a namespace: its contracts need no import.

Deployments

ABI

AaveV4HubABI

import AaveV4HubABI from "./protocols/aave-v4/AaveV4HubABI.json"; Speaks for: coreHub, plusHub, primeHub, globalDollarHub, equitiesHub.
  • getAssetId(address underlying) view returns (uint256)
  • getAssetCount() view returns (uint256)
  • getAssetLiquidity(uint256 assetId) view returns (uint256)
  • isUnderlyingListed(address underlying) view returns (bool)

AaveV4SpokeABI

import AaveV4SpokeABI from "./protocols/aave-v4/AaveV4SpokeABI.json"; Speaks for: mainSpoke, forexSpoke, bluechipSpoke, ethenaCorrelatedSpoke, ethenaEcosystemSpoke, goldSpoke, paxgGoldSpoke, lombardBtcSpoke, usdgPendleSpoke, etherfiESpoke, kelpESpoke, lidoESpoke, usdgMapleESpoke, mag7Spoke, avaxCorrelatedSpoke.
  • supply(uint256 reserveId, uint256 amount, address onBehalfOf) returns (uint256, uint256)
  • withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) returns (uint256, uint256)
  • borrow(uint256 reserveId, uint256 amount, address onBehalfOf) returns (uint256, uint256)
  • repay(uint256 reserveId, uint256 amount, address onBehalfOf) returns (uint256, uint256)
  • setUsingAsCollateral(uint256 reserveId, bool usingAsCollateral, address onBehalfOf)
  • getReserveId(address hub, uint256 assetId) view returns (uint256)
  • getReserveCount() view returns (uint256)
  • getUserSuppliedAssets(uint256 reserveId, address user) view returns (uint256)
  • getUserTotalDebt(uint256 reserveId, address user) view returns (uint256)

Next steps