Blocks United

Polkadot and Kusama’s Phragmen Algorithm

Key Takeaways

  1. Phragmen algorithm underpins the Nominated Proof of Stake consensus mechanism
  2. Phragmen algorithm prioritizes security
  3. Phragmen algorithm allocates your bonded tokens to your nominated validators
  4. Phragmen algorithm rewards and punishes validators and their delegators

Decoding the Phragmen algorithm and DotSama's nominated proof of stake

The average crypto holder does not care about consensus mechanisms, or the algorithms that underpin the various blockchains. They care about price go up.

However, for those who choose to delegate their crypto it makes sense to learn the basics before staking their DOT and KSM tokens. The DotSama ecosystems are unique and not taking the time to learn why could greatly affect staking yield and overall returns. 

What is Nominated Proof of Stake (NPoS)?

Polkadot, Kusama, DotSama, phragmen algorithm, nominated proof of stake, NPoS

At Blocks United we run validators for Polygon, the Cosmos Hub, Kava, and HydraDX. Token holders can stake with us to help secure the network and in return they are paid more tokens. 

Polygon has a fixed set of 105 validators. There is no competition from anyone hoping to spin up a validator node and knock us out of the active set. We are competing with the other 104 MATIC validators to acquire tokens and generate blocks. Polygon uses what’s called, a modified Poof-of-Stake consensus mechanism. Currently there are no slashing penalties for validator misbehavior.

The Cosmos ecosystem is openly competitive and anyone who has enough tokens can get into the active set to help secure the chain and earn rewards. VCs or institutions could buy enough ATOM or KAVA tokens to spin up a node, get into the active set of validators, and instantly compete to create blocks and earn rewards. Cosmos uses CometBFT Proof-of -Stake, formerly known as Tendermint Core. Validators are slashed for misbehvior. That means their delegators also lose tokens.

Nominated Proof of Stake, which is used by Polkadot and Kusama works differently. NPoS is designed to prioritize network security and thus prevents any single validator node from becoming too large. It uses rewards in the form of high yield when staking with smaller validators, and punishment in the form of lower yield when staking with large validators. Like Cosmos, validators and delegators are slashed for misbehavior.

According to, “These mechanisms ensure the entire process is fair. Once these validators are chosen, the network evens out the playing field further by distributing all stakes evenly.”

Click here to buy a Ledger hardware wallet and get a little free bitcoin.

What is the phragmen algorithm?

The Phragmen algorithm was invented by Edvard Phragmen in the 1890s. Originally intended to solve the problem of electing individual people from a given set of candidates, Polkadot and Kusama are using it to select validators. The algorithm is the foundation of Nominated Proof of Stake.

According to Polkadot Wiki, “Phragmén would run once on every election to determine the top candidates to assume council positions and then again amongst the top candidates to equalize the weight of the votes behind them as much as possible.”

How many DOT or KSM validators should you nominate? 

The good news is that you don’t have to research and choose validators. You can stake with a pool, or allow the algorithm to chose your validators. Be sure to read the next article for more detail.

Nominating too many validators is a common mistake. It’s a math equation, but we will try to keep it simple.

The average staker should nominate 2 to 4 validators. Nominate 1 validator that is safely in the middle of the active set. That means they have the median number of tokens and are ranked around #150. 

Then, nominate 1 or 2 that are in the lower 1/2 of active validators. That means they have a lower total stake than the nodes in the top 1/2 of the active set and are ranked somewhere between #150-#297.

REMEMBER, staking yield is HIGHER on smaller active nodes. Nominating validators in the lower 1/2 of the active set will give you a slightly higher yield.

Nominate 1 inactive validator. Look for an inactive validator that’s just outside the active set.

If an inactive node makes it into the active set, it will have the HIGHEST STAKING YIELD of ALL active nodes during that era (24 hour period). Read that again, so you’re sure to understand.

what is the phragmen algorithm, what is NPoS, what is Nominated Proof of Stake, how many DOT validators should I nominate, how many KSM validators should I nominate

Let’s get down and dirty and learn how the Phragmen algorithm works.

Example: You have 1000 tokens and nominate 3 active nodes and 1 inactive node. Let’s say your nominated validators are ranked 150, 200, 250, and 300.

ASSUME the Phragmen algorithm divides your bonded tokens evenly between ALL FOUR of the validators you’ve nominated.

So, you wind up with 250 tokens staked with each validator (1000/4=250).

If your 250 tokens aren’t enough to bump the inactive node you’ve nominated up into the active set, then the validator stays inactive. The inactive validator won’t earn block rewards.

THAT DOES NOT HURT YOU, because the Phragmen algorithm allocates ALL of your bonded tokens to your active validators. 

You can assume the Phragmen algorithm divides your stake up evenly between your 3 active nominations. 333.3 tokens to each of the 3 validators (1000/3=333.3).

The new era starts and the inactive validator you nominated isn’t allocated ANY of your tokens. All 1000 are allocated to the active validators you’ve nominated. All 1000 of your tokens will be put to work and earn block rewards.

There's no guarantee that your tokens are split evenly between your active validators. Phragmen COULD allocate all 1000 tokens to only 1 of your active nodes, It decides what is best.

But, let’s stick with assuming it divides up your tokens evenly… 333.3 to each of your 3 active nodes.

This is where the art of selecting validators comes in.

To protect yourself, nominate 1 validator in the top 1/2 of the active set. That validator is likely to return to the active set and as long as you have 1 active nomination, ALL of your tokens will earn block rewards. 

WATCH OUT for your active validators becoming oversubscribed. That's the next variable to manage.

Understanding the Phragmen algorithm

how to stake DOT, how to stake KSM, oversubscribed validator

If any of the active nodes you’ve nominated become OVERSUBSCRIBED, then YOU ARE SUDDENLY COMPETING with that node’s other nominators/stakers.

This gets confusing, so pay close attention.

Remember, the Phragmen algorithm is designed to keep the network decentralized. So, it prevents validators from getting too large. 

ALL validators are likely to become oversubscribed. 

Once a validator has 512 or more nominations it’s labeled as “oversubscribed.” Those with a higher stake on that node keep earning rewards, while those with a lower stake on that node get bumped off and STOP earning rewards.

Don’t get bumped out of earning rewards! If your validator becomes OVERSUBSCRIBED, make sure that your stake is above the average active stake on that node.

You can see the average stake by clicking the drop down arrows next to any validator node.

If you’ve nominated 3 active nodes and 1 inactive node, assume your stake is split evenly between those 3 active nodes at 333.3 tokens each.

Remember, your inactive node isn’t allocated any of your tokens during the era. ALL your tokens are allocated to your active nodes.

Find out if 333.3 is AT OR ABOVE THE AVERAGE STAKE on your OVERSUBSCRIBED node. If your stake is less than the average, nominate fewer nodes.

If your stake is at or above the average stake on your OVERSUBSCRIBED active node, you’re probably safe and will continue to earn block rewards.

The good news is that you don’t have to worry about anything you just read, if you stake with a pool. The pool operators stay on top of these details, so you don’t have to.

That being said, be sure to check out the next article: How To Choose Polkadot and Kusama Validators.

The Phragmen algorithm and NPoS is optimizing for network decentralization and resilience. It picks the validators most qualified to create blocks, verify blocks, and decentralize the ecosystem.

Canaries fly out of coal mines when there is toxic gas workers cannot see. With this in mind, developers build on Kusama without the fear of things going wrong. Kusama is meant to build, break, and then improve dApps. Once developers are satisfied that their dApp is ready for mainstream adoption, they move from Kusama to Polkadot.

Ethereum originally used a Proof of Work consensus mechanism, which is energy intensive and is not interoperable with other ecosystems. Polkadot was created to solve the scalability and interoperability dilemma. However, now that Ethereum uses a Proof of Stake consensus mechanism it is well on its way to solving the same problems that Polkadot set out to conquer.

Fortunately, the future will be one of multiple blockchain ecosystems and many will thrive and be interoperable. 

Nothing we say is financial advice or a recommendation to buy or sell anything. Cryptocurrency is a highly speculative asset class. Staking crypto tokens carries additional risks, including but not limited to smart-contract exploitation, poor validator performance or slashing, token price volatility, loss or theft, lockup periods, and illiquidity. Past performance is not indicative of future results. Never invest more than you can afford to lose. Additionally, the information contained in our articles, social media posts, emails, and on our website is not intended as, and shall not be understood or construed as financial advice. We are not attorneys, accountants, or financial advisors, nor are we holding ourselves out to be. The information contained in our articles, social media posts, emails, and on our website is not a substitute for financial advice from a professional who is aware of the facts and circumstances of your individual situation. We have done our best to ensure that the information provided in our articles, social media posts, emails, and the resources on our website are accurate and provide valuable information. Regardless of anything to the contrary, nothing available in our articles, social media posts, website, or emails should be understood as a recommendation to buy or sell anything and make any investment or financial decisions without consulting with a financial professional to address your particular situation. Blocks United expressly recommends that you seek advice from a professional. Neither Blocks United nor any of its employees or owners shall be held liable or responsible for any errors or omissions in our articles, in our social media posts, in our emails, or on our website, or for any damage or financial losses you may suffer. The decisions you make belong to you and you only, so always Do Your Own Research.

The Blocks United Promises

To be ethical and trustworthy

To charge reasonable commission so you can get the highest yield

100% uptime. Our validator nodes run 24/7/365

Aligning our values with our delegators. We've self-staked tokens alongside yours.

Responding to delegator questions and inquiries in a timely manner.

Contributing to the communities we validate for.

Get Weekly Staking Updates!

We’ll send you staking opportunities weekly, including our popular “Cosmos Airdrops” email. We’ll never spam or try to sell you anything and you can unsubscribe anytime!

Join our Email List

Get content like this sent directly to your inbox!

Contact Us!

Thank you!

Please check your email to confirm your submission.

Don't forget to follow us on your favorite social media.

As a reminder we will never sell, share or misuse the information you’ve kindly provided us. We take this seriously and value the trust you’ve placed in us. Thank you!

Contact Us!

We are happy to help you navigate Proof of Stake and answer any questions you may have. 

If you are currently staking with us and having an issue, please let us know and we will get back to you right away.