Polkadot staking — The theory

NPoS

As you might know, Polkadot uses the Nominated Proof of Stake as a means of selecting the validator set which is validating in the network. There will always be a limited number of active validators, now we are about 200 and the number will grow up to 1000.

The election process

Phragmén algorithm & stake distribution

Because all the validators have equal voting power, the entire stake should be distributed among them as evenly as possible. So here comes into play Phragmén’s multi-winner election algorithm which was originally developed by Lars Edvard Phragmén in Sweden to create more fair election outcomes with seats in parliament distributed proportionally to the votes.

  1. Maximize the total amount of stake in the validator set (which increases network security)
  2. Maximize the stake behind the minimally staked validator which has been elected
  3. Minimize differences in the stake between elected validators

Reward mechanism

Since there is an equal voting power for each elected validator, the reward is also the same for each of them. There are actually two parts of the reward

  • Commission — is configurable on the validator side and it’s a fee collected to pay for its operation costs
  • Reward — is distributed between the validator and nominators proportionally to their stake (remember, validators can have their own stake as well)

Era points

Rewards which will all validators receive once per era (remember, all active validators will get the same reward) is calculated from the era points.

Claiming rewards

Rewards are recorded once in epoch/session (6 hours) and calculated once in the era.

Staking, source: Pixabay

Slashing

Slashing is a way how to punish a validator if it misbehaves or even tries to attack the network. The validator’s entire stash will be slashed by some percentage and both the validator and its nominators will lose some of their funds. Let’s have a look at how the network can punish the validators if they misconduct

  • Level 1 — isolated unresponsiveness (maybe due to some occasional network problems on the validator’s side). No slashing occurs, only chilling (removing validator from the active validator set and preventing him from joining the next elections)
  • Level 2 — frequent unresponsiveness or rare equivocation (double voting). Only small slashing occurs and chills
  • Level 3 — misbehavior unlikely to be accidental but doesn’t harm network security (for example frequent equivocation or unjustified voting in GRANDPA). Slashes a moderately small amount and chills
  • Level 4 — malicious behavior that poses a security or monetary risk inside the network. Slashes most of the stake and chills

Number of tokens

Polkadot is set to be an inflationary network which means that there is no maximum of DOTs like in Bitcoin. This inflation is set to be 10% in the first year, the overall goal is to have 50% of all DOTs staked. If 50% of all DOTs are staked, all the inflation will go to the validators. If the number of tokens staked becomes bigger or lower, the network with lower the rewards for validators and send the rest to the treasury.

Conclusion

Ok, it has been really a lot of the theory and ideas behind staking in Polkadot so feel free to take some time to digest it :) In the next writing, we will have a look at how to practically set up secure staking with stash and controller accounts and how to nominate the best validators based on what we have covered in this article.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Polkadotters | Kusama & Polkadot validators

Polkadotters | Kusama & Polkadot validators

Czech bloggers & community builders. We are validators of Polkadot, Kusama, Darwinia, Crab, Bifrost, HydraDX, StaFi, Centrifuge under the name: POLKADOTTERS