depositLimit/borrowLimit ceiling.
The two caps
Each reserve has twoWithdrawalCaps structs:
Both are denominated in token base units of the reserve’s mint.
Field semantics
When the interval elapses (i.e.,
now > lastIntervalStartTimestamp + configIntervalLengthSeconds), currentTotal resets to zero on the next operation.
Setting configCapacity to disable
configCapacity = 0 disables the cap (the program treats 0 as no limit). To enable a cap, set a positive value.
To temporarily lock down a reserve, set configCapacity to a small positive value during a config update — the next operation that would push net flow above the cap will revert. Avoid 0, which disables the cap entirely.
Worked example
A new reserve for a long-tail asset listed withdepositLimit = 10M tokens. The curator wants to limit per-day inflows to 1M tokens during the first month to keep TVL growth proportionate to the asset’s available on-chain liquidity.
configCapacity to scale with comfort.
Common configurations
Updating caps
Edit the reserve config, runupdate-reserve-config:
currentTotal and lastIntervalStartTimestamp are not reset by a config update — the interval continues running with the new capacity.
Caps vs. utilization-based blocking
Two related fields throttle different things:
Use caps when you want predictable per-day flow limits (e.g., asset-issuer agreements). Use the utilization limit when you care about preventing leverage at high utilization levels.
The two work together: caps throttle volume, the utilization limit shapes the curve.
Reading current cap state
download-reserve-config returns currentTotal and lastIntervalStartTimestamp along with the configured fields. Use it to inspect how much of the current interval’s capacity has been consumed.
Reference
- Reserve config reference —
depositWithdrawalCapanddebtWithdrawalCapfields - Risk parameters —
depositLimit,borrowLimit,utilizationLimitBlockBorrowingAbovePct