Guide: Staking your RMO tokens
This page will explain how validators are chosen in the system, how to become a validator and stake your coins, how to delegate your coins to a validator, how slashing works, and why it is needed. At the high level, Rarimo is built on top of Tendermint and inherits almost all mentioned characteristics, except minting (rewards).
Validators
Validators are responsible for securing the RMO token and validating transactions on-chain. This is done through participation in a threshold signature(TSS), which k-of-n validators must sign.
As in the Cosmos (Tendermint), validators can have one of three statuses:
Unbonded
- the validator cannot sign blocks and doesn't earn rewards, but they can receive delegations.Bonded
- the validator receives sufficient bonded tokens; now, he signs blocks and receives rewards. They can receive further delegations, and they can be slashed for misbehavior.Unbonding
- validator can leave the active set by his choice or due to slashing / jailing. At this point, all delegator's tokens will be unbonded, i.e., returned to them.
Only the top-stake validators will participate in block signing.
Validators may change each block, and their maximum amount is determined by MaxValidators
variable, which currently equals 10.
It is planned to be 50 later.
Staking and delegations
The following guide explains how to set up a validator node and how to stake the tokens. The validator should stake a required amount of tokens by himself before token holders would be able to delegate their stake to the validator.
When one delegates tokens to a Validator, they are issued a number of "shares" based on a dynamic exchange rate, calculated as:
Shares per Token = validator.TotalShares() / validator.Tokens()
When a delegator then undelegated his tokens, the token amount is calculated as:
Tokens per Share = validator.Tokens() / validator.TotalShares()
Shares` are an accounting mechanism, not a fungible asset.
To delegate tokens to a validator, the holder can execute the following command:
rarimo-core tx staking delegate [validator-addr] [amount] --from mykey
To redelegate tokens, the holder can execute the following command:
rarimo-core tx staking redelegate [src-validator-addr] [dst-validator-addr] [amount] --from mykey
Finally, to take delegated tokens back, the holder can execute the following command:
rarimo-core tx staking unbond [validator-addr] [amount] --from mykey
Rewards and distribution
Rarimo uses a constant number of tokens being minted every block - X
.
The number of minted tokens can be adjusted based on the DAO votes.
Currently, the X
is set to 4.
During the first four years, 107.374.182 tokens are reserved for validator awards. Newly issued tokens are distributed among the validators and their delegators (depending on the share of staked coins). Following the first four years, a portion of the transaction fees will be distributed among the validators and their delegates.
The distribution mechanism operates as follows. Collected rewards are pooled globally and divided out passively to validators and delegators. Each validator has the opportunity to charge a commission to the delegators on the rewards collected on behalf of the delegators. Fees are collected directly into a global reward pool and validator proposer-reward pool.
The chart below describe the validator rewards over time:
Slashing
Slashing is a penalty for validator misbehavior and assumes a partial loss of the stake and other restrictions.
Two cases incur slashing:
- When a validator goes offline for a long time, the validator and the users who delegated their RMO token to it lose 1% of their stake. The validator also loses the ability to vote on future blocks for a period of time (jailing). After being jailed, the validator can wait and send the
Unjail
message, after which he can return to the pool of validators. The liveliness requirement for the validators is signing at least 50% of their blocks in the last 7200 blocks. You can fetch the current liveness and jailing parameters here. - When a validator tries signing two or more blocks of the same height, the validator and the users who delegated their RMO token to it lose 5% of their stake.
Because of the slashing, redelegating tokens (or unbonding) takes some time.