Elections

This is work-in-progress documentation for the elections system currently under development. See Synthetix Governance for information on the current system.

The elections system is responsible for calculating a given address’s voting power, tracking nominations, tabulating votes, and distributing NFTs to winners. This system can be deployed multiple times (for each council). The NFTs generated by this system can be integrated with other smart contracts to give the winners administrative power over other systems.

Epochs & Periods

Within each epoch, there are four periods:

  • Administration Period - No election is under way.

  • Nomination Period - Nearing the end of the epoch, addresses may be nominated for election.

  • Voting Period - After the nomination period, addresses with voting power may assign votes to nominees. New nominees can still be added during the voting period.

  • Evaluation Period - Finally, the voting period closes, votes are evaulated, and the winners are resolved. The existing NFTs are burned, new NFTs are minted to the winners, and the next administration period begins.

Configuration

Each election system is configured using the initOrUpgradeElectionModule function:

  • First Council - This is an array of addresses, which should be the initial holders of the NFTs. This also determined the number of seats for this council.

  • Minimum Active Members - If a member is dismissed, a new election is triggered if the number of remaining members drops below this amount.

  • Initial Nomination Period Start Date - A timestamp specifying when the first nomination period should start. This parameter is ignore if this system has already been specified.

  • Nomination Period Duration - The duration of the nomination period, in seconds.

  • Voting Period Duration - The duration of the voting period, in seconds.

  • Epoch Duration - The duration of a full epoch, in seconds.

Configuration may also be updated using the setNextElectionSetting and tweakEpochSchedule functions.

Nominations

During the nomination period, anyone can call the nominate function to add any address to the list of nominees. Any nominated address can call withdrawNomination to remove itself from the list.

Voting

Voting power is calculated by a snapshot contract (which must conform to the ISnapshotRecord interface). This may be a rewards distributor attached to a pool. The address of the contract is set using the setSnapshotContract.

During the nomination period, anyone can call takeVotePowerSnapshot. This can only be called once per epoch. This triggers the takeSnapshot function on the snapshot contract.

During the election period, anyone can call prepareBallotWithSnapshot for a specific address. This records the voting power for this voter from the snapshot contract. The voting power of an address can be retrieved using the getBallot function.

Voters then use the cast function to distribute their voting power across an array of nominees. If this is a cross-chain deployment (with multiple networks set using setSupportedCrossChainNetworks)and the vote is being cast on a deployment that isn't the "mothership deployment", the vote is sent to the mothership deployment using a cross-chain message.

Resolution

During evaluation period, anyone can call evaluate. (If this is a cross-chain deployment, this must be called on the mothership deployment.) Callers specify a batch size to evaluate, which defaults to 500 if unspecified. This allows the system to support the evaluation of an arbitrary number of votes, regardless of gas and block size limitations on the network it's deployed on.

Once all votes have been evaluated, anyone can call resolve on this deployment. This burns all of the existing NFTs and issues new NFTs to each of the winners. If there are other supported cross-chain networks, a cross chain message is sent to the other deployments which triggers the NFTs to be burned and issued on those networks as well.

Dismissals

The owner address of the election system (which has the ability to configure and upgrade it), can call dismissMembers to remove addresses from the council (burning their NFTs). If the number of remaining members drops below the configured minimum active members value, a new nomination period begins immediately.

Last updated