
Aave V4 · Reads onchain state
Reads an Aave V4 reserve's live rates, risk parameters and hub accounting. The spoke's reserve record comes back whole: the underlying, the hub and asset id it draws on, decimals, the collateral risk that feeds a borrower's risk premium, the flag word and the dynamic config key new collateral snapshots to. Beside it sit the hub's current drawn rate in ray, what the hub is owed split into drawn principal and accrued premium, the total supplied, the liquidity fee, and the collateral factor, maximum liquidation bonus and liquidation fee of the reserve's current dynamic config. Two annual rates are derived on-chain at 18 decimals: borrowApr is the drawn rate the hub accrues linearly between touches, and supplyApr is that rate on the drawn and premium shares the index accrues over, spread over what is supplied, after the hub's fee. Reach for it when a strategy chooses between spokes or hubs by yield, gates a supply on a minimum rate, or wants the collateral factor a fresh borrow would be snapshotted at before it commits.
On other protocols · 3