Get available liquidity
Get available liquidity

Aave · Reads onchain state

Reads how much of an asset an Aave reserve holds unborrowed right now. The number is the asset balance sitting in the reserve's aToken contract: what is actually there to fund a borrow or a withdrawal at this block. When it nears zero, suppliers cannot withdraw and borrowers cannot borrow until someone repays or supplies. Reach for it to cap a borrow or withdraw at what the reserve can pay out, taking a min with your target, or to require enough liquidity exists before a flash loan or large withdrawal so the transaction fails early instead of reverting inside the pool.

On other protocols · 2