SIP-78: iSynth limit reset must not trip circuit breaker

Author
StatusImplemented
TypeGovernance
ImplementorTBD
ReleaseTBD
Discussions-Tohttps://research.synthetix.io/t/sip-78-isynth-limit-reset-must-not-trip-circuit-breaker/181
Created2020-08-19

Simple Summary

Ensure the repricing of an iSynth does not trigger the decentralized circuit breaker.

Abstract

When the protocolDAO resets an iSynth, it must also update the pricing for the iSynth in the last exchange price tracker in the Exchanger contract.

Motivation

SIP-65 introduced a decentralized circuit breaker which is tripped when a price on-chain is detected more than some given factor. When an iSynth is reset with a new entryPoint however, this changes the price quite significantly, and can trip the circuit breaker when there is a previous lastExchangeRate in Exchanger for that synth. This makes the synth unusable unless the factor is bumped up sufficiently to handle the iSynth repricing (or any iSynth repricing if many are performed simultaneously), and since the factor setting is system-wide, a much higher factor makes SIP-65 less useful overall.

Specification

Overview

When the protocolDAO resets an iSynth, the lastExchangeRate in Exchanger must be updated to the current iSynth rate with the latest entryPoint, to indicate a refreshed price for the synth.

Rationale

The protocolDAO already has the power to invoke ExchangeRates.setInversePricing(). It's at this point that the Exchanger must be told to update any previous exchange rate with the one calculated at the time of repricing.

Technical Specification

N/A

Test Cases

  • Given iETH is an inverse synth tracking ETH
  • And there exists a previous exchange into or out of iETH, ensuring Exchanger.lastExchangeRate(iETH) has an entry
  • When the protocolDAO invokes setInversePricing, changing the rate more than the Exchanger.priceDeviationThresholdFactor
  • And a user exchanges into or out of iETH
  • Then the exchange completes successfully and iETH is not suspended due to a price spike

Configurable Values (Via SCCP)

N/A

Copyright and related rights waived via CC0.