SKIP TO CONTENT
Security

Circuit Breaker

Automated protection that halts operations when predefined risk thresholds are exceeded.

What is a Circuit Breaker?

A circuit breaker is an automated safety mechanism that triggers protective actions when predefined thresholds are exceeded. Unlike manual emergency pauses, circuit breakers activate automatically based on on-chain conditions, providing immediate response to detected anomalies.

How Circuit Breakers Work

1. Monitoring: Contract tracks relevant metrics in real-time 2. Threshold Definition: Parameters set for acceptable ranges 3. Trigger Detection: Code detects when limits exceeded 4. Automatic Response: Pre-programmed actions execute 5. Reset Conditions: Criteria for normal operations to resume

Common Circuit Breaker Triggers

Price Deviation: Asset prices move too far from oracle prices Volume Spikes: Unusual transaction volumes detected TVL Changes: Large deposits or withdrawals Utilization Rates: Borrowing or liquidity thresholds Time-Based: Rate limits on operations per block/period

Circuit Breaker Actions

When triggered, circuit breakers may:

  • Pause specific functions
  • Limit transaction sizes
  • Disable new positions
  • Enable protective liquidations
  • Switch to backup oracles

Circuit Breakers in Practice

Lending Protocols:
  • Pause borrows when utilization hits 100%
  • Limit collateral factor changes
  • Enable emergency liquidations
DEXs:
  • Limit price impact per trade
  • Pause pools with abnormal pricing
  • Rate limit large swaps
Bridges:
  • Delay large transfers
  • Require additional verification
  • Limit daily transfer volumes

Design Considerations

False Positives: Overly sensitive triggers cause unnecessary pauses Manipulation Risk: Attackers might trigger breakers intentionally Recovery: Clear path to resume normal operations Transparency: Users should understand trigger conditions

Circuit Breaker vs Emergency Pause

AspectCircuit BreakerEmergency Pause
. . . .. . . . . . . . -. . . . . . . . -
TriggerAutomaticManual
SpeedImmediateDepends on responder
FlexibilityPredefined onlyAny situation
TrustTrustlessRequires trusted party

Limitations

  • Can't detect all attack types
  • Novel attacks may bypass thresholds
  • May lock legitimate users during volatility
  • Complexity adds potential bugs

Best Practices

  • Test thresholds extensively
  • Monitor trigger frequency
  • Communicate breaker conditions
  • Provide manual override capability
  • Regular threshold review and adjustment

Examples

  • Chainlink circuit breakers trigger on price deviation
  • MakerDAO has liquidation circuit breakers

See this concept in action across live DeFi protocols.

Track live yields, compare protocols, and build your DeFi portfolio with Fensory.

GET EARLY ACCESSArrow right