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.
| Parameters | Testnet Value | Mainnet Value |
|---|---|---|
| bond_denom | uzig | uzig |
| historical_entries | 10,000 | 10,000 |
| max_entries | 7 | 7 |
| max_validators | 4 | 4 |
| min_commission_rate | 0.0 (0%) | 0.0 (0%) |
| unbonding_time | 168h0m0s (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_validatorsranked 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:
- Mainnet
- Testnet
- Local
zigchaind query staking params \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking params \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking params \
--chain-id zigchain-1 --node http://localhost:26657
Get list of validators:
- Mainnet
- Testnet
- Local
zigchaind query staking validators \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking validators \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking validators \
--chain-id zigchain-1 --node http://localhost:26657
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:
- Mainnet
- Testnet
- Local
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'
zigchaind tx staking create-validator /tmp/your_validator.txt \
--from $ACCOUNT \
--gas "auto" \
--gas-prices "0.0025uzig" \
--gas-adjustment 1.5 \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz \
--output json | jq -r '.txhash'
zigchaind tx staking create-validator /tmp/your_validator.txt \
--from zuser1 \
--gas "auto" \
--gas-prices "0.0025uzig" \
--gas-adjustment 1.5 \
--chain-id zigchain-1 --node http://localhost:26657 \
--output json | jq -r '.txhash'
Confirm transaction and get your validator address:
- Mainnet
- Testnet
- Local
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')
zigchaind query tx $TXHASH \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz \
| grep raw_log
VALIDATOR_OP_ADDRESS=$(zigchaind q tx $TXHASH \
--output json | jq -r '.tx.body.messages[0].validator_address')
zigchaind query tx $TXHASH \
--chain-id zigchain-1 --node http://localhost:26657 \
| 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:
- Mainnet
- Testnet
- Local
zigchaind query staking validator $VALIDATOR_OP_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz \
-o json | jq -r '.validator.status'
zigchaind query staking validator $VALIDATOR_OP_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz \
-o json | jq -r '.validator.status'
zigchaind query staking validator $VALIDATOR_OP_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657 \
-o json | jq -r '.validator.status'
Edit your validator information:
- Mainnet
- Testnet
- Local
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
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 zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
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 zuser1 \
--gas-adjustment 1.5 \
--gas auto \
--gas-prices="0.0025uzig" \
--chain-id zigchain-1 --node http://localhost:26657
Stake/Delegate with a validator:
- Mainnet
- Testnet
- Local
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
zigchaind tx staking delegate $VALIDATOR_ADDRESS $STAKE_AMOUNT \
--from $ACCOUNT --gas-adjustment 1.5 \
--gas auto --gas-prices="0.0025uzig" \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
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 http://localhost:26657
Get the Stakings on a Validator:
- Mainnet
- Testnet
- Local
zigchaind query staking validator $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz -o json \
| jq -r '.validator.delegator_shares'
zigchaind query staking validator $VALIDATOR_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz -o json \
| jq -r '.validator.delegator_shares'
zigchaind query staking validator $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657 -o json \
| jq -r '.validator.delegator_shares'
Get Delegation between address and validator:
- Mainnet
- Testnet
- Local
zigchaind query staking delegation \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking delegation \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking delegation \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657
Get Delegations made by one delegator:
- Mainnet
- Testnet
- Local
zigchaind query staking delegations $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking delegations $ACCOUNT_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking delegations $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657
Get Delegations made to one validator:
- Mainnet
- Testnet
- Local
zigchaind query staking delegations-to $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking delegations-to $VALIDATOR_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking delegations-to $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657
Get Validator Info for given delegator validator pair:
- Mainnet
- Testnet
- Local
zigchaind query staking delegator-validator \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking delegator-validator \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking delegator-validator \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657
Get All Validators Info for given delegator address:
- Mainnet
- Testnet
- Local
zigchaind query staking delegator-validators $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking delegator-validators $ACCOUNT_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking delegator-validators $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657
Unstake from a validator:
- Mainnet
- Testnet
- Local
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
zigchaind tx staking unbond $VALIDATOR_ADDRESS $UNSTAKE_AMOUNT \
--from $ACCOUNT --gas-adjustment 1.5 \
--gas auto --gas-prices="0.0025uzig" \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind tx staking unbond $VALIDATOR_ADDRESS $UNSTAKE_AMOUNT \
--from zuser1 --gas-adjustment 1.5 \
--gas auto --gas-prices="0.0025uzig" \
--chain-id zigchain-1 --node http://localhost:26657
Get Unbonding Delegation between address and validator:
- Mainnet
- Testnet
- Local
zigchaind query staking unbonding-delegation \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking unbonding-delegation \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking unbonding-delegation \
$ACCOUNT_ADDRESS $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657
Query Unbonding Delegations made by one delegator:
- Mainnet
- Testnet
- Local
zigchaind query staking unbonding-delegations $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking unbonding-delegations $ACCOUNT_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking unbonding-delegations $ACCOUNT_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657
Get Unbonding Delegations made from one validator:
- Mainnet
- Testnet
- Local
zigchaind query staking unbonding-delegations-from $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node https://public-zigchain-rpc.numia.xyz
zigchaind query staking unbonding-delegations-from $VALIDATOR_ADDRESS \
--chain-id zig-test-2 --node https://public-zigchain-testnet-rpc.numia.xyz
zigchaind query staking unbonding-delegations-from $VALIDATOR_ADDRESS \
--chain-id zigchain-1 --node http://localhost:26657