{"componentChunkName":"component---src-pages-sccp-sccp-markdown-remark-frontmatter-sccp-tsx","path":"/sccp/sccp-52/","result":{"data":{"markdownRemark":{"fileAbsolutePath":"/vercel/path0/content/sccp/sccp-52.md","frontmatter":{"sip":null,"sccp":52,"title":"Change Debt Snapshot Stale Time to 4 Hours","network":"Ethereum","author":"Anton Jurisevic (@zyzek)","type":"Governance","proposal":null,"implementor":null,"release":null,"created":"2020-10-09T00:00:00.000Z","updated":null,"status":"Implemented"},"html":"<!--You can leave these HTML comments in your merged SCCP 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 SCCPs. Note that an SCCP number will be assigned by an editor. When opening a pull request to submit your SCCP, please use an abbreviated title in the filename, `sccp-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.\" Provide a simplified and layman-accessible explanation of the SCCP.-->\n<p>This SCCP proposes changing the debt snapshot stale time to 4 hours.</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 variable change proposed.-->\n<p>The pDAO will call <a href=\"https://etherscan.io/address/0x703D37fb776A4C905e28f7Ff23C73102ce36E08B#writeContract\"><code>SystemSettings.setDebtSnapshotStaleTime(15000)</code></a>.\nNote that the argument is 15000 seconds, which is actually 4 hours and 10 minutes.\nThis is to allow a snapshot heartbeat frequency of 4 hours, allowing the keeper bot 10 minutes of leeway\nto mine the transaction. This will save significant resources.\nThe keeper bot will still take snapshots earlier than 4 hours if the deviation exceeds the configured\nthreshold of 2%, so lowering the frequency should not unduly impact the integrity of the system.</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<!--The motivation is critical for SCCPs that want to update variables within Synthetix. It should clearly explain why the existing variable is not incentive aligned. SCCP submissions without sufficient motivation may be rejected outright.-->\n<p>Since <a href=\"/8d14e868f4a63ca5e3bc9a5ab9e83d4c/sip-83.md\">SIP-83</a> went live, snapshots have been operating approximately once per hour to ensure the\naccuracy of the snapshot. This cannot be slowed down as the current stale time is also 1 hour.\nThis stale time was initially set at a cautious level to protect the system, but has proven to be\nunnecessarily aggressive. Consider the following chart of the percentage deviation of the cached debt\nfrom the true total system debt over the day following the Deneb release.</p>\n<p><img src=\"/static/snapshot-deviations-4e94be7822bb9c283368f54a8c532604.svg\" alt=\"deviations\"></p>\n<p>The dashed lines indicate the times at which complete snapshots were performed to prevent\nthe snapshot going stale. The upper and lower bounds of this chart are the limits the\ndeviation would have to breach in order to trigger a fresh snapshot.</p>\n<p>Note in particular that the keeper's configured deviation threshold of 2% was never close to\nbeing breached. Over this period, the deviation at snapshot time exceeded 0.06% only twice.\nThose two snapshots occurred at deviation levels of 0.21% and 0.33%, so in order to\ntrigger a debt snapshot, the maximum deviation would need to be sixfold greater.\nAs each complete snapshot presently costs around 1.5 million gas, it is wasteful to spend\nthese resources updating a debt cache that is already highly accurate.</p>\n<p>The current stale frequency eliminates most of the benefit of <a href=\"/8d14e868f4a63ca5e3bc9a5ab9e83d4c/sip-83.md\">SIP-83's</a>\nmain snapshot update mechanisms.\nFirst, as the deviation is so low, deviation snapshots are never triggered, so\nthe partial snapshot mechanism is never able to operate.\nThis mechanism would allow minimal deviations to be maintained with much less gas expenditure by\ntargeting only those specific synths which have caused the price to deviate.\nSecond, the high snapshot frequency obscures the extent to which the deviation\nis corrected by cache updates due to synth exchanges.</p>\n<p>In effect the high snapshot frequency entails paying more to learn less, and for this reason\nand those described above, this SCCP proposes slowing the heartbeat down.\nIn the long run it may be a better approach to lower the stale time substantially,\nwhile also lowering the deviation threshold on the keeper bot.</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":"f6ea0c53-bea1-5cd5-b0c8-047b725e7cef","frontmatter__sccp":52,"__params":{"frontmatter__sccp":"52"}}},"staticQueryHashes":[]}