Creating Governance Proposals

Introduction

In order to create a governance proposal, you must submit an initial deposit along with a title and description. Currently, in order to enter the voting period, a proposal must accumulate within a week deposits of at least 100 SCRT.

Note: Please remember through the duration of this guide that the secretcli counts SCRT in uscrt. 1 SCRT = 1,000,000 uscrt.

Modules

Various modules outside of governance may implement their own proposal types and handlers (eg. parameter changes), where the governance module itself supports Text proposals. Any module outside of governance has it's command mounted on top of submit-proposal.

Text

To submit a Text proposal:

secretcli tx gov submit-proposal \
  --title <title> \
  --description <description> \
  --type Text \
  --deposit 100000000uscrt \
  --from <key_alias>

You may also provide the proposal directly through the --proposal flag which points to a JSON file containing the proposal:

secretcli tx gov \
    submit-proposal \
    --proposal <path/to/proposal.json> \
    --from <key_alias>

Where proposal.json is:

{
  "type": "Text",
  "title": "My Cool Proposal",
  "description": "A description with line breaks \n and `code formatting`",
  "deposit": "100000000uscrt"
}

Param Change

To submit a parameter change proposal, you must provide a proposal file as its contents are less friendly to secretcli input:

secretcli tx gov submit-proposal param-change <path/to/proposal.json> --from <key_alias>

Where proposal.json is:

{
  "title": "Param Change",
  "description": "Update max validators with line breaks \n and `code formatting`",
  "changes": [
    {
      "subspace": "Staking",
      "key": "MaxValidators",
      "value": 105
    }
  ],
  "deposit": "10000000uscrt"
}

You can see another param-change example here: enigma-1-proposal-3.json

Subspaces, Keys and Values

Further Proposal Details

  • The subspace is usually the ModuleName

  • The key is usually defined in x/$MODULE_NAME/types/params.go

  • The value's type is usually near the key definition

  • ⚠️ subspace and key are case sensitive and value must be of the correct type and within the allowed bounds.

    • Proposals with errors on these inputs should not enter voting period (should not get deposits) or be voted on with NoWithVeto.

  • ⚠️ Currently parameter changes are evaluated but not validated, so it is very important that any value change is valid (i.e. correct type and within bounds) for its respective parameter, eg. MaxValidators should be an integer and not a decimal.

  • ⚠️ Proper vetting of a parameter change proposal should prevent this from happening (no deposits should occur during the governance process), but it should be noted regardless.

Known Constraints

  • distribution.baseproposerreward + distribution.bonusproposerreward < 1. See this and this for more info.

To read more go to the Cosmos Parameters Wiki.

Community Pool Spend

To submit a community pool spend proposal, you also must provide a proposal file as its contents are less friendly to secretcli input:

secretcli tx gov submit-proposal community-pool-spend <path/to/proposal.json> --from <key_alias>

Where proposal.json is (make sure to change the recipient address to a real address when testing):

{
  "title": "Community Pool Spend",
  "description": "Spend 10 SCRT with line breaks \n and `code formatting`",
  "recipient": "secret1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "amount": "100000000uscrt",
  "deposit": "100000000uscrt"
}

Software Upgrade

The SoftwareUpgrade is currently not supported as it's not implemented and currently does not differ from the semantics of a Text proposal.

Last updated