{"componentChunkName":"component---src-pages-sips-sip-markdown-remark-frontmatter-sip-tsx","path":"/sips/sip-265/","result":{"data":{"markdownRemark":{"fileAbsolutePath":"/vercel/path0/content/sips/sip-265.md","frontmatter":{"sip":265,"sccp":null,"title":"Update Atomic Circuit Breakers","network":"Ethereum","author":"kaleb (@kaleb-keny), Afif (@aband1)","type":"Governance","proposal":null,"implementor":"TBD","release":null,"created":"2022-07-28T00:00:00.000Z","updated":null,"status":"Rejected"},"html":"<!--You can leave these HTML comments in your merged SIP and delete the visible duplicate text guides, they will not appear and may be helpful to refer to if you edit it again. This is the suggested template for new SIPs. Note that an SIP number will be assigned by an editor. When opening a pull request to submit your SIP, please use an abbreviated title in the filename, `sip-draft_title_abbrev.md`. The title should be 44 characters or less.-->\n<h2 id=\"simple-summary\" style=\"position:relative;\"><a href=\"#simple-summary\" aria-label=\"simple summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Simple Summary</h2>\n<!--\"If you can't explain it simply, you don't understand it well enough.\" Simply describe the outcome the proposed changes intends to achieve. This should be non-technical and accessible to a casual community member.-->\n<p>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.</p>\n<h2 id=\"abstract\" style=\"position:relative;\"><a href=\"#abstract\" aria-label=\"abstract permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Abstract</h2>\n<!--A short (~200 word) description of the proposed change, the abstract should clearly describe the proposed change. This is what *will* be done if the SIP is implemented, not *why* it should be done or *how* it will be done. If the SIP proposes deploying a new contract, write, \"we propose to deploy a new contract that will do x\".-->\n<p>Incorporate a new circuit breaker that uses the absolute value of the delta between the uniswap live price and uniswap twap.</p>\n<h2 id=\"motivation\" style=\"position:relative;\"><a href=\"#motivation\" aria-label=\"motivation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Motivation</h2>\n<!--This is the problem statement. This is the *why* of the SIP. It should clearly explain *why* the current state of the protocol is inadequate.  It is critical that you explain *why* the change is needed, if the SIP proposes changing how something is calculated, you must address *why* the current calculation is innaccurate or wrong. This is not the place to describe how the SIP will address the issue!-->\n<p>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.<br>\n<a href=\"https://ibb.co/hdNv5vF\">This plot</a> showcases the number of chainlink pushes per time horizon.</p>\n<p>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.\n<a href=\"https://ibb.co/qMfvYPR\">This chart</a> 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 <code>minDelta</code> to 150 bp helps lean against extreme distances between on-chain and off-chain prices.\nNote that in case pure chainlink price is used on a specific synth, then no volatility circuit breaker check would performed on the respective synth.\nThe below table showcases the impact of enacting the cicuit breaker for different twap/delta parameters. With a parameterization on <code>atomicVolatilityTwapSeconds</code> of 10min and and <code>atomicMaxTwapDelta</code> 175 bp, we should expect a circuit break on average of 58.6 seconds which occurs 2.8 times per day.</p>\n<table>\n<thead>\n<tr>\n<th><strong>twap/delta</strong></th>\n<th align=\"center\"><strong>125</strong></th>\n<th align=\"center\"><strong>150</strong></th>\n<th align=\"center\"><strong>175</strong></th>\n<th align=\"center\"><strong>200</strong></th>\n<th align=\"center\"><strong>225</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><em>1</em></td>\n<td align=\"center\">29|0.3</td>\n<td align=\"center\">3|0.1</td>\n<td align=\"center\">0|0</td>\n<td align=\"center\">0|0</td>\n<td align=\"center\">0|0</td>\n</tr>\n<tr>\n<td><em>2</em></td>\n<td align=\"center\">29.6|0.9</td>\n<td align=\"center\">23.5|0.2</td>\n<td align=\"center\">41|0.1</td>\n<td align=\"center\">0|0</td>\n<td align=\"center\">0|0</td>\n</tr>\n<tr>\n<td><em>5</em></td>\n<td align=\"center\">42.3|2.2</td>\n<td align=\"center\">35.4|1.2</td>\n<td align=\"center\">55.6|0.4</td>\n<td align=\"center\">51.3|0.3</td>\n<td align=\"center\">93|0.1</td>\n</tr>\n<tr>\n<td><em>10</em></td>\n<td align=\"center\">67.2|5.9</td>\n<td align=\"center\">53.9|3.4</td>\n<td align=\"center\">54|1.3</td>\n<td align=\"center\">60.7|0.6</td>\n<td align=\"center\">41|0.4</td>\n</tr>\n<tr>\n<td><em>15</em></td>\n<td align=\"center\">89.4|9.1</td>\n<td align=\"center\">80.9|4.7</td>\n<td align=\"center\">58.6|2.8</td>\n<td align=\"center\">51.8|1.3</td>\n<td align=\"center\">33.6|0.7</td>\n</tr>\n<tr>\n<td><em>30</em></td>\n<td align=\"center\">155.3|17</td>\n<td align=\"center\">140.1|10.6</td>\n<td align=\"center\">102|7.7</td>\n<td align=\"center\">68.3|5.1</td>\n<td align=\"center\">53.6|2.4</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"specification\" style=\"position:relative;\"><a href=\"#specification\" aria-label=\"specification permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Specification</h2>\n<!--The specification should describe the syntax and semantics of any new feature, there are five sections\n1. Overview\n2. Rationale\n3. Technical Specification\n4. Test Cases\n5. Configurable Values\n-->\n<h3 id=\"technical-specification\" style=\"position:relative;\"><a href=\"#technical-specification\" aria-label=\"technical specification permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Technical Specification</h3>\n<!--The technical specification should outline the public API of the changes proposed. That is, changes to any of the interfaces Synthetix currently exposes or the creations of new ones.-->\n<p>The user would specify a <code>atomicVolatilityTwapSeconds</code> and <code>atomicMaxTwapDelta</code> for each <code>atomicEquivalent</code> 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 <code>delta</code>, computed by <code>abs(UniLive/UniTwap-1)</code> is below <code>atomicMaxTwapDelta</code>. In case, <code>delta</code> exceeds <code>atomicMaxTwapDelta</code> on the source or destination currencies then the transaction reverts. It is worth mentioning that for the case of <code>PureChainlink</code> pricing no volatility breaker check is performed on the synth.\nFor example executing a trade from <code>sEUR</code> to <code>sBTC</code>, a volatility breaker check is still done on the <code>sBTC</code> side of the trade and that the trade reverts if delta exceeds <code>atomicMaxTwapDelta</code>.\nIt is worth nothing that the <code>uniswapInputAmount</code> is used to measure the live uniswap price, as specified in <a href=\"https://sips.synthetix.io/sips/sip-264/\">SIP-264</a>.</p>\n<h3 id=\"test-cases\" style=\"position:relative;\"><a href=\"#test-cases\" aria-label=\"test cases permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Test Cases</h3>\n<!--Test cases for an implementation are mandatory for SIPs but can be included with the implementation..-->\n<h3 id=\"configurable-values-via-sccp\" style=\"position:relative;\"><a href=\"#configurable-values-via-sccp\" aria-label=\"configurable values via sccp permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Configurable Values (Via SCCP)</h3>\n<!--Please list all values configurable via SCCP under this implementation.-->\n<ul>\n<li><code>atomicVolatilityTwapSeconds</code> configurable per <code>atomicEquivalent</code> (i.e. per synth that doesn't trade at pure chainlink price)</li>\n<li><code>atomicMaxTwapDelta</code> configurable per <code>atomicEquivalent</code> (i.e. per synth that doesn't trade at pure chainlink price)</li>\n</ul>\n<p>Rejected by author</p>\n<h2 id=\"copyright\" style=\"position:relative;\"><a href=\"#copyright\" aria-label=\"copyright permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Copyright</h2>\n<p>Copyright and related rights waived via <a href=\"https://creativecommons.org/publicdomain/zero/1.0/\">CC0</a>.</p>"}},"pageContext":{"id":"cc8d0698-32bc-51ed-b527-85055de6c5f7","frontmatter__sip":265,"__params":{"frontmatter__sip":"265"}}},"staticQueryHashes":[]}