bank
bank
module maintains the state of two primary objects:bank
module tracks and provides query support for the total supply of all assets used in the application. It also supports token transfer functionalities. Specifically, the total supply is updated whenever a token is:tx bank send [from_key_or_address] [to_address] [amount] [network_id]
- Send Fundstx bank send
command. For example, we can send 1 basetcro from address_a
to address_b
byquery bank balances [address]
- Check the balance of a specified accountquery bank total
- Check the total supply of the tokenbank
module: Network Parameters and configurationSendEnabled
DefaultSendEnabled
distribution
distribution
module is responsible for the distribution of rewards to the validators and delegators.distribution
module:community_tax
- The rate of community tax;base_proposer_reward
- Base bonus on transaction fees collected in a valid block;bonus_proposer_reward
- Maximum bonus on transaction fees collected in a valid block;withdraw_addr_enabled
- Whether delegators can set a different address to withdraw their rewards.base_proposer_reward
and increase linearly to bonus_proposer_reward
when the validator includes 100% of the precommits.community_tax
is the tax rate to the reward obtained by the validator. Specifically, part of the reward will be taxed and send to the community pool. The funds in the community pool can be withdrawn by submitting a community pool spend proposal with the gov module.community_tax
is set to be zero, the balance of the community pool could be non-zero. For example, the truncated remainder in some accounting edge cases will be sent to the community pool as well. Besides that, users can fund the community pool voluntary, and there could be funds allocated to the community pool in the genesis.tx distribution withdraw-all-rewards
- Withdraw all delegations rewards for a delegatortx distribution withdraw-rewards [validator-addr]
- Withdraw rewards from a given validator address--commission
. :::tx distribution set-withdraw-addr [withdraw-addr]
- Change the default withdraw address for rewards associated with an addresstx distribution fund-community-pool [amount]
- Funds the community pool with the specified amountquery distribution commission [validator]
- Query distribution validator commissionquery distribution community-pool
- Query the amount of coins in the community poolquery distribution rewards [delegator-addr] [validator-addr]
- Query all distribution delegator rewards or rewards from a particular validatorquery distribution slashes [validator] [start-height] [end-height]
- Query distribution validator slashesquery distribution validator-outstanding-rewards [validator]
- Query distribution outstanding rewards for a validator and all their delegationsquery distribution params
- Query the current distribution parametersdistribution
module: Network Parameters and configurationcommunity_tax
base_proposer_reward
bonus_proposer_reward
1
1
1
0
(0%)0.01
(1%)0.04
(4%)gov
gov
module enables on-chain governance which allows Cronos token holder to participate in the decision-making processes. For example, users can: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 of Yes
votes (excluding Abstain
votes) for the proposal to be accepted; andveto
: Minimum proportion of Veto
votes to total votes ratio for proposal to be vetoed.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 all the deposit will be refunded."yes"
, "no"
, "no_with_veto"
and "abstain"
voting_period
has passed, there are several scenarios that a proposal will consider to be "Rejected", for example, if"abstain"
);quorum
;veto
of voters vote for "no_with_veto"
;threshold
that non-abstaining voters vote "no"
.tx gov submit-proposal
- Submit a proposal along with an initial depositparam-change [proposal-file]
MaxValidators
(maximum number of validator) in the staking
module,community-pool-spend [proposal-file]
software-upgrade [name] (--upgrade-height [height] | --upgrade-time [time]) (--upgrade-info [info])
cancel-software-upgrade
tx gov deposit [proposal-id] [deposit]
- Deposit tokens for an active proposaltx gov vote [proposal-id] [option]
- Vote for an active proposal"option"
field can be "yes"
, "no"
, "no_with_veto"
and "abstain"
.query gov proposals [proposal-id]
- Query proposals with optional filters"proposal_id": "1"
, with the title: "Staking Param Change"
that change the MaxValidators
parameter of the staking
module to 151
. We can also see that the status of the proposal is "PROPOSAL_STATUS_PASSED"
, which means that this proposal has bee passed.query gov proposal [proposal-id]
Query details of a single proposal"proposal_id"
.query gov tally [proposal-id]
Get the tally of a proposal vote"proposal_id"
.query gov params
- Query the current gov parametersgov
module: Network Parameters and configurationmin_deposit
max_deposit_period
voting_period
100000
(100000 cro)1209600000000000
(2 weeks)1209600000000000
(2 weeks)quorum
threshold
veto
1
1
1
0.15
(15%)0.5
(50%)0.33
(33%)mint
mint
module is responsible for creating token in a flexible way to reward the validator who participate in the proof of stake consensus process (see also the distribution module). It is also designed in a way to bring a balance between market liquidity and staked supply.mint
module:"blocks_per_year"
- The expected number of blocks being produced per year;"goal_bonded"
- Goal of bonded token in percentage;"inflation_max"
- Maximum annual inflation rate;"inflation_min"
- Minimum annual inflation rate;"inflation_rate_change"
- Maximum annual change in inflation rate;"mint_denom"
- Token type being minted."goal_bonded"
). The maximum rate change possible is defined to be "inflation_rate_change"
per year, where the annual inflation is capped as between "inflation_min"
and "inflation_max"
.mint
module: Queriesquery mint params
- Query the current minting annual provisions value109573801550200370
basetcro ( i.e. 1,095,738,015
cro)query mint inflation
- Query the current minting inflation value0.013687008526984104
( i.e. 1.368%
)query mint annual-provisions
- Query the current minting parametersgov
module: Network Parameters and configurationblocks_per_year
goal_bonded
mint_denom
1
5256000
(5,256,000 blocks)0.66
(66%)basetcro
inflation_max
inflation_min
inflation_rate_change
1
1
1
0.02
(2%)0.01
(1%)0.01
(1%)slashing
slashing
functionality that aims to dis-incentivize network-observable actions, such as faulty validations. The penalties may include losing some amount of their stake, losing their ability to perform the network functionality for a period of time, collect rewards etc.signed_blocks_window
: Number of blocks for which the liveness is calculated for uptime tracking;min_signed_per_window
: Maximum percentage of blocks with faulty/missed validations allowed for an account in last; signed_blocks_window
blocks before it gets deactivated;slash_fraction_double_sign
: Percentage of funds being slashed when validator makes a byzantine fault; andslash_fraction_downtime
: Percentage of funds being slashed when a validator is non-live.min_signed_per_window
blocks (in percentage) in the last signed_blocks_window
blocks successfully. signed_blocks_window
and min_signed_per_window
are network parameters and can be configured during genesis and can be updated during runtime by the governance module.block_signing_window
is 2000
blocks and min_signed_per_window
is 0.5
, a validator will be marked as non-live and jailed if they fail to successfully sign at least 2000*0.5=1000
blocks in last 2000
blocks. :::Evidence
of a byzantine validator in BeginBlock
request. Before jailing any account due to byzantine fault, that evidence should be verified. Also, it should be checked that evidence provided by tendermint is not older than max_age
in tendermint. :::missed_block_threshold
blocks in last block_signing_window
blocks, it is immediately jailed and punished by deducting funds from their bonded and unbonded amount and removing them from active validator set. The funds to be deducted are calculated based on slash_fraction_downtime
. Kindly refer to this link on the logic of the liveness tracking.downtime_jail_duration
. This downtime_jail_duration
is a network parameter which can be configured during genesis.downtime_jail_duration
has passed), they can create anunjail
transaction which marks them as un-jailed. Validator will then rejoin the validator set once it has bee successful un-jailed.slash_fraction_double_sign
. Furthermore, validator who commit this double-signing fault will also be put into the "tombstone state", which means it will be blacklisted and jailed forever.tx slashing unjail
- Unjailing a validatorunjail
transaction to unjail the validator and resume its normal operations byquery slashing params
- Query the current slashing parametersslashing
module: Network Parameters and configurationsigned_blocks_window
min_signed_per_window
downtime_jail_duration
2000
(2000 blocks)0.5
(50%)3600s
(1 hour)slash_fraction_double_sign
slash_fraction_downtime
1
1
0.001
(0.1%)0.05
(5%)staking
staking
module handles Proof-of-Stake related logics, which plays a very import part to the underneath consensus protocol.unbonding_time
: The time duration of unbonding;max_validators
: The maximum number of validator;max_entries
: The max entries for either unbonding delegation or redelegation;historical_entries
: The number of historical entries to persist; andbond_denom
: Coin denomination for staking.staking
module enables CRO owners to delegate their tokens to active validators and share part of the reward obtained by the validator during the proof of stake protocol(see distribution module). Specifically, It allows token owners to take part in the consensus process without running a validator themselves.tx staking create-validator
- Create new validator initialized with a self-delegationcreate-validator
transaction, for example:tx staking delegate [validator-addr] [amount]
- Delegate liquid tokens to a validatortx staking unbond [validator-addr] [amount]
- Unbond shares from a validatorunbonding_time
has passed.tx staking redelegate [src-validator-addr] [dst-validator-addr] [amount]
- Redelegate illiquid tokens from one validator to anotherquery staking delegation [delegator-addr] [validator-addr]
- Query a delegation based on address and validator addressquery staking delegations-to [validator-addr]
- Query all delegations made to one validatorquery staking pool
- Query the current staking pool valuesquery staking unbonding-delegation [delegator-addr] [validator-addr]
- Query an unbonding-delegation record based on delegator and validator addressquery staking validator [validator-addr]
- Query a specific validatorquery staking validators
- Query all validatorsquery staking params
- Query the current staking parametersstaking
module: Network Parameters Configurationbond_denom
historical_entries
max_entries
basetcro
100
(50%)7
max_validators
unbonding_time
1
100
(maximum 100 active validator)"1814400s"
(3 weeks)