module_gov
gov
module
gov
moduleIntroduction
The gov
module enables on-chain governance which allows Planq Chain token holder to participate in the decision-making processes. For example, users can:
Form an idea and seek the feedback;
Create the proposal and adjust according to feedback as needed;
Submit a proposal along with an initial deposit;
Deposit tokens and fund an active proposal;
Vote for an active proposal.
The details about the governance proposal process are available on The Proposal Process page.
Overview
Network parameters
Below are all the network parameters for the gov
module:
deposit_params
- Deposit related parameters:min_deposit
: Minimum deposit for a proposal to enter voting period; andmax_deposit_period
: Maximum period for Cro holders to deposit on a proposal.
voting_params
- Voting related parametersvoting_period
: The length of the voting period.
tally_params
- Tally related parametersquorum
: The minimum percentage of voting power that needs to be casted on a proposal for the result to be valid;threshold
: Minimum proportion ofYes
votes (excludingAbstain
votes) for the proposal to be accepted; andveto
: Minimum proportion ofVeto
votes to total votes ratio for proposal to be vetoed.
The Governance Procedure
Phase 0 - Submit a proposal along with an initial deposit:
Users can submit a proposal with an initial deposit. The proposal will then become "active" and entre the deposit period.
Phase 1 - Deposit period
During the deposit period, users can deposit and support an active proposal. Once the deposit of the proposal reached min_deposit
, it will enter the voting period. Otherwise, if the proposal is not successfully funded within max_deposit_period
, it will become inactive and the deposit will not be refunded.
Phase 2 - Voting period
During the voting period, staked (bonded) token will be able to participate in the voting. Users can choose one of the following option: "yes"
, "no"
, "no_with_veto"
and "abstain"
After the voting_period
has passed, there are several scenarios that a proposal will consider to be fail, for example, if
No one votes (everyone
"abstain"
);Votes did not reach the
quorum
;More than
veto
of voters vote for"no_with_veto"
;More than
threshold
that non-abstaining voters vote"no"
.
Otherwise, the proposal will be accepted and changes will be implemented according to the proposal.
Transactions and Queries
Transactions
tx gov submit-proposal
- Submit a proposal along with an initial deposit
Submit a parameter change proposal -
param-change [proposal-file]
Users can submit a proposal to modify network parameters during run time, here is a demon proposal if we would like to change the parameter
MaxValidators
(maximum number of validator) in thestaking
module,Submit a community pool spend proposal -
community-pool-spend [proposal-file]
Users can submit a proposal and request funds from the community pool to support their projects or other usages.
Submit a software upgrade proposal-
software-upgrade [name] (--upgrade-height [height] | --upgrade-time [time]) (--upgrade-info [info])
Users can submit an upgrade proposal and suggest a software upgrade at a specific block height.
Cancel the current software upgrade proposal -
cancel-software-upgrade
On the other hand, users can submit a proposal to cancel the planned software upgrade.
tx gov deposit [proposal-id] [deposit]
- Deposit tokens for an active proposal
Users can submit a deposit transaction to fund and support an active proposal.
tx gov vote [proposal-id] [option]
- Vote for an active proposal
Users can vote for an active proposal. Valid value of "option"
field can be "yes"
, "no"
, "no_with_veto"
and "abstain"
.
Queries
query gov proposals [proposal-id]
- Query proposals with optional filters
We can check the proposal with optional filters by:
query gov proposal [proposal-id]
Query details of a single proposal
Similarly, we can check the details of a proposal with a given "proposal_id"
.
query gov tally [proposal-id]
Get the tally of a proposal vote
We can also the tally of a proposal with a given "proposal_id"
.
query gov params
- Query the current gov parameters
We can query the current gov parameters by
REST endpoint
The parameters can also be checked by browsing to the following REST endpoint on Mainnet:
https://rest.planq.network/cosmos/gov/v1beta1/params/{params_type}
where the params_type
can be one of "voting", "tallying" or "deposit".
Appendix
gov
module: Network Parameters and configuration
The following tables show overall effects on different configurations of the gov related network parameters:
|
|
| |
Type | array (coins) | string (time ns) | string (time ns) |
Higher | Larger window for calculating the downtime | Longer deposit period | Longer voting period |
Lower | Smaller window for calculating the downtime | Shorter deposit period | Shorter voting period |
Constraints | Value has to be a positive integer | Value has to be positive | Value has to be positive |
Sample configuration |
|
|
|
|
|
| |
Type | string (dec) | string (dec) | string (dec) |
Higher | Easier for a proposal to be passed | Easier for a proposal to be passed | Easier for a proposal to be passed |
Lower | Harder for a proposal to be passed | Harder for a proposal to be passed | Harder for a proposal to be passed |
Constraints | Value has to be less or equal to | Value has to be less or equal to | Value has to be less or equal to |
Sample configuration |
|
|
|
Last updated