Voter Stake Registry Set Up
By setting up Voter Stake Registry for your DO (or DAO …) in Realms, you can allow contributors, investors, and advisors to participate in Governance while their tokens are vesting. This helps keep everyone aligned, and active in the DO while ensuring that all actions are verifiable on chain!
Additionally, as one example, you can easily issue vested tokens to Protocol Ambassadors without worrying that they will quickly abandon the project! This can be accomplished with the Clawback functionality which we will cover on this page.
Deploy your own instance of the Voter Stake Registry to the DO. Deploying your own is safest because it cannot be upgrade by some other authority, whether that authority is a person or another DO.
Note: This step is optional, but is the safest route to go!
Create a Registrar by passing in the governance program ID, and the community token mint. Registrars are uniquely constrained (via PDA usage) by those two parameters.
Using the SPL Governance UI today will default to the Voter Stake Registry to the Mango DO. Using protocols controlled by others can open the DO to risks as their alignment with yours may differ in the future. This is a concern for any protocol holding tokens for an extended period of time. For example, the Mango token holders could collude to upgrade the protocol with an instruction that sucks all the tokens out of other vesting/locked contracts.
ConfigureVotingMintto add a token to the Registrar and set it’s vote weight. This instruction is where a lot of magic happens and needs to be carefully paid attention to!
Consider this - Should the vote weight be relative to the community token that is tied to the Registrar?
Dev Note: Remaining accounts must be all the token mints that have registered as voting mints, including the newly registered one.
- idx: index of the rate to be set. There is an array of
VotingMintConfigs, and the idx references the index that the corresponding config is or should be placed. When adding a new one it should be the next index.
- digit_shift: The amount of digits to shift the native token amount.
- baseline_vote_weight_scaled_factor: vote weight factor for all funds in vault, in 1/1e9 units. So 1e9 means 1!
- max_extra_lockup_vote_weight_scaled_factor: max extra weight for lockups, in 1/1e9 units. So 1e9 means no matter how long a lock up period is the voting weight can never exceed this factor.
- lockup_saturation_secs: lockup duration at which the full vote weight bonus is given to locked up deposits. This is a factor that dampens the lock up vote power boost until this has passed. If this max boost power is 1e9 (factoring in the scale factor it's 1), then this value does not matter.
- grant_authority: The authority that can grant the additional vote weight. This should be a governance authority.
Note: voting_power = baseline_vote_weight + min(lockup_time_remaining / lockup_saturation_secs, 1) * max_extra_lockup_vote_weight
Enable the voter weight plugin by calling the
SetRealmConfiginstruction on the SPL Governance program used.
Note: use the Realm Config proposal, and put the voter stake registry program ID as the community vote plugin.