Circuit Breaker, Pausing, and Liquidity Stress
Circuit Breaker
Section titled “Circuit Breaker”Purpose
Section titled “Purpose”The circuit breaker is a velocity control on outflows. It limits how fast capital can leave through wrapper withdraw paths, protecting against exploit-velocity drains and flash-driven extraction.
The circuit breaker is not a permanent lock on user exits. Once capacity replenishes, withdrawals resume at normal pace.
Dual-Buffer Model
Section titled “Dual-Buffer Model”The CircuitBreaker.sol contract uses a dual-buffer rate limiter:
- Main replenishing buffer: caps total outflow within a configurable time window. Replenishes over time.
- Elastic buffer: tracks recent inflows and allows proportional additional outflow capacity.
Both buffers are checked via checkAndRecordOutflow on wrapper withdraw calls. If limits are exceeded, the withdrawal reverts.
Configuration
Section titled “Configuration”- Protected-contract registry controls which contracts are subject to rate limits
- Owner-configurable time windows and maximum draw rates
- Parameters are set per circuit breaker instance
Interaction with exits
Section titled “Interaction with exits”Both exits via redeem (divest) and exits via withdraw (withdrawFT) flow through the wrapper and are subject to circuit breaker checks. If limits are exceeded, the call reverts and can be retried as capacity replenishes.
Pausing
Section titled “Pausing”Admin can pause deposits. Exits remain available even when paused, see Roles and Permissions for details.
Pausing is a defensive measure for scenarios like:
- Suspected exploit in progress
- Oracle instability
- Strategy-layer concerns requiring investigation
Liquidity Stress Scenarios
Section titled “Liquidity Stress Scenarios”Partial upstream liquidity
Section titled “Partial upstream liquidity”Scenario: strategy cannot provide full requested liquidity immediately (e.g., high Aave utilization).
Expected behavior:
- Availability checks reflect constrained withdrawal capacity
- Calls may partially succeed at lower layers or revert in exact-amount flows
- Users can retry as liquidity conditions improve
The capital still exists, it’s lent out and recoverable as upstream liquidity normalizes.
Mass redemption under circuit breaker
Section titled “Mass redemption under circuit breaker”Scenario: large share of investors attempt exits simultaneously, triggering circuit breaker limits.
Expected behavior:
- Early exits within the buffer limits succeed immediately
- Once limits are reached, subsequent exits revert until capacity replenishes
- Processing stretches over time as the buffer refills
- Deterministic conversion rules ensure all investors receive the same rate regardless of exit order
Circuit breaker + strategy liquidity combined
Section titled “Circuit breaker + strategy liquidity combined”In a scenario where both circuit breaker limits and strategy liquidity are constrained:
- Circuit breaker limits dominate when they are tighter than available liquidity
- Yield strategy liquidity limits dominate when available liquidity is less than circuit breaker capacity
- The effective withdrawal rate is the minimum of the two constraints
- Both constraints are temporary and resolve independently