var img = document.createElement('img'); img.src = "https://terradocs.matomo.cloud//piwik.php?idsite=4&rec=1&url=https://docs.enterprise.money" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

Governance

This section outlines the data structures for DAO governance.

DaoGovConfig

The configurations for a DAO’s governance-related activities, such as creating and executing proposals, are defined in the following sections. For more information on governance configuration parameters, visit the Governance and staking page.

Quorum

The minimum number of staked tokens, NFTs, or multisig votes that need to vote for an election to be valid, expressed as a percentage of the total staked token supply. Proposals that don't meet quorum fail, regardless of the vote outcome.

Rust
Copy

_6
struct DaoGovConfig {
_6
pub quorum: Decimal,
_6
pub threshold: Decimal,
_6
pub vote_duration: u64,
_6
pub unlocking_period: Duration,
_6
}

Threshold

The percentage of yes votes required to pass a proposal.

Rust
Copy

_6
struct DaoGovConfig {
_6
pub quorum: Decimal,
_6
pub threshold: Decimal,
_6
pub vote_duration: u64,
_6
pub unlocking_period: Duration,
_6
}

Vote duration

The period of time (expressed in seconds) during which a user can vote on a proposal. When a proposal is created, the vote duration starts. Once the vote duration is reached, the votes are tallied and the proposal either passes or fails. No votes can be cast after the voting period.

Rust
Copy

_6
struct DaoGovConfig {
_6
pub quorum: Decimal,
_6
pub threshold: Decimal,
_6
pub vote_duration: u64,
_6
pub unlocking_period: Duration,
_6
}

Unlocking period

The period of time (either in seconds or blocks) it takes for a staked token to become unstaked. Tokens in the unstaking phase cannot be used to cast a vote. Once the unstaking period is over, the owner can claim them.

Rust
Copy

_6
struct DaoGovConfig {
_6
pub quorum: Decimal,
_6
pub threshold: Decimal,
_6
pub vote_duration: u64,
_6
pub unlocking_period: Duration,
_6
}

Quorum

The minimum number of staked tokens, NFTs, or multisig votes that need to vote for an election to be valid, expressed as a percentage of the total staked token supply. Proposals that don't meet quorum fail, regardless of the vote outcome.

Threshold

The percentage of yes votes required to pass a proposal.

Vote duration

The period of time (expressed in seconds) during which a user can vote on a proposal. When a proposal is created, the vote duration starts. Once the vote duration is reached, the votes are tallied and the proposal either passes or fails. No votes can be cast after the voting period.

Unlocking period

The period of time (either in seconds or blocks) it takes for a staked token to become unstaked. Tokens in the unstaking phase cannot be used to cast a vote. Once the unstaking period is over, the owner can claim them.

Rust
CopyExpandClose

_6
struct DaoGovConfig {
_6
pub quorum: Decimal,
_6
pub threshold: Decimal,
_6
pub vote_duration: u64,
_6
pub unlocking_period: Duration,
_6
}

Proposals

Proposals are submitted by DAO governance members and are voted on by staked asset holders or multisig members of a DAO.

Rust
Copy

_17
type ProposalId = u64;
_17
_17
struct Proposal {
_17
pub id: ProposalId,
_17
pub title: String,
_17
pub description: String,
_17
pub status: ProposalStatus,
_17
pub expires: Expiration,
_17
pub proposal_actions: Vec<ProposalAction>,
_17
}
_17
_17
enum ProposalStatus {
_17
InProgress,
_17
Passed,
_17
Rejected,
_17
Executed,
_17
}

Status

  1. When a proposal is successfully submitted, it enters the InProgress state.

  2. If a proposal fails to meet quorum or fails to get enough "yes" votes to meet the threshold, it becomes Rejected.

  3. When a proposal meets quorum and has a threshold percentage of "yes" votes by the end of the voting period, it becomes Passed

  4. After passing, the successful proposal can become Executed.

Rust
Copy

_17
type ProposalId = u64;
_17
_17
struct Proposal {
_17
pub id: ProposalId,
_17
pub title: String,
_17
pub description: String,
_17
pub status: ProposalStatus,
_17
pub expires: Expiration,
_17
pub proposal_actions: Vec<ProposalAction>,
_17
}
_17
_17
enum ProposalStatus {
_17
InProgress,
_17
Passed,
_17
Rejected,
_17
Executed,
_17
}

Proposals are submitted by DAO governance members and are voted on by staked asset holders or multisig members of a DAO.

Status

  1. When a proposal is successfully submitted, it enters the InProgress state.

  2. If a proposal fails to meet quorum or fails to get enough "yes" votes to meet the threshold, it becomes Rejected.

  3. When a proposal meets quorum and has a threshold percentage of "yes" votes by the end of the voting period, it becomes Passed

  4. After passing, the successful proposal can become Executed.

Rust
CopyExpandClose

_17
type ProposalId = u64;
_17
_17
struct Proposal {
_17
pub id: ProposalId,
_17
pub title: String,
_17
pub description: String,
_17
pub status: ProposalStatus,
_17
pub expires: Expiration,
_17
pub proposal_actions: Vec<ProposalAction>,
_17
}
_17
_17
enum ProposalStatus {
_17
InProgress,
_17
Passed,
_17
Rejected,
_17
Executed,
_17
}

Proposal actions

This section defines the governance actions available when creating a governance proposal.

Rust
Copy

_24
enum ProposalAction {
_24
UpdateMetadata(UpdateMetadataMsg),
_24
UpdateGovConfig(UpdateGovConfigMsg),
_24
UpdateAssetWhitelist(UpdateAssetWhitelistMsg),
_24
UpdateNftWhitelist(UpdateNftWhitelistMsg),
_24
RequestFundingFromDao(RequestFundingFromDaoMsg),
_24
UpgradeDao(UpgradeDaoMsg),
_24
ExecuteMsgs(ExecuteMsgsMsg),
_24
ModifyMultisigMembership(ModifyMultisigMembershipMsg),
_24
}
_24
_24
---
_24
_24
### UpdateMetadataMsg
_24
_24
```rust Rust
_24
struct UpdateMetadataMsg {
_24
pub name: Option<String>,
_24
pub logo: Option<Logo>,
_24
pub github: Option<Option<String>>,
_24
pub discord: Option<Option<String>>,
_24
pub twitter: Option<Option<String>>,
_24
pub telegram: Option<Option<String>>,
_24
}

UpdateGovConfigMsg

Updates any of the four governance parameters in the DaoGovConfig.

Rust
Copy

_6
struct UpdateGovConfigMsg {
_6
pub quorum: Option<Decimal>,
_6
pub threshold: Option<Decimal>,
_6
pub voting_duration: Option<Uint64>,
_6
pub unlocking_period: Option<Duration>,
_6
}

UpdateAssetWhitelistMsg

Updates the asset whitelist by adding or removing assets.

Rust
Copy

_6
struct UpdateAssetWhitelistMsg {
_6
/// New assets to add to the whitelist. Will ignore assets that are already whitelisted.
_6
pub add: Option<Vec<AssetInfo>>,
_6
/// Assets to remove from the whitelist. Will ignore assets that are not already whitelisted.
_6
pub remove: Option<Vec<AssetInfo>>,
_6
}

UpdateNftWhitelistMsg

Updates the NFT whitelist by adding or removing assets.

Rust
Copy

_6
struct UpdateNftWhitelistMsg {
_6
/// New NFTs to add to the whitelist. Will ignore NFTs that are already whitelisted.
_6
pub add: Option<Vec<Addr>>,
_6
/// NFTs to remove from the whitelist. Will ignore NFTs that are not already whitelisted.
_6
pub remove: Option<Vec<Addr>>,
_6
}

RequestFundingFromDaoMsg

This message is used to request funding from a DAO. Proposers must specify a recipient address along with the asset and amount requested.

Rust
Copy

_5
struct RequestFundingFromDaoMsg {
_5
pub recipient: String,
_5
/// CW assets requested as funding
_5
pub assets: Vec<Asset>,
_5
}

UpgradeDaoMsg

Upgrades a DAO to a new Enterprise code version, enabling the DAO to benefit from new features and bug fixes.

Rust
Copy

_6
struct UpgradeDaoMsg {
_6
/// New Enterprise code ID that the DAO wants to upgrade to
_6
pub new_dao_code_id: u64,
_6
/// MigrateMsg in binary form, to be used to migrate to the new contract code
_6
pub migrate_msg: Binary,
_6
}

ExecuteMsgsMsg

Makes the DAO execute a list of Cosmos messages.

📝Message templates

To learn how to write messages for governance proposals, visit the Message templates section.

Rust
Copy

_3
struct ExecuteMsgsMsg {
_3
pub msgs: Vec<String>,
_3
}

ModifyMultisigMembershipMsg

Updates the multisig members of a DAO by specifying new weights for addresses. Only available in multisig DAOs.

Rust
Copy

_6
struct ModifyMultisigMembershipMsg {
_6
/// Members to be edited.
_6
/// Can contain existing members, in which case their new weight will be the one specified in
_6
/// this message. This effectively allows removing of members (by setting their weight to 0).
_6
pub edit_members: Vec<MultisigMember>,
_6
}

This section defines the governance actions available when creating a governance proposal.

UpdateGovConfigMsg

Updates any of the four governance parameters in the DaoGovConfig.

UpdateAssetWhitelistMsg

Updates the asset whitelist by adding or removing assets.

UpdateNftWhitelistMsg

Updates the NFT whitelist by adding or removing assets.

RequestFundingFromDaoMsg

This message is used to request funding from a DAO. Proposers must specify a recipient address along with the asset and amount requested.

UpgradeDaoMsg

Upgrades a DAO to a new Enterprise code version, enabling the DAO to benefit from new features and bug fixes.

ExecuteMsgsMsg

Makes the DAO execute a list of Cosmos messages.

📝Message templates

To learn how to write messages for governance proposals, visit the Message templates section.

ModifyMultisigMembershipMsg

Updates the multisig members of a DAO by specifying new weights for addresses. Only available in multisig DAOs.

Rust
CopyExpandClose

_24
enum ProposalAction {
_24
UpdateMetadata(UpdateMetadataMsg),
_24
UpdateGovConfig(UpdateGovConfigMsg),
_24
UpdateAssetWhitelist(UpdateAssetWhitelistMsg),
_24
UpdateNftWhitelist(UpdateNftWhitelistMsg),
_24
RequestFundingFromDao(RequestFundingFromDaoMsg),
_24
UpgradeDao(UpgradeDaoMsg),
_24
ExecuteMsgs(ExecuteMsgsMsg),
_24
ModifyMultisigMembership(ModifyMultisigMembershipMsg),
_24
}
_24
_24
---
_24
_24
### UpdateMetadataMsg
_24
_24
```rust Rust
_24
struct UpdateMetadataMsg {
_24
pub name: Option<String>,
_24
pub logo: Option<Logo>,
_24
pub github: Option<Option<String>>,
_24
pub discord: Option<Option<String>>,
_24
pub twitter: Option<Option<String>>,
_24
pub telegram: Option<Option<String>>,
_24
}

Expiration

Expiration defines the height or time at which a governance proposal will expire.

Rust
Copy

_8
enum Expiration {
_8
/// AtHeight will expire when `env.block.height` >= height
_8
AtHeight(u64),
_8
/// AtTime will expire when `env.block.time` >= time
_8
AtTime(Timestamp),
_8
/// Never will never expire. Used to express the empty variant
_8
Never {},
_8
}

Expiration defines the height or time at which a governance proposal will expire.

Rust
CopyExpandClose

_8
enum Expiration {
_8
/// AtHeight will expire when `env.block.height` >= height
_8
AtHeight(u64),
_8
/// AtTime will expire when `env.block.time` >= time
_8
AtTime(Timestamp),
_8
/// Never will never expire. Used to express the empty variant
_8
Never {},
_8
}

MultisigMember

MultisigMember defines an address and its weight in the multisig.

Rust
Copy

_4
struct MultisigMember {
_4
pub address: String,
_4
pub weight: Uint128,
_4
}

MultisigMember defines an address and its weight in the multisig.

Rust
CopyExpandClose

_4
struct MultisigMember {
_4
pub address: String,
_4
pub weight: Uint128,
_4
}