{"componentChunkName":"component---src-pages-sips-sip-markdown-remark-frontmatter-sip-tsx","path":"/sips/sip-360/","result":{"data":{"markdownRemark":{"fileAbsolutePath":"/vercel/path0/content/sips/sip-360.md","frontmatter":{"sip":360,"sccp":null,"title":"Synthetix V3 Cross-chain Elections System","network":"Ethereum, Optimism & Base","author":"Matias Lescano (@mjlescano), Daniel Beal (@dbeal-eth),  Noah Litvin (@noahlitvin)","type":"Governance","proposal":"https://snapshot.org/#/snxgov.eth/proposal/0x3cbf44acc4fff8568ae2680bf426de87a18a65ea93e509e6c4a2abae29abc506","implementor":"meb (@barrasso), moss (@moss-eth)","release":null,"created":"2024-02-06T00: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 SIP proposes a new system for facilitating on-chain elections.</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>This system allows users to nominate candidates, cast votes based on participation in multiple Synthetix deployments, and distribute NFTs to the winners across an arbitrary number of EVM-compatible blockchains.</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>The proposed system builds on learnings from Synthetix’s existing elections system, implements the latest smart contract architecture developed by Synthetix’s Core Contributors, and integrates with cutting-edge decentralized technology for reading and writing data across multiple chains. This proposal strives for simplicity and extensibility, such that voting power calculations can be easily adapted based on future governance decisions around Synthetix’s collateralization and cross-chain expansion.</p>\n<p>This system consists of a single codebase that can be deployed as a <em>mothership</em> or a <em>satellite</em>. Election results are calculated on the mothership, which transfers NFTs to the winners and sends a cross-chain message to the satellite deployments, triggering the transfer of their NFTs as well.</p>\n<p>The mothership could be deployed on OP Mainnet (to maintain parity with the current elections system), Ethereum mainnet (for maximum security), a Synthetix-specific appchain, or any other EVM-compatible blockchain.</p>\n<p>The representation of election winners as NFTs allows for direct integrations with deployments of the Synthetix protocol—as the owner of a deployment or as a <a href=\"https://sips.synthetix.io/sips/sip-341/\">configurer</a>, which can only execute SCCPs—via a <a href=\"https://docs.safe.global/safe-smart-account/modules\">Safe Module</a>. This module could also require approval from a Risk Council and/or implement a timelock/veto pattern. Other protocols, including existing ecosystem projects, are able to integrate with these NFTs to grant the holders special permissions or incentives as well.</p>\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=\"overview\" style=\"position:relative;\"><a href=\"#overview\" aria-label=\"overview 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>Overview</h3>\n<!--This is a high level overview of *how* the SIP will solve the problem. The overview should clearly describe how the new feature will be implemented.-->\n<p>This system is always in one of two states:</p>\n<ul>\n<li>\n<p><strong>Administration Period</strong> - At the beginning of this period, anyone can call the <code>resolve</code> function on the mothership. NFTs are distributed to the elected nominees which have received the most votes in the previous cycle. <em>Wormhole Queries</em> is used to gather all of the votes cast across any satellite deployments. A cross-chain message is sent via <em>Wormhole Messages</em> such that the NFTs controlled by the satellite deployments are redistributed as well. Throughout the administration period, addresses can be nominated for the following election period.</p>\n</li>\n<li>\n<p><strong>Election Period</strong> - At the beginning of this period, anyone can call the <code>commence</code> function on the mothership. This finalizes the list of candidates, sending them to the satellites via a cross-chain message. Throughout the election period, users on any chain with a mothership or satellite deployment can cast their votes, distributing their voting power across an array of candidates.</p>\n</li>\n</ul>\n<h3 id=\"rationale\" style=\"position:relative;\"><a href=\"#rationale\" aria-label=\"rationale 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>Rationale</h3>\n<!--This is where you explain the reasoning behind how you propose to solve the problem. Why did you propose to implement the change in this way, what were the considerations and trade-offs. The rationale fleshes out what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.-->\n<p>This system allows a single codebase to be maintained for deployment across multiple chains with separate instances for each council, all managed in Synthetix V3’s <a href=\"https://github.com/synthetixio/synthetix-deployments\">deployments repository</a>.</p>\n<p>This system could also be owned by a Safe with a custom Safe Module that includes special requirements for modifying election system configurations (i.e. “meta-governance”) like the list of registered snapshot/checkpoint contracts or period durations. A Safe Module which owns another aspect of the Synthetix protocol should enforce similar requirements for the <code>nominateOwner</code> functions.</p>\n<p>The use of cross-chain messaging maximizes interoperability and resilience against cross-chain infrastructure failure. For example, an alternative architecture could involve the election winners only being recorded on the mothership, requiring a cross-chain query for any integration on another chain. This would mean integrations on other chains would fail if the cross-chain queries were unsuccessful. Instead, under this model, temporary cross-chain query downtime would only prevent voting during the outage. Also, with the proposed architecture, a failure in cross-chain message delivery could be resolved by simply calling the <code>resolve</code> function again.</p>\n<p>This system is designed to be fully permissionless. There is no need for specific addresses to have elevated permissions or the creation of merkle trees off-chain. Bots will be incentivized to call <code>createCheckpoint</code> with ETH. Election winners will be motivated to call the <code>resolve</code> function as soon as possible, such that they receive NFTs. The<code>commence</code> function can be triggered automatically when the first vote is cast in the election period, if necessary. The implementation will allow for an <code>owner</code> address to execute upgrades specified by SIPs, though ownership of the system can be revoked in the future.</p>\n<p>An earlier draft of this proposal involved votes only being cast on the mothership deployment, relying on Wormhole Queries to determine voting power for addresses across all chains. A major advantage to this approach would be the ability to remove snapshot/checkpoint functionality. This approach has been abandoned because the integration with Queries cannot currently rely on the availability of archive nodes to retrieve arbitrarily old state. Also, because smart accounts with the same address can have different owners across chains, it is necessary to have users cast votes on satellites.</p>\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<h4 id=\"initialization-and-configuration\" style=\"position:relative;\"><a href=\"#initialization-and-configuration\" aria-label=\"initialization and configuration 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>Initialization and Configuration</h4>\n<p>On initialization, the system can distribute the NFTs to a list of provided addresses, which also determines the total number of NFTs for the system. The configuration consists of the duration of the administration period and the election period, a list of chain IDs/addresses for all of the deployments, an array of chain IDs/addresses of the ERC-20 compliant contracts to use for calculating voting power, and whether voting power should be calculated on a linear or quadratic scale.</p>\n<p>This proposal entails the mothership being deployed on OP Mainnet and all councils using a quadratic scale, except for the Treasury Council and the Spartan Council. It is the responsibility of the snapshot/checkpoint contracts to normalize voting power (e.g. between v2 and v3 participants). For Synthetix V2X, this contract would reference the <a href=\"https://sips.synthetix.io/sips/sip-185/\">debt shares contract</a>. For V3, this contract would reference a simple <a href=\"https://sips.synthetix.io/sips/sip-305/\">rewards distributor</a> contract designed for this purpose.</p>\n<h4 id=\"functionality\" style=\"position:relative;\"><a href=\"#functionality\" aria-label=\"functionality 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>Functionality</h4>\n<p>All of the following functions are only available on the mothership, unless otherwise noted:</p>\n<ul>\n<li><code>nominate</code> - During either period, any address can nominate themselves to run in the following election period. The sends a cross-chain message to syncronize this list across all deployments.</li>\n<li><code>withdraw</code> - During the administration period, any nominee can remove themselves as a candidate for the following election period.</li>\n<li><code>createCheckpoint</code> - During the administration period, anyone can call this function to generate a checkpoint on all of the voting power contracts. This also triggers a cross-chain message to do the same on each of the satellites. This can be called a maximum of once per week. If the system holds sufficient ETH, it pays the address calling the function a configurable amount.</li>\n<li><code>commence</code> - After the duration of the administration period has expired, this function can be called by anyone to initialize a new election period. This uses <em>Pyth’s Entropy</em> to randomly select a timestamp from the previous administration period that will be used on the <code>getPastVotes</code> function. This is sent to the satellite deployments.</li>\n<li><code>cast</code> - During the election period, a user can call this function with a mapping of candidates to weights (pertaining to the voting power they’d like to assign to those candidates) on a mothership or a satellite deployment. This is recorded on the chain where the vote is cast.</li>\n<li><code>resolve</code> - After the duration of the election period has expired, anyone can call this function to initialize the next administration period. <em>Wormhole Queries</em> is used to read the total votes cast across all deployments and determine the winners. The mothership re-assigns the owners of the NFTs to the winners of the election of the system and calls <em>Wormhole Messaging</em> to transfer the NFTs on the satellite deployments. (Note that the NFTs cannot be transfered by their owners; only the election system may transfer them.)</li>\n<li><code>configure</code> - This allows the system owner to update the configuration settings, listed below. This can also be called on satellite deployments.</li>\n</ul>\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<p>Relevant tests will be developed during implementation.</p>\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>size</code> - The number of NFTs distributed by a particular system, only relevant on the mothership deployment.</li>\n<li><code>administrationDuration</code> - The duration (in seconds) before a new election period can be initialized after <code>resolve</code> is called.</li>\n<li><code>electionDuration</code> - The duration (in seconds) before a new administration period can be initialized after <code>commence</code> is called.</li>\n<li><code>mothership</code> - This is the chain ID and address for the mothership deployment.</li>\n<li><code>satellites</code> - This is an array of chain ID and address pairs for each satellite, only relevant on the mothership deployment.</li>\n<li><code>votingPowerContracts</code> - This is an of array of addresses for <code>ERC20Votes</code>-compliant contracts.</li>\n<li><code>checkpointReward</code> - An amount of ETH to send to the caller of <code>createCheckpoint</code>.</li>\n</ul>\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":"1c41c580-ef33-5b50-8fed-08d6a87b6b38","frontmatter__sip":360,"__params":{"frontmatter__sip":"360"}}},"staticQueryHashes":[]}