Supply Borrow Caps
Supply/Borrow Caps
Sky Governance can appoint RISK_ADMIN and POOL_ADMIN who have the ability to configure Borrow and Supply Caps of the individual reserves.
Borrow Caps
Allow modulation of how much of each asset can be borrowed, which reduces insolvency risk.
By default borrow cap of an asset is 0, which signifies no cap. Anyone who has been granted RISK_ADMIN or POOL_ADMIN role via the ACLManager can call setBorrowCap method in PoolConfigurator to update the max total borrow (stable + variable) for the given reserve.
The on-chain check is totalStableDebt + totalVariableDebt + amount ≤ borrowCap * 10^decimals. The cap is denominated in whole tokens (no decimals).
Supply Caps
Allow limiting how much of a certain asset is supplied to SparkLend. This helps reducing exposure to a certain asset and mitigate attacks like infinite minting or price oracle manipulation.
By default supply cap of an asset is 0, which signifies no cap. Anyone who has been granted RISK_ADMIN or POOL_ADMIN role via the ACLManager can call setSupplyCap method in PoolConfigurator to update the liquidity supply for the given reserve.
The on-chain check is (scaledTotalSupply + accruedToTreasury) * liquidityIndex + amount ≤ supplyCap * 10^decimals. Accrued interest counts toward the cap — long-idle reserves can therefore reach the supply cap purely from interest accrual.