Алгоритм консенсуса PoS / LPoS¶
Proof of ownership with the right to lease. In PoS systems, the creation of a block does not require energy-intensive calculations, the miner’s task is to create a digital block proof.
Proof of Stake¶
The mechanism for allocating block creation rights is based on the number of tokens in the user’s account. The more tokens a user has, the more likely he or she can create a block.
In Proof of Stake consensus the right to generate a block is determined by pseudo-random way, because by knowing the previous miner and balances of all users in the system the following miner can be identified. This is possible due to a deterministic computation of a block’s generating signature, which can be obtained by SHA256 hashing of current block’s generating signature and the account’s public key. The first 8 bytes of the resulting hash is converted to a number, referred to as the account hit - Xn and will be a pointer to the following miner. The time of block generation for account i is calculated as:
bi - a stake (stake of participant’s balance of overall balance of the system)
An - baseTarget, the adaptive ratio, regulating the average time of issue of the block;
Xn - an account hit;
Tmin - 5 seconds, a constant defining the minimum time interval between blocks;
C1 - a constant, which equals 70 and adjusts the form of allocation of the interval between blocks;
C2 - a constant which equals 5E17 and adjusts the baseTarget value (complexity).
Based on this formula, the probability of selecting the participant to be rewarded depends on the participant’s stake of assets in the system. The bigger the stake, the higher the chance of reward. The minimum number of tokens needed for mining is 50000 WEST. BaseTarget is a parameter that maintains the block generation time within a given range. BaseTarget in its turn is calculated as:
R max = 90 - a maximum reduction of complexity when the block generation time in the network exceeds 40 seconds;
Rmin = 30 - a minimal increase of complexity when the block generation time in the network is less than 40 seconds;
S - the average generation time, at least for the last three blocks;
Tp - the previous baseTarget value;
Tb - the computed baseTarget value.
For an advanced description of technical features and enhancements of the classic PoS algorithm, see this article.
Advantages Over Proof of Work¶
The absence of complex calculations allows PoS networks to lower the hardware requirements for system participants, which reduces the cost of deploying private networks. No additional emission is required, which in PoW systems is used for rewarding miners for finding a new block. In PoS systems, a miner receives a reward in the form of fees for transactions which appeared in its block.
Leased Proof of Stake¶
A user who has an insufficient stake for effective mining may transfer his balance for lease to another participant and receive a portion of the income from mining. Leasing is a completely safe operation, as tokens do not leave the user’s wallet, but are delegated to another miner, which gives the miner a greater opportunity to earn mining rewards.