MultiGov Architecture#
MultiGov employs a hub-and-spoke model to enable cross-chain governance, utilizing Wormhole's interoperability infrastructure for secure cross-chain communication. This architecture allows coordinated decision-making across multiple blockchain networks while maintaining a central coordination point.
Key Components#
Hub Chain Contracts#
The hub chain is the central point for managing proposals, tallying votes, executing decisions, and coordinating governance across connected chains.
HubGovernor
- central governance contract managing proposals and vote tallyingHubVotePool
- receives aggregated votes from spokes and submits them toHubGovernor
HubMessageDispatcher
- relays approved proposal executions to spoke chainsHubProposalExtender
- allows trusted actors to extend voting periods if neededHubProposalMetadata
- helper contract returningproposalId
and vote start forHubGovernor
proposalsHubEvmSpokeAggregateProposer
- aggregates cross-chain voting weight for an address and proposes via theHubGovernor
if eligible
Spoke Chains Contracts#
Spoke chains handle local voting, forward votes to the hub, and execute approved proposals from the hub for decentralized governance.
SpokeVoteAggregator
- collects votes on the spoke chain and forwards them to the hubSpokeMessageExecutor
- receives and executes approved proposals from the hubSpokeMetadataCollector
- fetches proposal metadata from the hub for spoke chain votersSpokeAirlock
- acts as governance's "admin" on the spoke, has permissions, and its treasury
Spoke Solana Staking Program#
The Spoke Solana Staking Program handles local voting from users who have staked W tokens or are vested in the program, forwards votes to the hub, and executes approved proposals from the hub for decentralized governance.
The program implements its functionality through instructions, using specialized PDA accounts where data is stored. Below are the key accounts in the program:
GlobalConfig
- global program configurationStakeAccountMetadata
- stores user's staking informationCustodyAuthority
- PDA account managing custody and overseeing token operations related to stake accountsStakeAccountCustody
- token account associated with a stake account for securely storing staked tokensCheckpointData
- tracks delegation historySpokeMetadataCollector
- collects and updates proposal metadata from the hub chainGuardianSignatures
- stores guardian signatures for message verificationProposalData
- stores data about a specific proposal, including votes and start timeProposalVotersWeightCast
- tracks individual voter's weight for a proposalSpokeMessageExecutor
- processes messages from a spoke chain via the Wormhole protocolSpokeAirlock
- manages PDA signing and seed validation for secure instruction executionVestingBalance
- stores total vesting balance and related staking information of a vesterVestingConfig
- defines vesting configuration, including mint and admin detailsVesting
- represents individual vesting allocations with maturation dataVoteWeightWindowLengths
- tracks lengths of vote weight windows
Each account is implemented as a Solana PDA (Program Derived Address) and utilizes Anchor's account framework for serialization and management.
System Workflow#
The MultiGov system workflow details the step-by-step process for creating, voting on, and executing governance proposals across connected chains, from proposal creation to final cross-chain execution.
EVM Governance Workflow#
The EVM-based MultiGov workflow follows these steps:
- Proposal creation:
- A user creates a proposal through the
HubEvmSpokeAggregateProposer
, which checks eligibility across chains, or directly on theHubGovernor
via thepropose
method - The proposal is submitted to the
HubGovernor
if the user meets the proposal threshold
- A user creates a proposal through the
- Proposal metadata distribution:
HubProposalMetadata
creates a custom view method to be queried for use in theSpokeMetadataCollector
SpokeMetadataCollector
on each spoke chain queriesHubProposalMetadata
for proposal details
- Voting process:
- Users on spoke chains vote through their respective
SpokeVoteAggregators
SpokeVoteAggregators
send aggregated votes to theHubVotePool
via WormholeHubVotePool
submits the aggregated votes to theHubGovernor
- Users on spoke chains vote through their respective
- Vote tallying and proposal execution:
HubGovernor
tallies votes from all chains- If a quorum is reached and there are more for votes than against votes, the vote passes and is queued for execution
- After the timelock delay, the proposal can be executed on the hub chain
- For cross-chain actions, a proposal should call the
dispatch
method in theHubMessageDispatcher
, which sends execution messages to the relevant spoke chains SpokeMessageExecutors
on each spoke chain receive and execute the approved actions through their respectiveSpokeAirlocks
Solana Governance Workflow#
The Solana-based MultiGov workflow follows these steps:
-
Proposal creation:
- A user creates a proposal on
HubGovernor
by calling thepropose
method, provided they meet the proposal threshold - For the proposal to be executed on the Solana blockchain, a
SolanaPayload
must be generated and included in thecalldata
parameter of thepropose
function - The
SolanaPayload
contains encoded details specifying which instructions will be executed and which Solana program is responsible for execution
- A user creates a proposal on
-
Proposal metadata distribution:
- A user queries
getProposalMetadata
fromHubProposalMetadata
via the Wormhole query system to create a proposal on the Spoke Solana Chain Staking Program - The retrieved metadata is used in the
AddProposal
instruction in the Solana program - The proposal data is verified to ensure it matches the expected format
- Guardian signatures are posted using the
PostSignatures
instruction - Once validated, the proposal is stored on-chain
- A user queries
-
Voting process:
- Users vote on proposals stored in the
ProposalData
account on Solana - The
CastVote
instruction records their choice (for_votes
,against_votes
, orabstain_votes
) - Eligibility and vote weight are verified using historical voter checkpoint data
- A Query Wormhole request retrieves vote data from a Solana PDA
- The signed response from Wormhole guardians is submitted to the
HubVotePool
on Ethereum for verification - The
crossChainVote
function inHubVotePool
processes the validated response and forwards the aggregated vote data to theHubGovernor
to finalize the decision
- Users vote on proposals stored in the
-
Vote tallying and proposal execution:
HubGovernor
tallies votes from all chains- If a quorum is reached with more for votes than against votes, the proposal passes and is queued for execution
- After the timelock delay, the proposal can be executed either on the hub chain or another chain
- For cross-chain execution involving Solana, the proposal calls the
dispatch
method inHubSolanaMessageDispatcher
, which sends execution messages to Solana - On Solana, the
ReceiveMessage
instruction processes the approved message, and theSpokeAirlock
executes the corresponding instructions
Cross-Chain Communication#
MultiGov relies on Wormhole's infrastructure for all cross-chain messaging, ensuring secure and reliable communication between chains. Wormhole's cross-chain state read system, known as Queries, is used for vote aggregation and proposal metadata. Additionally, cross-chain proposal execution messages are transmitted through Wormhole's custom relaying system, enabling seamless coordination across multiple blockchain networks.
Security Measures#
- Vote weight window - implements a moving window for vote weight checkpoints to mitigate cross-chain double voting
- Proposal extension -
HubProposalExtender
allows for extending voting periods by a trusted actor in the case of network issues or high-stakes decisions
- Proposal extension -
- Timelock - a timelock period between proposal approval and execution allows for additional security checks and community review
- Wormhole verification - all cross-chain messages are verified using Wormhole's secure messaging protocol
Detailed Architecture Diagram#
This architecture ensures that MultiGov can operate securely and efficiently across multiple chains, allowing for truly decentralized and cross-chain governance while maintaining a unified decision-making process.