How staking works in Polkadot and Kusama

How staking works in Polkadot and Kusama

What is staking?

In simplest terms, staking is an act of temporarily giving up control of your coins/tokens in order to earn rewards. When users lock their assets, they “stake” them to prove their motivation in the stability of the system.

But how does staking secure users their rewards? To understand this, we have to take a closer look at different types of Consensus Mechanisms.

Consensus is a process of agreeing on something by all participants. In this case it is agreeing on the progression of the blockchain or how blocks are added to the chain, particularly block production and block finalization.

Crypto started off with a now-considered “traditional” Proof-of-Work Consensus mechanism.

Proof-of-Work is a Consensus Mechanism, where participants agree ерфе finalization (validation) of blocks will be delegated to miners – participants who compete in their computational speed by solving difficult mathematical puzzles (thus proving their work). The miner, who completes the puzzle first gets to finalize the block and get a reward. Because of the high competition, Proof-of-Work has proven to be the fastest among all of the consensus mechanisms. The problem is that it is very energy-consuming. To prove their work miners have to spend a good deal of energy and resources. And a lot of work, done by those who don’t finish first, is going to waste.

The newer alternative to Proof-of-Work is Proof-of-Stake:

This is a consensus, where participants where validators are chosen to finalize blocks based on them freezing and holding a share of the assets, giving up their opportunity to sell them. This works as proof that the further expansion of the network is more important to the holder as a momentary gain and that they will act in good faith. And these holders would also get a reward for each validated transaction. Any attempt at manipulating the ledger and scamming the system results in nodes losing their locked investments.

Proof-of-Stake relies on people who hold tokens to act as validators (as opposed to relying on miners, which compete for the fastest computation in Proof-of-Work Consensus). In this Consensus model, validators don’t have to compete in computational speed. They are instead pre-selected to produce the blocks based on the stake backing them. And acting maliciously in this situation

But the classic Proof-of-Stake may be inclined towards centralization by its design, as the biggest hoarders of the staked tokens are slowly monopolizing the validation process. That is why developers of Polkadot chose to take a slightly different route and chose Nominated Proof-of-Stake Consensus.

Nominated Proof-of-Stake. Staking in Polkadot & Kusama

This type of Consensus is designed to oppose the tendency towards centralization observed in classic Proof-of-Stake, as validators are nominated by other actors (Nominators) in the network not only based on their stake, but on their reputation and trustworthiness too. 

Staking is a major commitment, which incentivizes them to act fairly and transparently in the network. Those willing to make this commitment, can get the right to verify legitimate transactions, add new “blocks” of transactions to the relay chain, and potentially earn newly created DOT, a cut of transaction fees, and tips. Nodes, acting maliciously, on the other hand, are ousted from the network and have their staked tokens taken away. Or, in the words of Uncle Ben – with great power comes great responsibility. 

Meanwhile Any DOT holder in the network can participate as a nominator and join a party responsible for choosing and supporting trusted nodes to act as validators. This is where Nominated proof-of-Stake does its magic. A nominator can publish a list of validator candidates and put down an amount of DOTs at stake to support them with. If some of these candidates are then elected as validators, the nominators get their share of the profit or the sanctions, on a per-staked-DOT basis. 

This can suggest a continuous source of revenue for the nominator, as long as it chooses validator candidates with good security practices. 

Since there are usually many more people (or nodes) with a stake than there are actual validator slots, PoS networks use a rotation system. Every epoch (which can be as short as 6 hours, as in Kusama, or as long as 5 days, as in Cardano), the system picks a set of nodes from a pool of validator candidates, and they get to confirm transactions – and share the rewards – during that epoch. 

Now, here’s the trick: the validator selection algorithm is often random, but those with bigger stakes have higher chances to get chosen. As a consequence, large stakers make more money in the long term.

Think of it as someone throwing marbles into a set of bowls of different sizes. If one bowl is much larger than the others, it will eventually accumulate more marbles (rewards).

Here is a model of roles in Polkadot’s staking system: 

  • Casual users
    This is the whole mass of Polkadot users regardless of their input. They might stake their DOTs or might not see them. However, all of them would be subject to the results of staking by nominators and validators.
  • Nominators
    Some of the users in Polkadot can act as Nominators if they decide to stake their DOTs and become responsible for appointing their stake to the validators who are the second type of participant. Nominators act by appointing their stake. Staking their DOT/KSM gives them the ability to elect the active set of validators and share in the rewards that are paid out. A good nominator performs due diligence on the validators that they elect.
  • Validators 

These are nodes, elected by nominators to become responsible for adding new blocks to the ledger. They run validator nodes and manage session keys, produce new block candidates, vote and come to consensus, validate the state transition function of parachains, and even have other responsibilities regarding data availability and XCM. For more information, you can take a look at the validator docs to understand what you need to do as a validator.

Polkadot/Kusama Validators. Staking as a validator

Validators verify transactions in the Polkadot network. 

There are two types of validators in the network:

  • Parachain validators participate in some form of off-chain consensus, and submit candidate receipts to the tx pool for a block producer to include on-chain.
  • The Relay Chain validators guarantee that each parachain follows its unique rules and can pass messages between shards in a trust-free environment.

For the sake of this article, we will focus on the latter ones – Relay Chain validators. 

Being the Polkadot/Kusama is one of the most responsible (and rewarding) jobs in the network, the highest role in the staking hierarchy of the network, albeit the one hardest to obtain. There is also a limited number of validator slots in Polkadot, so the competition is fierce.

How many validators are there?

There are 297 validators working to add new blocks to the Polkadot ledger as of the time of writing this article. Validators are chosen for their roles each era, which lasts about 24 hours in Polkadot and 6 hours in Kusama.

How to become a validator:

Potential validators start off by indicating their intention to validate and become what’s called “validator candidates”. After they state their intention, their candidacy becomes public to nominators in the network. Nominators then each submit a list of up to 16 candidates that they support by staking their DOT towards these candidates. After that, the network automatically distributes the stake among validators in an even manner. 

In the next era, a certain number of validators having the most DOT backing get elected and become active. 

Is there a minimum staking amount for validators?

A minimum of 10 DOT is required to stake by validators to register their candidacy. However, this amount does not guarantee staking rewards. The nominated amount has to be greater than minimum active nomination, which is a dynamic value that can be much higher than 10 DOT. This dynamic value depends on the amount of DOT being staked, in addition to the selected nominations.

There is also a minimum stake amount (from nominators) necessary to be elected as an active validator. But this number is dynamic and depends on these two factors: 

1. How much stake is being put behind each validator

2. The size of the active set and how many validators are waiting in the pool.

These are some of the tools you can use when calculating the minimum stake for becoming an active validator:

  • Polkadot Apps Targets tab. The value at the top of the screen saying “Lowest” is the least staked validator. You need at least this much + 1 to enter the set.
  • Offline Election can provide exact results of running an election on the current set of validators using the same Rust code that is ran in Polkadot.
  • Validator stats script can give you an estimate that is based on the currently elected set, as well as some statistics about Kusama validators.

Stakers should be aware that any DOT that you stake is liable to be slashed in case of an improper setup of malicious activity. 

What are the requirements for validators in Polkadot or Kusama?

The following information is stated on Polkadot website and available in more detail on their website in the Run a validator entry.

  • CPU
    • x86-64 compatible;
    • Intel Ice Lake, or newer (Xeon or Core series); AMD Zen3, or newer (EPYC or Ryzen);
    • 4 physical cores @ 3.4GHz;
    • Simultaneous multithreading disabled (Hyper-Threading on Intel, SMT on AMD);
    • Prefer single-threaded performance over higher cores count. A comparison of single-threaded performance can be found here.
  • Storage
    • An NVMe SSD of 1 TB (As it should be reasonably sized to deal with blockchain growth). An estimation of current chain snapshot sizes can be found here. In general, the latency is more important than the throughput.
  • Memory
    • 16GB DDR4 ECC.
  • System
    • Linux Kernel 5.16 or newer.
  • Network
    • The minimum symmetric networking speed is set to 500 Mbit/s (= 62.5 MB/s). This is required to support a large number of parachains and allow for proper congestion control in busy network situations.

Staking rewards for Validators in Polkadot and Kusama? 

How much do validators actually earn for their work in Polkadot and Kusama? Simply put – it depends. More specifically, it depends on the staked amount and the number of actions a validator performs.

For every era (a period of time approximately 6 hours in length in Kusama, and 24 hours in Polkadot), validators are paid proportionally to the amount of era points that they’ve earned during this era. Era points are reward points earned for payable actions like:

  • issuing validity statements for parachain blocks.
  • producing a non-uncle block in the Relay Chain.
  • producing a reference to a previously unreferenced uncle block.
  • producing a referenced uncle block.

The average return is estimated to be around 14%. But this number is highly volatile and speculative. This rate may vary depending on different criteria.

Depending on the volume of applicants, Validators with less than 5,000 DOT self staked will still be considered on a case-by-case basis; they’ll need to make a case for good-intentions (i.e. what their contributions to the network are, how long they have been a validator, what kind of validator setup they run, what their approach to security is, what regions they operate in, etc.).

Valuable resources: 

  • HashQuark Staking Strategy – The HashQuark staking strategy dashboard helps you choose the optimal set-up to maximize rewards, and provides other useful network monitoring tools.
  • Polkastats – Polkastats is a cleanly designed dashboard for validator statistics.
  • YieldScan – Staking yield maximization platform, designed to minimize effort.
  • Subscan Validators Page – Displays information on the current validators – not as tailored for validators as the other sites.

Polkadot/Kusama Nominators. Staking as a Nominator

Since validator slots are limited, most of those who wish to stake their DOT and contribute to the economic security of the network will actually be nominators. Let’s take a closer look at how they operate.

Nominators usually have an easier job than validators. Their responsibilities are far more narrow than those of validators, but are important and crucial nevertheless. These responsibilities include monitoring the system, selecting validators and monitoring their performance, and generally watching out for health monitoring of their validators’ accounts. Thus, while not being completely passive, a nominator’s experience is relatively hands-off compared to that of a validator, and even more so with nomination pools. 

Validators who produce a block are rewarded with tokens, and they can share rewards with their nominators. Both validators and nominators can stake their tokens on chain and receive staking rewards at the end of each era. The staking system pays out rewards equally to all validators regardless of stake. Thus, having more stake in a validator does not influence the amount of block rewards it receives. This avoids the centralization of power to a few validators.

To see details on different technicalities of Nominator’s role, such as Controller and Stash accounts for Staking, see the official Polkadot’s article on the role of Nominator.

Selecting validators

The task of choosing validators is a great responsibility. Nominators should take those two things into account nominator reward and risk preferences. Ideally one aims to maximize the reward-to-risk ratio by maximizing rewards and minimizing risks, with sometimes having to compromise between the two, as minimizing risks might decrease rewards as well. Nominators should pay attention, especially to six criteria when nominating validators (not in order of importance):

  • recent history of the era points earned across eras
  • validator’s self stake (shows skin in the game)
  • total stake backing the validator (which is the sum of self stake and the stake coming from nominators)
  • commission fees (i.e. how much validators charge nominators)
  • verified identity

You may be interested

Learn basics in our free Wiki section!