Governance

Membrane Governance contract

  • Governance can execute any arbitrary message whose proposals have a minimum voting period of 7 days

  • Voting power per proposal is based on power when the proposal was created.

  • Expedited Proposals can be called by Addresses w/ a vested allocation & should be used only for time-sensitive emergencies

  • Proposals can be aligned with by stakers to pass the active threshold, any pending proposal can be deleted within 1 day

  • Staker's vote doesn't override the Delegate's vote

InstantiateMsg

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
    pub mbrn_staking_contract: String,
    pub vesting_contract_addr: String,
    pub vesting_voting_power_multiplier: Decimal,
    pub proposal_voting_period: u64,
    pub expedited_proposal_voting_period: u64,
    pub proposal_effective_delay: u64,
    pub proposal_expiration_period: u64,
    pub proposal_required_stake: Uint128,
    pub proposal_required_quorum: String,
    pub proposal_required_threshold: String,
    pub whitelisted_links: Vec<String>,
}
Key
Type
Description

mbrn_staking_contract

String

MBRN staking contract

vesting_contract_addr

String

Vesting contract

vesting_voting_power_multipler

Decimal

Vesting voting power ratio

proposal_voting_period

u64

Proposal voting period

expedited_proposal_voting_period

u64

Expedited Proposal voting period

proposal_effective_delay

u64

Proposal effective delay

proposal_expiration_period

u64

Proposal expiration period

proposal_required_stake

Uint128

Proposal required stake

proposal_required_quorum

String

Proposal required quorum

proposal_required_threshold

String

Proposal required threshold

whitelisted_links

Vec<String>

Whitelisted links

ExecuteMsg

SubmitProposal

Submit a new proposal in the Governance contract

Key
Type
Description

title

String

Proposal title

description

String

Proposal description

*link

String

Proposal whitelisted link

messages

Vec<ProposalMessage>

Proposal executeble messages

receiver

String

If from vesting contract, add Receiver address

expedited

bool

Expedited Proposal toggle

* = optional

CastVote

Cast vote on an active proposal

Key
Type
Description

proposal_id

u64

Proposal identifier

vote

ProposalVoteOption

Vote Option

*receiver

String

If from vesting contract, add Receiver address

* = optional

EndProposal

Set the status of a proposal that has expired

Key
Type
Description

proposal_id

u64

Proposal Identifier

CheckMessages

Check messages execution

Key
Type
Description

messages

Vec<ProposalMessage>

Messages to check

*msg_switch

u64

Switch to choose executable msgs to check after the above messages are executed

* = optional

CheckMessagesPassed

The last endpoint which is executed only if all proposal messages have been passed. Called by the contract at the end of CheckMessages.

ExecuteProposal

Execute a successful proposal

Key
Type
Description

proposal_id

u64

Proposal Identifier

RemoveCompletedProposal

Remove a proposal that was already executed (or failed/expired)

Key
Type
Description

proposal_id

u64

Proposal Identifier

UpdateConfig

Update parameters in the Governance contract. Only the Governance contract is allowed to update its own parameters through a successful proposal.

Key
Type
Description

*mbrn_denom

String

MBRN native token fulldenom

*minimum_total_stake

Uint128

Minimum total stake to submit proposals

*staking_contract_addr

String

MBRN staking contract

*vesting_contract_addr

String

Vesting contract address

*vesting_voting_power_multipler

Decimal

Vesting voting power ratio

*proposal_voting_period

u64

Proposal voting period

*expedited_proposal_voting_period

u64

Expedited Proposal voting period

*proposal_effective_delay

u64

Proposal effective delay

*proposal_expiration_period

u64

Proposal expiration period

*proposal_required_stake

u128

Proposal required stake

*proposal_required_quorum

String

Proposal required quorum

*proposal_required_threshold

String

Proposal required threshold

*whitelist_remove

Vec<String>

Links to remove from whitelist

*whitelist_add

Vec<String>

Links to add to whitelist

* = optional

CreateOsmosisGauge

Use osmosis-std to create a gauge with assets in this contract

Key
Type
Description

gauge_msg

MsgCreateGauge

Osmosis-std gauge creation msg

AddToOsmosisGauge

Use osmosis-std to add to a gauge, owned by this contract, with assets in this contract

Key
Type
Description

gauge_msg

MsgAddToGauge

Osmosis-std add to gauge msg

QueryMsg

Config

Return the contract's configuration

PendingProposals

Return the current list of pending proposals

Key
Type
Description

*start

u64

Id from which to start querying

*limit

u32

Response Limiter

Proposals

Return the current list of proposals

Key
Type
Description

*start

u64

Id from which to start querying

*limit

u32

Response Limiter

* = optional

ProposalVoters

Return proposal voters of specified proposal

Key
Type
Description

proposal_id

u64

Proposal unique id

vote_option

ProposalVoteOption

Proposal vote option

*start

u64

Id from which to start querying

*limit

u32

The amount of proposals to return

*specific_user

String

Specific user to query vote option for

* = optional

Proposal

Return information about a specific proposal

Key
Type
Description

proposal_id

u64

Proposal unique id

ProposalVotes

Return information about the votes cast on a specific proposal

Key
Type
Description

proposal_id

u64

Proposal unique id

UserVotingPower

Return user voting power for a specific proposal

Key
Type
Description

user

String

User's voting power to query

proposal_id

u64

Proposal's unique id

builders

bool

If user is a receiver from Builder's contract

TotalVotingPower

Return total voting power for a specific proposal

Key
Type
Description

proposal_id

u64

Proposal unique id

Last updated