Skip to main content

Zond Node Staking

DOCUMENT STATUS
This document is in: DRAFT status and needs additional input!

The Proof of Stake (POS) system rewards validators for helping secure the network by staking a set amount of funds to use in the cryptographic generation of the next block. These instructions will get you started staking on the Zond Network.

Staking Information

In order to stake on the Zond network, a user must lock up at minimum 10,000QRL10,000 \text{QRL} in a staking address. These funds are locked up for the duration of the epoch, or 100100 blocks through a stake transaction that is broadcast onto the network.

Once this transaction is accepted onto the chain, the users stake will not become valid until the next epoch, or 100100 blocks have passed. Funds must remain in the address and the dilithium_keys file must exist in the node's root directory ~/.zond.

At the head of the epoch, the block proposers are selected and validators chosen for each block at random from all of the viable staking transactions on the chain. For the next 100 blocks the chosen Block Proposers and Validators generate blocks and create the chain with active transactions. At the start of the next epoch, another random

Staking Definitions

TermDefinitionSynonyms
EpochEvery 100 blocks of timeStaking Block, Staking Round
AttestorDilithium Staking addressValidator
Block ProposerStaking address chosen to create the blockMinter, Slot Leader
Staking KeysDilithium_keys file with keys associated to a Zond dilithium Addresskey file

Staking Rewards

Staking RoleReward
Attestor2 QRL
Block Proposer5 QRL + block TX Fees

Staking Instructions

In order to stake on Zond, a Stake transaction is made through the use of a Dilithium address. This stake transaction can create up to 100100 Dilithium public keys, each corresponding to a fixed staking amount (presently 10000 QRL).

Requirements

The following things are required to begin the staking process. Follow the instructions for these items before continuing with this doc.

  • A running Zond Node, connected to the public network and fully synced to the latest block
  • Zond Dilithium Address in a wallet.json file with 10,000QRL10,000 \text{QRL} in that Dilithium Address address

Generate Stake TX

With the Zond Node installed, and a fully funded dilithium address, generate the dilithium_keys file to use for staking and broadcast the staking transaction.

info

This command expects there is a wallet.json file in the current directory. Use the wallet-file flag to specify another location.

./zond/zond-cli tx stake --account-index 1 --amount 10000000000000 --gas 1000 --gas-price 0 --nonce 0 --broadcast --remote-addr 45.76.43.83:19009 --dilithium-file ~/.zond/dilithium_keys

This will broadcast the stake transaction and output a dilithium_keys file into the current directory the command was issued. Move this file to the root node directory ~/.zond/dilithium_keys

  • Amount is given in shor.
  • remote_addr is only needed if you are not running a local node, instead using a remote node for the transaction
note

Find the address index using the ./zond-cli wallet list command. More information can be found here

Restart the node to pickup this new key file.

Validate Stake Balance

Using the API call zond_getStakeBalance to verify the stake balance for a given address. Replace the address with your staking address

curl --location --request POST 'http://45.76.43.83:4545' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"zond_getStakeBalance","params":["0x200117c87b91da26b8c1aa823cad3b6ad30f7e8d", "latest"],"id":1}'
note

Additional information on the API calls available, see the Zond API documentation.

Current Epoch Validators

To list all validators and Block Proposers in the current epoch, use the zond_getValidators API call

curl --location --request POST 'http://45.76.43.83:4545' --header 'Content-Type: application/json' --data-raw '{
"jsonrpc": "2.0",
"method": "zond_getValidators",
"params": [],
"id": "1"
}'

If you have been selected for staking functions, your staking address will be in this list. If you have just issued the stake transaction, you have to wait until the next epoch.

Un-Stake Funds

To remove the funds locked up in a staking address, allowing transfer and usage you must issue another stake transaction using the same dilithium address. This transaction will carry a value of 0 qrl, marking the stake empty and not valid for attestation or minting blocks.

These funds will become available after the next epoch after the transaction is accepted on the chain.

./zond/zond-cli tx stake --account-index 1 --amount 0 --gas 1000 --gas-price 0 --nonce 0 --broadcast --remote-addr 45.76.43.83:19009