Circuit Breakers

Overview

Circuit breakers are emergency mechanisms that could pause or limit vault operations during abnormal conditions. While not built into the core FluxVault contract, vault deployers may consider implementing these patterns in wrapper contracts or external systems.


Types of Circuit Breakers

Important: The examples below are NOT implemented in the core FluxVault contract. They demonstrate patterns that could be implemented in custom vault wrappers or monitoring systems.

1. Pause Mechanism

Example of how a pause mechanism could work in a custom implementation:

// Emergency pause
function pause() external onlyOwner {
    _pause();
    emit Paused(msg.sender);
}

// Resume when safe
function unpause() external onlyOwner {
    _unpause();
    emit Unpaused(msg.sender);
}

When to use:

  • Smart contract exploit detected

  • Critical oracle failure

  • Severe market manipulation

  • Unknown vulnerability

2. Deposit Cap

Limit total deposits:

When to use:

  • New vault launch

  • Testing phase

  • Risk management

  • Gradual scaling

3. Utilization Limit

Cap maximum utilization:

When to use:

  • Ensure LP liquidity

  • Prevent over-leverage

  • Market stress periods

4. Per-Position Limits

Limit individual manager exposure:

When to use:

  • Diversify risk

  • Prevent concentration

  • Limit single-point failures


Implementation

Basic Circuit Breaker

Automated Circuit Breaker


Monitoring and Triggers

Define Trigger Conditions


Recovery Procedures

Resume Checklist

Before unpausing:

Gradual Resume

Don't resume all at once:


Communication

Trigger Announcement

All-Clear Announcement


Best Practices

1. Test Regularly

Simulate circuit breaker activation:

  • Test pause functionality

  • Verify resume procedures

  • Check communication channels

  • Train team on response

2. Multiple Controls

Layer defenses:

3. Clear Governance

Document who can trigger:

  • Multisig for manual pause

  • Automated for critical thresholds

  • Emergency contacts

  • Response procedures

4. Transparent

Communicate:

  • What triggers exist

  • How they work

  • Who controls them

  • Expected response time


Last updated