SIP-265: Update Atomic Circuit Breakers


Simple Summary

This SIP proposes improvements to the atomic exchange circuit breaker which uses the delta between the uniswap live price and uniswap twap price replacing the existing volatility circuit breaker that counts the number of chainlink transactions per time interval.


Incorporate a new circuit breaker that uses the absolute value of the delta between the uniswap live price and uniswap twap.


The current circuit breaker methodology is difficult to calibrate and is highly dependend on changes in update frequencies of chainlink. It does not allow for fine tuning against excess volatility given that the number of price pushes is an integer and is a lagging indicator due to the need for chainlink to push a price for the circuit breaker to be activated. Furthermore, it fails to incorporate price stability in a prompt manner leading to prolonged periods of disabled trading.
This plot showcases the number of chainlink pushes per time horizon.

The new methodology entails measuring the absolute delta between the live in-block price and a twap price and comparing that to a max delta specified via sccp. This permits the SC to specify a certain number of bp deviation between spot and twap that triggers a circuit breaker, allowing for finer fine-tuning and a more elegant resumption of trading. This chart shows the delta between uniswap spot and centralized exchange prices, as a function of the absolute value of the delta between uniswap-spot and 10 min twap. It shows that setting the minDelta to 150 bp helps lean against extreme distances between on-chain and off-chain prices. Note that in case pure chainlink price is used on a specific synth, then no volatility circuit breaker check would performed on the respective synth. The below table showcases the impact of enacting the cicuit breaker for different twap/delta parameters. With a parameterization on atomicVolatilityTwapSeconds of 10min and and atomicMaxTwapDelta 175 bp, we should expect a circuit break on average of 58.6 seconds which occurs 2.8 times per day.

twap/delta 125 150 175 200 225
1 29|0.3 3|0.1 0|0 0|0 0|0
2 29.6|0.9 23.5|0.2 41|0.1 0|0 0|0
5 42.3|2.2 35.4|1.2 55.6|0.4 51.3|0.3 93|0.1
10 67.2|5.9 53.9|3.4 54|1.3 60.7|0.6 41|0.4
15 89.4|9.1 80.9|4.7 58.6|2.8 51.8|1.3 33.6|0.7
30 155.3|17 140.1|10.6 102|7.7 68.3|5.1 53.6|2.4


Technical Specification

The user would specify a atomicVolatilityTwapSeconds and atomicMaxTwapDelta for each atomicEquivalent traded (i.e. specific for each synth). Upon trade, a check is done on both the source and destination currencies individually to ensure that the delta, computed by abs(UniLive/UniTwap-1) is below atomicMaxTwapDelta. In case, delta exceeds atomicMaxTwapDelta on the source or destination currencies then the transaction reverts. It is worth mentioning that for the case of PureChainlink pricing no volatility breaker check is performed on the synth. For example executing a trade from sEUR to sBTC, a volatility breaker check is still done on the sBTC side of the trade and that the trade reverts if delta exceeds atomicMaxTwapDelta. It is worth nothing that the uniswapInputAmount is used to measure the live uniswap price, as specified in SIP-264.

Test Cases

Configurable Values (Via SCCP)

  • atomicVolatilityTwapSeconds configurable per atomicEquivalent (i.e. per synth that doesn't trade at pure chainlink price)
  • atomicMaxTwapDelta configurable per atomicEquivalent (i.e. per synth that doesn't trade at pure chainlink price)

Rejected by author

Copyright and related rights waived via CC0.