This site requires Javascript to be enabled.

Governance

Governance is crucial for decentralized decision-making and the evolution of the Archway network. It enables token holders to propose, vote on, and implement changes to the network, ensuring that it remains adaptive, secure, and aligned with the community's interests. Archway facilitates governance by providing a structured framework that outlines how proposals are made, discussed, and voted on, leveraging the staked ARCH tokens as a means to measure voting power. This process ensures that all stakeholders have a voice in the network's future direction.

Governance Parameters

For governance proposals to be voted on, they must be submitted on-chain with a deposit not less than the min_deposit parameter set in the governance module, before the deposit end time. As of version 6.0.0 of the Archway protocol, a new parameter, min_initial_deposit_ratio, was added. This ratio is the portion of the min_deposit that must be paid at the time of submission for the proposal to be added to the chain, aiming to prevent proposal spamming. This min_deposit feature is currently disabled.

Deposits are refunded if a proposal gets approved or declined. However, if there are sufficient NO WITH VETO votes, the depositors will lose their deposits. Depositors will also forfeit their deposits if a quorum of more than 1% is not reached. In both scenarios, the deposits will be burnt.

The governance parameters can be accessed via the CLI, as demonstrated in the following example:

Mainnet

Constantine

archwayd q gov params --node https://rpc.mainnet.archway.io:443

Try it:

archwayd q gov params --node https://rpc.mainnet.archway.io:443
Try It

As of this writing the following are the governance parameters for Mainnet and Constantine (Testnet):

Mainnet

Constantine

  • Proposal minimum deposit: 5000 ARCH
  • Depositing period: 2 days
  • Voting period: 7 days
  • Quorum (min % of total voting power participated for results to be valid): 33.4%
  • Threshold (min % of Yes excluding Abstain votes for a proposal to be accepted): More than 50% of Yes votes excluding Abstain votes
  • VetoThreshold (min % of NoWithVeto votes for a proposal to be rejected): 33.4%

Best Practices

Code of Conduct

See the following signaling proposal for the implementation of the code of conduct.

Preliminary Forum Discussions

Proposals should be submitted to the Governance forum for review and discussion prior to being submitted on-chain.

This will enable preliminary exploration amongst community members to fully understand the scope of the proposal, provide input/ feedback, and ultimately improve the proposal before pushing toward a formal on-chain vote.

Proposals should be posted to the forum for a minimum of 3 days before being submitted for a vote on-chain.

Info

Software upgrade proposals will not need to follow this process.

Submit proposal on testnet

Before you submit the proposal on Mainnet it is recommended to test out the proposal on Testnet first.

You may want to submit your proposal to Testnet before Mainnet for a number of reasons:

  • To signal that your proposal is about to go live on Mainnet
  • To share what the proposal will look like in advance with stakeholders
  • To test out any messages that will be executed once the proposal is approved

You will need CONST Testnet tokens to create the proposal on Testnet. There is a faucet available on Discord. You can also find the faucet links for the different networks on the Networks page.

Message types

To find the correct message format, you should refer to the proto file of the relevant module. This involves reviewing the required fields and their types, then mirroring this structure in the messages JSON array. For instance, the MsgSend message from the Cosmos SDK Bank module. To locate the necessary fields, visit the Cosmos SDK repository, navigate to the release version installed by the Archway protocol, and explore the proto folder for the transaction message details. For Cosmos SDK v0.47.7 the MsgSend details are available at: Cosmos SDK GitHub repository. For archway custom modules these proto files will be found here.

Here is an example of the MsgSend structure:

// MsgSend represents a message to send coins from one account to another.message MsgSend {  option (cosmos.msg.v1.signer) = "from_address";  option (amino.name)           = "cosmos-sdk/MsgSend";  option (gogoproto.equal)           = false;  option (gogoproto.goproto_getters) = false;  string   from_address                    = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];  string   to_address                      = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];  repeated cosmos.base.v1beta1.Coin amount = 3 [    (gogoproto.nullable)     = false,    (amino.dont_omitempty)   = true,    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"  ];}

This indicates that from_address, to_address, and amount are mandatory fields, and it also specifies their types, which must be considered. For instance, the amount field is of type cosmos.base.v1beta1.Coin, so it's necessary to consult the proto definition for this type and structure the fields accordingly.

Create proposal

In previous versions of the Archway protocol, the governance module featured specific proposal types and templates for creating these proposals. However, with the release of version 6.0.0 of the Archway protocol, this approach has been phased out in favor of a single, standardized method for creating governance proposals.

The previous solution was quite restrictive, but now a proposal can execute any message supported by the blockchain. You are also now able to execute one or more messages automatically following the approval of a proposal.

Draft proposal

The protocol has established a process to assist you in drafting the proposal message needed for each module, which will be used by the submit-proposal command. This message is stored in a draft_proposal.json file. Additionally, a draft_metadata.json file is generated, which is intended to be uploaded to IPFS and then the CID of the IPFS resource added to the metadata attribute in the draft_proposal.json file to allow for capturing the details of the metadata.

You should execute the following command to start the draft proposal process:

$ archwayd tx gov draft-proposal

You will then see a prompt asking you to select the proposal type, and you will use the arrow keys to navigate.

Use the arrow keys to navigate: ↓ ↑ → ← 
? Select proposal type: 
  ▸ text
    community-pool-spend
    software-upgrade
    cancel-software-upgrade
    other

Let's go over the options:

  • text: A text proposal is a type of governance proposal used to suggest and vote on changes or updates within the blockchain's governance system that does not involve code changes but can influence policies, upgrades, or other significant decisions regarding the network.
  • community-pool-spend: This proposal type allows the community to allocate funds from the community pool (which is is a reserve of funds collected from network fees and other sources) to specific projects, initiatives, or expenses.
  • software-upgrade: Is a type of governance proposal used to upgrade the network's software to a new version.
  • cancel-software-upgrade: As its name suggests, this proposal provides a mechanism that allows for cancelling a previously approved and scheduled software upgrade.
  • other: This covers all other module-specific proposals within the Archway protocol. When you select this option, you will see a long list of proposal types to choose from.

Let's go through a basic text proposal.

Step 1: You will first be asked to enter a Title:

✔ text
✗ Enter proposal title: Update governance code of conduct

Step 2: Next you'll enter the proposal authors:

✔ text
...
✔ Enter proposal authors: John Doe█

Step 3: Now it asks for the proposal summary:

✔ text
...
✔ Enter proposal summary: This proposal aims to update the governance code of conduct to enhance clarity, inclusivity, and enforceability within our community.█

Step 4: Add the proposal details:

✔ text
...
✔ Enter proposal details: This proposal aims to update the governance code of conduct to enhance clarity, inclusivity, and enforceability within our community. By clarifying guidelines, promoting inclusivity, and establishing robust enforcement mechanisms, we intend to create a safer and more welcoming environment for all participants.

Step 5: Next you add a link to the proposal forum discussion:

✔ text
...
✔ Enter proposal proposal forum url: https://gov.archway.io/t/update-governance-code-of-conduct/593/4

Step 6: You are now required to add the vote option context. The proposal vote option set consists of the choices available to participants when casting their vote. The primary options are: Yes, No, NoWithVeto, and Abstain. The NoWithVeto option functions as a No vote while also contributing a Veto vote. The Abstain option allows voters to indicate that they neither support nor oppose the proposal but are willing to accept the outcome of the vote.:

✔ text
...
✔ Enter proposal vote option context: Yes, No, NoWithVeto, Abstain

Step 7: For this proposal type, the last step is to enter the deposit amount, which must be at least the minimum deposit set by the network. This value can be found using the archwayd q gov params --node <node_url> command:

✔ text
...
✔ Enter proposal deposit: 1000000000000000000aconst

Once this deposit amount is submitted, you will see the following message:

The draft proposal has successfully been generated.
Proposals should contain off-chain metadata, please upload the metadata JSON to IPFS.
Then, replace the generated metadata field with the IPFS CID.

The command creates two new files draft_proposal.json and draft_metadata.json in your current working directory. Here are the contents of these files

draft_proposal.json:

{ "metadata": "ipfs://CID", "deposit": "1000000000000000000aconst", "title": "Update governance code of conduct", "summary": "This proposal aims to update the governance code of conduct to enhance clarity, inclusivity, and enforceability within our community."}

draft_metadata.json:

{ "title": "Update governance code of conduct", "authors": [  "John Doe" ], "summary": "This proposal aims to update the governance code of conduct to enhance clarity, inclusivity, and enforceability within our community.", "details": "This proposal aims to update the governance code of conduct to enhance clarity, inclusivity, and enforceability within our community. By clarifying guidelines, promoting inclusivity, and establishing $ "proposal_forum_url": "https://gov.archway.io/t/update-governance-code-of-conduct/593/4", "vote_option_context": "Yes, No, NoWithVeto, Abstain"}

The file draft_metadata.json is referenced within the draft_proposal.json file in the metadata attribute. You can store draft_metadata.json on IPFS, which is recommended, and set the metadata attribute to the generated IPFS URL. Alternatively, the metadata attribute can accept a base64 encoded string, raw text, or stringified JSON of the data in the draft_metadata.json file.

If we select the other type will result in the following example being shown and you can scroll down to see the entire list:

✔ other
Use the arrow keys to navigate: ↓ ↑ → ← 
? Select proposal message type:: 
  ▸ /archway.callback.v1.MsgCancelCallback
    /archway.callback.v1.MsgRequestCallback
    /archway.callback.v1.MsgUpdateParams
    /archway.cwerrors.v1.MsgSubscribeToError
↓   /archway.cwerrors.v1.MsgUpdateParams

Lets say we selected /archway.callback.v1.MsgUpdateParams, the following is an example of the draft_proposal.json and draft_metadata.json files:

draft_proposal.json:

{ "messages": [  {   "@type": "/archway.cwerrors.v1.MsgUpdateParams",   "authority": "archway10d07y265gmmuvt4z0w9aw880jnsr700j0f0puy",   "params": {    "error_stored_time": "0",    "subscription_fee": {     "denom": "",     "amount": "0"    },    "subscription_period": "0"   }  } ], "metadata": "ipfs://CID", "deposit": "1000000000000000000aconst", "title": "Update the callback_gas_limit", "summary": "Increase the limit from 150000 to 250000"}

Please Note

As this is just a template, you will need to make sure the message values are set correctly and in this particular case, the authority and params values which were not entered in any of the prompts. All params must be supplied and you will need to check the proto file for the respective module to get the list of values that should be supplied. For this example you would find the MsgUpdateParams here with the actual params attributes here.

For the callback module you will need to add all these to the params attribute:

  • callback_gas_limit
  • max_block_reservation_limit
  • max_future_reservation_limit
  • block_reservation_fee_multiplier
  • future_reservation_fee_multiplier

You can query the callback module to get the current values and update those values you would want to change.

The authority address is usually the governance module address. From the cli you can get this address from archwayd --node <rpc-url>:443 q auth module-account gov or via rest https://<rets_url>/cosmos/auth/v1beta1/module_accounts/gov.

The updated file would therefore be:

{ "messages": [  {   "@type": "/archway.cwerrors.v1.MsgUpdateParams",   "authority": "archway10d07y265gmmuvt4z0w9aw880jnsr700j0f0puy",   "params": {    "callback_gas_limit": "250000",    "max_block_reservation_limit": "10",    "max_future_reservation_limit": "432000",    "block_reservation_fee_multiplier": "0.000000000000000000",    "future_reservation_fee_multiplier": "1000000000000.000000000000000000"   }  } ], "metadata": "ipfs://CID", "deposit": "1000000000000000000aconst", "title": "Update the callback_gas_limit", "summary": "Increase the limit from 150000 to 250000"}

draft_metadata.json:

{ "title": "Update the callback_gas_limit", "authors": [  "John Doe, Jane Doe" ], "summary": "Increase the limit from 150000 to 250000", "details": "This increase allows for more complex transactions", "proposal_forum_url": "https://gov.archway.io/t/update-callback-gas-limit/599/6", "vote_option_context": "Yes, No, NoWithVeto, Abstain"}

Submit proposal

After creating the draft_proposal.json file above, you will execute the following command to create the governance proposal on-chain:

Mainnet

Constantine

$ archwayd tx gov submit-proposal path/to/draft_proposal.json --from <mywallet> --node https://rpc.mainnet.archway.io:443 --chain-id archway-1 --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.mainnet.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.3

Depositing funds after a proposal has been submitted

If you've submitted a proposal without yet meeting the minimum token deposit, there's no need to worry! You still have time to deposit additional tokens to advance your proposal to the voting stage if the deposit time period has not elapsed. For instance, you can execute the following command to add a deposit:

archwayd tx gov deposit 8 10000000000000aarch --from <mywallet> --node https://rpc.mainnet.archway.io:443 --chain-id archway-1 --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.mainnet.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.3

Where 8 is the proposal ID and 10000000000000aarch is the amount to be deposited.

Verifying the proposal transaction

After you sign the transaction, a transaction hash will appear in the terminal. You can query the transaction either through the CLI or by using a block explorer by searching for the transaction hash.

To query proposals via the CLI, you would use one of the following commands:

archwayd q gov proposals --node https://rpc.mainnet.archway.io:443

Try it:

archwayd q gov proposals --node https://rpc.mainnet.archway.io:443
Try It

Or query a specific proposal id, for example:

archwayd q gov proposal 8  --node https://rpc.mainnet.archway.io:443

Try it:

archwayd q gov proposal 8  --node https://rpc.mainnet.archway.io:443
Try It

If there are issues with the proposal transaction, you can still query the transaction ID. For example:

archwayd q tx 39EB4C85EC00281BB54EEE6BC87F17038F3528D5E54BF7FFBDF13E7C15DF92FE  --node https://rpc.mainnet.archway.io:443

Try it:

archwayd q tx 39EB4C85EC00281BB54EEE6BC87F17038F3528D5E54BF7FFBDF13E7C15DF92FE  --node https://rpc.mainnet.archway.io:443
Try It

and check the value of the raw_log field for useful information.

Voting on proposal

Now that the proposal is on-chain, you can engage the community on Discourse and Discord to make sure that the minimum quorum threshold is met.

We've put together several guides on how to vote on governance proposals. To get started, check out this overview: Voting on Governance Proposals Guide.