# Join as a Validator
# How to become a validator on Secret Network
# 1. Run a new full node on a new machine.
# 2. Generate a new key pair for yourself (change
<key-alias> with any word of your choice, this is just for your internal/personal reference):
secretcli keys add <key-alias>
⚠️Note⚠️: Backup the mnemonics! ⚠️Note⚠️: Please make sure you also backup your validator
Note: If you already have a key you can import it with the bip39 mnemonic with
secretcli keys add <key-alias> --recover or with
secretcli keys export (exports to
secretcli keys import.
# 3. Output your node address:
secretcli keys show <key-alias> -a
# 4. Transfer tokens to the address displayed above.
# 5. Check that you have the requested tokens:
secretcli q account $(secretcli keys show -a <key_alias>)
If you get the following message, it means that you have no tokens yet:
ERROR: unknown address: account secret1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx does not exist
# 6. Join the network as a new validator: replace
<MONIKER> with your own from step 3 above, and adjust the amount you want to stake
(remember 1 SCRT = 1,000,000 uSCRT, and so the command below stakes 100k SCRT).
secretcli tx staking create-validator \ --amount=100000000000uscrt \ --pubkey=$(secretd tendermint show-validator) \ --commission-rate="0.10" \ --commission-max-rate="0.20" \ --commission-max-change-rate="0.01" \ --min-self-delegation="1" \ --gas=200000 \ --gas-prices="0.025uscrt" \ --moniker=<MONIKER> \ --from=<key-alias>
# 7. Check that you have been added as a validator:
secretcli q staking validators | jq '. | select(.description.moniker == "<MONIKER>")'
secretcli q staking validators | grep moniker. You should see your moniker listed.
# Dangers in running a validator
There are a couple of scenarios that can lead to losing a precentage of your and your delegators' stake. These are called slashing events.
The following is updated as of March 23, 2020.
# Slashing for downtime
Conditions for downtime:
- Signing less than 2500 blocks out of every 5000-block window. For a block time of 5.8 seconds, this roughly translates to being up for 4 hours out of every 8-hour window.
Penalties for downtime:
- Slashing of 1% of your and your delegators' staking amount.
- Jailing for 10 minutes of your validator node. You don't earn block rewards for this period and at the end must manually unjail your node with
secretcli tx slashing unjail --from <key-alias>.
# Slashing for double-signing
Conditions for double-signing:
- Your validator signs the same block height twice.
Penalties for double-signing:
- Slashing of 5% of your and your delegators' staking amount.
- Jailing forever (tombstoned) of your validator node. You cannot earn block rewards anymore with this validator and you and your delegators must redelegate your stake to a different validator.
# Protecting your validator agains DDoS attacks
See Sentry Nodes.
# Staking more tokens
(remember 1 SCRT = 1,000,000 uSCRT)
In order to stake more tokens beyond those in the initial transaction, run:
secretcli tx staking delegate $(secretcli keys show <key-alias> --bech=val -a) <amount>uscrt --from <key-alias>
# Renaming your moniker
secretcli tx staking edit-validator --moniker <new-moniker> --from <key-alias>
# Seeing your rewards from being a validator
secretcli q distribution rewards $(secretcli keys show -a <key-alias>)
# Seeing your commissions from your delegators
secretcli q distribution commission $(secretcli keys show -a <key-alias> --bech=val)
# Withdrawing rewards
secretcli tx distribution withdraw-rewards $(secretcli keys show --bech=val -a <key-alias>) --from <key-alias>
# Withdrawing rewards+commissions
secretcli tx distribution withdraw-rewards $(secretcli keys show --bech=val -a <key-alias>) --from <key-alias> --commission
# Removing your validator
Currently deleting a validator is not possible. If you redelegate or unbond your self-delegations then your validator will become offline and all your delegators will start to unbond.
# Changing your validator's commission-rate
You are currently unable to modify the
Modifying the commision-rate can be done using this:
secretcli tx staking edit-validator --commission-rate="0.05" --from <key-alias>