
Spark · Reads onchain state
Reads the maximum loan-to-value of an asset in an Aave market and whether it can back a borrow. The LTV is decoded from the reserve configuration in basis points and is the most debt the pool will let this collateral support at borrow time. canBeCollateral is true when the LTV is non-zero. Reach for it to compute borrowing capacity before a borrow, multiplying the collateral's value from a price read by the LTV, or to require an asset is eligible as collateral before supplying it for that purpose.
On other protocols · 2