

Reads onchain state
Reads an address's overall position in a Spark market: collateral, debt, borrow capacity, and health factor. The pool aggregates every reserve the account uses 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.
Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.
More on Spark · 25


























On other protocols · 6