Get account liquidity
Get account liquidity

Exactly · Reads onchain state

Reads how the Exactly Auditor values an account's collateral against its debt. accountLiquidity prices every market the account has entered at the Auditor's price feed, weighs each floating deposit by the market's adjust factor into the collateral sum, and divides each debt by the same factor into the debt sum, both in the Auditor's base unit at 18 decimals. The account can borrow while the collateral sum exceeds the debt sum, and can be liquidated once it does not. Reach for it to repay or add collateral before the account's margin runs out, holding the gap above a floor with a predicate.

On other protocols · 1