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.
Cap Automator
On Ethereum, supply and borrow caps are managed by the Cap Automator, which holds the RISK_ADMIN role. Cap Automator v1.1 (0x4C1341636721b8B687647920B2E9481f3AB1F2eE) replaced the earlier version as RISK_ADMIN in the March 12, 2026 spell. Source code: sparkdotfi/sparklend-cap-automator.
Governance sets a separate supply cap config and borrow cap config for each asset:
| Field | Description |
|---|---|
max | Highest value the cap can reach, in whole tokens. A max of 0 means the asset is not managed by the Cap Automator. |
gap | Headroom the Cap Automator keeps above the current total supply (or total debt). |
increaseCooldown | Minimum time between two cap increases. Decreases are not limited. |
When exec(asset) (or execSupply / execBorrow) is called by an address with the UPDATE_ROLE, the new cap is min(current total + gap, max). If the result is higher than the current cap and the cooldown since the last increase has not passed, the cap stays unchanged. Each config can be updated at most once per block.
The June 4, 2026 spell updated the configs: WETH and wstETH supply caps (and the WETH borrow cap) now have max set to the protocol maximum, weETH, WBTC and cbBTC received new max values, and all of these use a 4 hour increaseCooldown. Current configs can be read from supplyCapConfigs(asset) and borrowCapConfigs(asset) on the Cap Automator.