BreakerBox is an on-chain circuit breaker for oracle feeds. It maintains a state per price feed (e.g. trading allowed or suspended) and supports modular addition of price feeds and breaker logic. In Mento V3, the OracleAdapter reads from BreakerBox when supplying the FPMM pool with a valid rate; if a breaker has tripped, the adapter returns invalid and swaps revert. This protects pools from trading on stale or out-of-bounds oracle data.
Integrators typically do not call BreakerBox directly; the OracleAdapter uses it. If you need to check trading mode (e.g. for a status UI), use the adapter’s getRate(rateFeedID) and inspect tradingMode, or call getTradingMode(rateFeedID) on the adapter if exposed.
MedianDeltaBreaker
MedianDeltaBreaker is a circuit breaker that trips when the current median oracle rate compared to an exponential moving average over previous median rates exceeds a configured relative threshold.
ValueDeltaBreaker is a circuit breaker that trips when the current median oracle rate compared to a fixed reference rate exceeds a configured relative threshold.