Modify DAO config by governance
Modify DAO config by governance

Modify DAO settings via governance mechanism

For an introduction to on-chain governance, see Decentralized Organization Governance, an example of how on-chain governance is performed via CLI.

The DAO itself also has several on-chain parameters, including:

  • voting_delay: The period during which the proposal is publicized.
  • voting_period: Voting period.
  • quorum_vote: voting rate.
  • min_action_delay: The minimum publicity period for the proposal to be executed.

These parameters can also be voted on and modified by the DAO itself.

The default parameters for the STC’s DAO governance in a DEV environment are:

img The following CLI command demonstrates how to vote to change the proposal public period in the STC governance parameters to 60 * 60 * 1000 = 1h to explain the proposal-voting-execution process. Note: The following assumes that you are using a node in a DEV environment and that the node’s default account is 0x84b4a430c50322a66007469a645a6a06. Where 0x84b4a430c50322a66007469a645a6a06 appears in the command, you need to replace it with your node’s default account. \1. Submit a proposal to modify DaoConfig (see the documentation for the ModifyDaoConfigProposal module in stdlib for specific parameters).imgNote: the DAO parameter cannot be equal to 0. Otherwise, the parameter will not be updated. After the proposal is launched, users must wait for the public period to expire before voting. You can use the following command to view the proposal information.imgThe result contains five values, in order: proposal_id, voting start time, voting end time, number of yes votes, and number of no votes. img \2. User VotingAfter the DEV chain starts, it will give the foundation account mint an STC by default, and the node account doesn’t have STC yet, so it needs to use the foundation account to vote to get the proposal passed. (In the DEV environment, users can use the foundation account directly)imgRecheck the proposal information. imgReturn.imgVote and wait for the voting period to end. \3. Proposal PassesAfter the voting period, if the proposal is passed, then it can be put into the pending execution queue and enter the execution public period. The following command can check the status of the proposal. imgReturn: (if the return result is 4, the proposal passed, other proposal statuses can refer to the standard library documentation) imgPlace in the pending pairs.img4.Getting back the staked tokensAfter the voting period, users can retrieve their staked tokens by submitting a transaction using the following script.img \5. Execution ProposalsPending proposals can be triggered for execution by anyone initiating a transaction after the execution public period has expired. The command is as follows. img \6. Confirming the execution resultFinally, we also need to confirm that the parameters have been successfully modified. img \7. Clean up the finished proposalimgThe above is a case flow of decentralized governance, which only shows some of the features of the DAO module. For more, please explore the official documentation of the Starcoin standard library.