Circuit breaker
The circuit breaker is a security module that limits the amount of protocol funds outflow every 24 hour window.
The circuit breaker of StableUnit is a smart contract that monitors the flows of funds from the protocol. All withdrawals, loans and liquidations go through it.
It serves as a safety mechanism as it triggers a temporary withdrawal limit on the assets in the protocol in case of a large withdrawal (large borrow, closing position and liquidation). This is done to limit the maximum possible loss of protocol funds, oracle manipulation or hacks and doesn't affect the regular workflow.
As of now, the threshold is set as 15% of the Total Value Locked (TVL) per 24 hours. Upon being triggered, three potential outcomes are possible:
The DAO elected admin manually resets the circuit breaker: In this situation, all withdrawals are immediately allowed.
No action by the admin or DAO within the threshold period: If neither the admin nor the DAO takes any action within the time period, all held funds will be automatically released.
Admin escalates the issue: In this case, the DAO must resolve the situation through a voting process.
To prevent sudden stops in the fund flows, the contract emits a warning event when it is halfway towards reaching the interruption condition. This warning allows an admin to foresee potential interruption scenarios in advance.
From a composability perspective, all interfaces stay the same, and overall execution guarantees aren't different to the ones of AAVE or Compound. Their operations works most of the time, with exception to short time periods with limited available liquidity. In the case of StableUnit, you can think of it as virtual auto-recuperating liquidity. In other words, as of now, the leaders in the market do not offer strong guarantees regarding users’ withdrawal ability at 100% uptime. The circuit breaker doesn’t change the ability to withdraw from the protocol in comparison to market leaders.
Last updated