Get account data
Get account data

Spark · Reads onchain state

Reads the socket's overall position in an Aave market: collateral, debt, borrow capacity, and health factor. The pool aggregates every reserve you use into base-currency totals for collateral and debt, the amount still available to borrow, the position's weighted LTV and liquidation threshold, and the health factor at 18 decimals. This is the exact view the pool uses when it decides whether a borrow or withdraw is allowed and whether the position can be liquidated. Reach for it to gate any step that changes leverage: require the health factor stays above a floor, size a borrow from availableBorrows, or trigger a repay when debt drifts past a target.

On other protocols · 4