Governance Technical Architecture
Smart Contracts
There are several essential smart contracts that operate together to comprise the governance system.
- Token: Tracks the balances of token holders and voting power of delegates.
- Governor: Provides the main access control logic of the governance system. Its primary job is to process proposals and their associated votes in order to determine whether they succeed or fail. See also Governance Process .
- Timelock: Receives instructions from the governor for successful proposals. Provides a time delay on proposals to give time for stakeholders to respond, should it be needed, then executes the instruction.
- Modules (e.g. approval voting): Provide optional additional voting strategies (e.g. introducing multiple-choice voting proposals) to the Governor.
- Security Council: A trusted multisig that has admin privileges over many parts of the system that require manual execution (non-emergency protocol upgrades) or to intervene as a last resort (emergency protocol upgrades). Read more about the Security Council here.
The Governor is the smart contract that enables the voting process, and officially resolves proposals as passed or failed. The Governor, powered by Agora, is an upgraded version of OpenZeppelin’s governor, which itself is the standard trusted by top protocols to secure billions in value.
Addresses
Token
The $SCR token is an upgraded ERC20 token.
- A few key upgrades over ERC20:
- Voting Power Tracking: Unlike a standard ERC20, which doesn’t inherently track voting power, the $SCR token uses checkpoints to maintain a history of each address’s voting power.
- Partial Delegation of Voting Power: This means that if you choose to delegate your voting power, you can divide that power equally among several delegates rather than choosing only one.
- Automatic Voting Power Adjustment on Transfer: Voting power is automatically adjusted when tokens are transferred. This ensures that the voting power accurately reflects the current token distribution.
- Governance-related read functions
- Total Supply: Gives the total supply of the governance token.
- Balance Of: Provides the balance of tokens for a specific address.
- Voting Power: Shows the voting power of a given address at a specific block.
- Quorum: Indicates the minimum number of votes required for a proposal to be valid.
- Proposals: Displays the details of a specific proposal.
- Governance-related write functions
- Delegate: Allows token holders to delegate their voting power to another address.
- Propose: Enables eligible users to create new governance proposals.
- Cast Vote: Allows users to cast their vote on an active proposal.
- Queue/Execute: For executing successful proposals after they pass the voting period.
Governor
Provides the main access control logic of the governance system. Its primary job is to process proposals and their associated votes in order to determine whether they succeed or fail.
Some of the governor’s key functions include:
- Create Proposals: Allows eligible users to create proposals for changes or actions within the organization.
- Vote on Proposals: Members can cast their votes on active proposals.
- Count Votes: Automatically counts and evaluates the votes to determine if a proposal has passed or failed.
- Set Rules for Voting: The governor sets rules like how long voting lasts, how many votes are needed, and who can propose.
- Manage Proposals: The governor can approve, reject, or cancel proposals as needed.
- Use Timelocks: Introduces a waiting period before executing a proposal to ensure all conditions are met.
- Execute Decisions: Once a proposal is approved, the governor ensures the proposed action is carried out.
- Admin and Manager Control: Specific roles can manage important settings or make emergency decisions. See more about the Governor Manager & Admin.
Timelock
Receives instructions from the governor for successful proposals. Provides a time delay on proposals to give time for stakeholders to respond, should it be needed, then executes the instruction.
Some of the timelock’s key variables and functions include:
PROPOSER_ROLE
: Role allowed to propose new operations._minDelay
: Stores the minimum delay required for an operation to become valid.execute
: Executes a scheduled operation that is ready.updateDelay
: Updates the minimum delay required for future operations. This function can only be called by the timelock itself through a scheduled operation.