Operators
NPoS Validator Election

Tangle Network Consensus Algorithm

Tangle Network uses Nominated Proof of Stake (NPoS) as its consensus mechanism, similar to Polkadot and Kusama. A key part of NPoS is the election of validators to participate in consensus. This document provides an overview of the Sequential Phragmén election algorithm used in Tangle Network's NPoS for validators.

Goals of the NPoS Election Algorithm

The Sequential Phragmén election algorithm in Tangle Network aims to optimize three key metrics when determining the set of active validators:

  1. Maximize the total stake securing the network.
  2. Maximize the stake behind the least-staked validator.
  3. Minimize the variance in stake across the validator set.

These goals ensure the network has high economic security, a high threshold for attack, and fair representation of stake.

Sequential Phragmén Election Method

Tangle Network uses the Sequential Phragmén method for electing validators. This multi-winner election method aims to elect a validator set such that the stake is distributed as evenly as possible among them. The algorithm works as follows:

  1. Nominators cast their votes, indicating which validators they support.
  2. The validator with the highest approval stake (total stake backing them) is elected.
  3. The stake of each nominator who supported the elected validator is reduced proportionally to their contribution to the validator's approval stake.
  4. The process repeats from step 2 until all available validator slots are filled.

This iterative process ensures a fair distribution of stake across the elected validator set.

Practical Considerations and Optimizations

To optimize the election process and minimize on-chain computation, Tangle Network employs several techniques:

  • Minimizing edges by reducing the number of validators per nominator.
  • Maintaining an even stake distribution among elected validators.
  • Using off-chain workers to compute the election results and submit them on-chain.

There are also limits on the number of validators a nominator can select and the number of nominators per validator to manage complexity.

Importance for Validators

As a validator, it's important to understand that not all stake nominated to you may end up contributing to your final backing stake after the election. Nominators typically split their stake among multiple trusted validators.

Tracking your anticipated backing stake based on nominations can help you plan your node operations. However, the final results will depend on the overall stake distribution and the specific election algorithm used in that era.

The Sequential Phragmén election method is designed to maintain a fair, decentralized, and secure distribution of stake across the active validator set. By participating in the Tangle Network as a validator, you contribute to the network's security and can earn rewards proportional to your backing stake.

Further Resources

For more information on NPoS, election method and the technicals, see: