Get price
Get price

Aave V4 · Reads onchain state

Reads the price a spoke's own oracle assigns to a reserve. Every Aave V4 spoke prices its reserves through its own oracle, keyed by reserve rather than by token, so the same asset can carry a different source on two spokes. The number here is the one the spoke uses when it values your collateral, sizes a borrow, and decides whether to liquidate, read inside the same transaction that acts on it rather than a figure that was true a block ago. The oracle answers in 8 decimals; the read rescales it to 18. Reach for it whenever a strategy has to convert between a dollar amount and a token amount before it does something: sizing a supply so it lands at a target health factor, capping a repay at what the debt is actually worth, deciding whether a position has drifted far enough to rebalance.

On other protocols · 9