Delegating to a Validator
Prerequisites
This tutorial requires zetacored
CLI to be installed. Please, check out the
docs on installing the CLI.
Delegating to a Validator
ZetaChain is a proof of stake blockchain network. Validators are responsible for producing new blocks and securing the network. You can delegate your ZETA to a validator to participate in the network and earn rewards.
You can find a list of validators on ZetaScan, Ping Pub, or any other explorer.
Choose the validator you want to delegate to based on their commission rate, uptime, how much voting power they have and other factors. It is generally a good idea to NOT delegate to validators that have the most voting power, this ensures that the network remains decentralized.
Copy the validator's operator address from the explorer. The address should be
prefixed with zetavaloper
.
Next, check your account balance and decide on the amount you want to stake.
Before delegating it's important to understand that your ZETA will be locked for a period of time. You will not be able to transfer or spend it. The amount of time it is locked for depends on the network parameters. You can check the parameters using the API:
https://zetachain-athens.blockpi.network/lcd/v1/public/cosmos/staking/v1beta1/params
Run the following command to delegate your ZETA to the validator:
zetacored tx staking delegate zetavaloper167ns6zwczl9asjs47jwv3uhtkxfjcvx3fg3d4a 1000000000000000azeta --node https://zetachain-athens.blockpi.network:443/rpc/v1/public --from alice --chain-id athens_7001-1
zetavaloper167ns6zwczl9asjs47jwv3uhtkxfjcvx3fg3d4a
is the validator operator address1000000000000000azeta
is the amount (in this example, 0.001 ZETA)--node https://zetachain-athens.blockpi.network:443/rpc/v1/public
is the Tendermint RPC URL--from alice
is they account key name (see Managing Accounts)--chain-id athens_7001-1
is the chain ID of the ZetaChain testnet
The terminal will ask you to confirm the transaction:
auth_info:
fee:
amount: []
gas_limit: "200000"
granter: ""
payer: ""
signer_infos: []
tip: null
body:
extension_options: []
memo: ""
messages:
- "@type": /cosmos.staking.v1beta1.MsgDelegate
amount:
amount: "1000"
denom: azeta
delegator_address: zeta19nfaqu9wr0fktyyampva98ec025kjy0phww5um
validator_address: zetavaloper167ns6zwczl9asjs47jwv3uhtkxfjcvx3fg3d4a
non_critical_extension_options: []
timeout_height: "0"
signatures: []
confirm transaction before signing and broadcasting [y/N]: y
Type y
and press Enter to confirm.
code: 0
codespace: ""
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: '[]'
timestamp: ""
tx: null
txhash: C86E7C0E98A16CA0EB63800DF6CBB80D492201E17AB57229790DCF3403B59D02
The transaction was successful. You can check your balance again to see that the amount has been deducted.
You can also confirm the transaction on the explorer by searching for the transaction hash: