Skip to main content
Version: v1

Staking Module

The ZIGChain Staking Module is based on the Cosmos SDK - Staking Module but with the specific parameters that you can find in the Staking Parameters section.

If you want to understand more about the Consensus, Slashing and Validators Selection, please check our Validators FAQ.

If you are looking for the quick commands, refer to the Validator Quick Sheet.

Staking Parameters

The Staking module in ZIGChain has set up the following parameters:

⚠️ These values may change via governance proposals. Always confirm using the CLI or API.

ParametersTestnet ValueMainnet Value
bond_denomuziguzig
historical_entries10,00010,000
max_entries77
max_validators44
min_commission_rate0.0 (0%)0.0 (0%)
unbonding_time168h0m0s (7 days)504h0m0s (21 days)

Parameters Overview

bond_denom

Description: The denomination (token name) of the currency that can be staked

  • Validators and delegators must bond tokens in this denomination to participate in network activities.

Default: uzig


historical_entries

Description: This means the last 10,000 validator set states are stored.

  • Historical entries are used to track changes in validator sets, rewards, and slashing events over time.
  • This parameter is crucial for maintaining an accurate record of past state changes, especially during redelegations and reward distributions.

Default: 10,000


max_entries

Description: The maximum number of entries allowed for both unbonding delegations and redelegations per delegator.

  • This parameter limits the number of concurrent unbonding or redelegation operations a delegator can have at any given time
  • Ensuring a cap on these entries helps maintain the efficiency of the staking module and reduces the risk of abuse.

Default: 7


max_validators

Description: Defines the number of validators that can be part of the active validator set.

  • Only the top max_validators ranked by stake will participate in consensus and receive block rewards.
  • This parameter affects the network's decentralization, security, and performance.

Default: 4


min_commission_rate

Description: The minimum commission rate that validators are required to charge on delegator rewards.

Default: 0


unbonding_time

Description: The period delegators must wait to unfreeze their staked tokens after initiating an unbonding request.

  • During this unbonding period, delegators cannot transfer or redelegate their tokens, and they do not earn staking rewards.
  • This cooldown period is crucial for maintaining network security by preventing rapid withdrawal of staked assets in response to potential network attacks.

Default: 504h (21 days)

Staking CLI Quick Sheet

If you’re interested in running your own validator, check out our Set up a Validator Guide.

Fetch Staking Params:

zigchaind query staking params \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Get list of validators:

zigchaind query staking validators \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Create a file with your validator info:

PUBKEY=$(zigchaind tendermint show-validator)
bash -c "cat > /tmp/your_validator.txt" << EOM
{
"pubkey": $PUBKEY,
"amount": "1000000uzig",
"moniker": "validator's name",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "10"
}
EOM

Create your validator:

zigchaind tx staking create-validator /tmp/your_validator.txt \
--from $ACCOUNT \
--gas "auto" \
--gas-prices "0.0025uzig" \
--gas-adjustment 1.5 \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz \
--output json | jq -r '.txhash'

Confirm transaction and get your validator address:

zigchaind query tx $TXHASH \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz \
| grep raw_log
VALIDATOR_OP_ADDRESS=$(zigchaind q tx $TXHASH \
--output json | jq -r '.tx.body.messages[0].validator_address')

Check your validator's status:

zigchaind query staking validator $VALIDATOR_OP_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz \
-o json | jq -r '.validator.status'

Edit your validator information:

zigchaind tx staking edit-validator \
--commission-rate 0.05 \
--details "YOUR_DETAILS" \
--identity "YOUR_KEYBASE_ID" \
--min-self-delegation "100" \
--new-moniker "Your new moniker name" \
--website "YOUR_WEBSITE_URL" \
--security-contact "YOUR_EMAIL" \
--from $ACCOUNT \
--gas-adjustment 1.5 \
--gas auto \
--gas-prices="0.0025uzig" \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Stake/Delegate with a validator:

zigchaind tx staking delegate $VALIDATOR_ADDRESS $STAKE_AMOUNT \
--from $ACCOUNT --gas-adjustment 1.5 \
--gas auto --gas-prices="0.0025uzig" \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Get the Stakings on a Validator:

zigchaind query staking validator $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz -o json \
| jq -r '.validator.delegator_shares'

Get Delegation between address and validator:

zigchaind query staking delegation \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Get Delegations made by one delegator:

zigchaind query staking delegations $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Get Delegations made to one validator:

zigchaind query staking delegations-to $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Get Validator Info for given delegator validator pair:

zigchaind query staking delegator-validator \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Get All Validators Info for given delegator address:

zigchaind query staking delegator-validators $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Unstake from a validator:

zigchaind tx staking unbond $VALIDATOR_ADDRESS $UNSTAKE_AMOUNT \
--from $ACCOUNT --gas-adjustment 1.5 \
--gas auto --gas-prices="0.0025uzig" \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Get Unbonding Delegation between address and validator:

zigchaind query staking unbonding-delegation \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Query Unbonding Delegations made by one delegator:

zigchaind query staking unbonding-delegations $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

Get Unbonding Delegations made from one validator:

zigchaind query staking unbonding-delegations-from $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz

References