
Aave · Reads onchain state
Reads whether you have an asset enabled as collateral in an Aave market. Aave tracks collateral use per user, per reserve, as a bit in your configuration bitmap. This action reads the pool, finds the reserve's id, and pulls that bit for the socket, returning isCollateralEnabled as a boolean. Supplying an asset does not guarantee it counts toward borrowing power; this flag decides it. Reach for it before a borrow so a predicate can require the collateral is switched on, or to branch: enable collateral only when it is currently off, then proceed to the borrow in the same transaction.
On other protocols · 1