Require 2/3 or token holder supermajority for proposal launch#469
Open
metapileks wants to merge 9 commits into
Open
Require 2/3 or token holder supermajority for proposal launch#469metapileks wants to merge 9 commits into
metapileks wants to merge 9 commits into
Conversation
Contributor
|
Repository Guard
Repository GuardCargo dependency pinning
Cross-program Anchor/Solana version consistency
solana-program crate pin
Anchor.toml solana_version
Crate minimum age
Yarn package.json pinning
npm minimum age
Workflow toolchain consistency
GitHub Action SHA pinning
Sensitive program / config changes
Overall status: pass Lockfile freshness (Cargo.lock + yarn.lock) is checked by the workflow directly and cannot be bypassed. The sensitive-diff section is a review hint - CODEOWNERS handles the actual merge gate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds a stricter, per-DAO opt-in gate for launching proposals. A DAO that opts in (
is_proposal_validation_enabled) launches only when one of two conditions holds:{ stake ≥ base_to_stake, team-sponsored, MetaDAO-approved }.amount_stakedalone reaching a per-DAO bar (dao.base_to_supermajority;0disables it).DAOs that have not opted in keep today's gate unchanged (
is_team_sponsored || amount_staked ≥ base_to_stake); the supermajority and MetaDAO signals are not consulted for them. Existing DAOs migrate in with validation off, so their behavior is unchanged until they opt in viaupdate_dao. New launchpad-created DAOs default to on.Changes
futarchyprogramDao.is_proposal_validation_enabled(set at creation, toggled viaupdate_dao).launch_proposalbranches on it: legacy gate when off, the two-condition gate when on.approve_proposalinstruction +Proposal.is_metadao_approved— the MetaDAO approval point. Approver is the MetaDAO multisig, gated under#[cfg(feature = "production")]. Rejected withProposalValidationDisabledunless the DAO hasis_proposal_validation_enabled— the approval point is inert under the legacy gate, so approving there is disallowed rather than written as dead state.Dao.base_to_supermajorityconfig with the invariantbase_to_supermajority == 0 || >= base_to_stake, keeping the supermajority path never easier than the ordinary stake point.resize_proposal(+1 byte:is_metadao_approved) andresize_dao(+9 bytes:base_to_supermajority+is_proposal_validation_enabled, both defaulted off).Launchpads (v06/v07/v08) — pass
is_proposal_validation_enabled: trueand the supermajority default inInitializeDaoParams(internal CPI args; no surface change).SDK (v0.6) —
approveProposalIx;baseToSupermajorityandisProposalValidationEnabledadded to init/update params;resize_daono longer takes abase_mintaccount; regenerated IDL types.launchProposalIxunchanged.