

Reads onchain state
Reads the Sky-governance-set borrow cap of an asset in a Spark market. The cap is decoded from the reserve configuration in whole tokens; zero means no cap. Once total borrows reach it, the pool rejects new borrows of that asset regardless of your collateral. Reach for it with total borrowed to compute remaining borrowable room and size a borrow that will actually go through, or to require headroom exists before committing collateral in an earlier step.
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 · 2