The Multichain Governor contract is live on Moonbeam. This contract is responsible for creating and executing proposals.
The Moonbeam governor contract serves as the source of truth for all governance actions in Moonwell. Whenever a new proposal is created, it will send out a message that will be transmitted to the voting contracts of destination chains. This will empower WELL and stkWELL holders to participate in the voting process on proposals that are going to go live on Moonbeam. The proposals framework used for Moonwell governance is designed to work cross-chain, which implies that proposals that are active on Moonbeam can have an impact on the system's state on other chains.
votingPeriod
: The time period in seconds that the governor will collect votes for a proposal.crossChainVoteCollectionPeriod
: The time period in seconds that the governor will collect votes for a proposal before it is executed and after the voting period has ended.quorum
: The minimum percentage of votes required for a proposal to pass.proposalThreshold
: The minimum number of votes required for a proposal to be created.
Only the Governance contract can change these parameters. This implies that a proposal must be created and passed to update these parameters.
Any address can create a proposal by calling the createProposal
function if
they have at least the voting power threshold required to create a proposal. The
proposer must provide the following parameters:
targets
: An array of addresses to callvalues
: An array of values to pass to each of the callscalldatas
: An array of ABI-encoded calldatas with function signatures to pass to the targetsdescription
: A string describing the proposal
Any address can vote on a proposal by calling the castVote
function. Users can
vote for
, against
, or abstain
on a proposal.
The following tokens are used as sources of voting power:
- WELL: The native WELL token on Moonbeam
- Staked WELL: WELL Staked in the safety module
- xWELL: The native multi-chain token for Moonwell
- Vesting WELL: Vesting WELL locked in the claims contract
The caller must provide the following parameters when casting their votes:
proposalId
: The id of the proposal to vote onvoteValue
: The vote value to cast.0
foryes
,1
forno
,2
forabstain
.
Votes can only be placed one time per proposal, and once a vote is cast, it cannot be changed.
Any address can execute a proposal by calling the execute
function. The
proposal must have passed the cross chain voting collection period and have
enough for votes to be executed. The caller must provide the following
parameter:
proposalId
: The id of the proposal to execute
If the proposal is cross-chain, a VAA will be generated by Wormhole which can be queued and executed on the Temporal Governor of the target chain.
Any address can rebroadcast a proposal by calling the rebroadcastProposal
.
This function is useful in case the wormhole relayer or wormhole core contract
is paused. Can only be called if the proposal is in the active state.
Any caller can cancel a proposal by calling the cancel
function if the
proposer voting power has drops below threshold. Otherwise, only the proposer
can cancel the propsal.
There are only two roles with permissions on the Governor contract. The
Pause Guardian
and the Break Glass Guardian
. Anytime a role is used, they
can only be used once, and then their roles are revoked once the action is
completed.
The Pause Guardian can pause the Governor contract, which will prevent any new proposals from being created, any votes from being cast and any proposals from being executed. Pause also cancel any active proposals. After the pause duration, the governor will automatically unpause, thus not allowing the pause guardian to brick the governor. The pause guardian will only be able to pause once, and then the governor will need to grant the pausing ability again.
The break glass guardian is able to propose and execute a governance proposal that calls any address with the following set of whitelisted calldatas:
- transferOwnership to Artemis Timelock
- setPendingAdmin to Artemis Timelock
- setEmissionManager to Artemis Timelock (Used for stake token emission)
- changeAdmin to Artemis Timelock
- wormholeCore publish message to Temporal Governor that grants Artemis Timelock governor ability
No checks will be performed as to which contracts are being called, and addresses are the only parameter the break glass guardian can specify without sanitization. The calldata they pass must be an exact match of one of the calldatas specified above, otherwise the entire transaction will revert.
getReceipt
: Returns the vote receipt of a voter for a proposalproposalInformation
: Returns the proposal information for a given proposal id. Includes the proposer, vote snapshot timestmap, vote start timestamp, vote end timestamp, corss chain vote collection end timestamp, for votes, against votes and abstain votes.proposalVotes
: Returns the vote count for a proposalgetProposalData
: Returns the targets, values and calldatas for a proposal.liveProposals
: Returns the list of live proposals ids.getNumLiveProposals
: Returns the number of live proposals.currentUserLiveProposals
: Returns the number of live proposals for a user.getUserLiveProposals
: Returns the list of live proposals for a user.getVotes
: Returns the total voting power for an address at a given block number and timestamp.getCurrentVotes
: Returns the current voting power for an address across well, xWell, stkWell and distributorproposalActive
: Returns true if a proposal is active, false otherwise.chainAddressVotes
: Return the votes for a particular chain and proposal that have been cast.state
: Returns the status of a proposal. The status can be one of the following:- Active: This means that the proposal is currently in the voting period.
- CrossChainVoteCollection: The voting period has ended, and the proposal is now waiting for cross-chain votes.
- Cancelled: The proposer has canceled or anyone can cancel if the proposer voting power has become lower than the minimum proposal threshold.
- Defeated: The proposal has been defeated, the amount of against votes plus the amount of abstain votes is higher or equal than governance quorum.
- Succeeded: The proposal has passed, the amount of for votes plus the amount of abstain votes is higher than governance quorum.
- Executed: The proposal has been executed. If the proposal is cross-chain, the payload will be relayed to the Temporal Governor for execution on the target chain.
This contract makes multiple assumptions about its own state and external system states to ensure proper functioning. Any one of these items being compromised could lead to unexpected behavior.
-
Approved calldata is correctly set for the Break Glass Guardian. Incorrect calldata could allow the Break Glass Guardian to call any function on any contract. Side affects of incorrect configuration include but are not limited to:
- complete loss of governance abilities on both Base and or Moonbeam deployments
- setting of incorrect oracle data
- arbitrary changes to governance parameters
-
The Pause Guardian is not malicious.
- if the Pause Guardian is malicious, they could pause the contract for the current pause duration of 30 days before the contract pauses again.
- if the Pause Guardian is malicious, they could wait for a governance proposal to grant another guardian the ability to pause the contract, then pause the contract, clearing this proposal from the active set of proposals. Then the community would need to wait 30 days before they could create, vote on and pass another proposal again.
-
The vote collection contracts on other chains are not malicious and working properly.
- if the vote collection contracts on other chains are malicious, they could prevent the Multichain Governor from executing proposals, or pass proposals that are failing by registering incorrect vote counts.
-
Wormhole is live and working properly, this ensures that voters on other chains can participate in governance.
- if Wormhole is paused or offline, the Multichain Governor will still be able to execute and pass proposals, however, users on other chains will not be able to submit or have their votes collected.
- if Wormhole becomes malicious, it could register incorrect vote counts or prevent the Multichain Governor from executing proposals.