Technical description of the platform

LPoS consensus algorithm

The PoS (Proof of Stake) consensus algorithm is based on proofing of an address token share, the LPoS (Leased Proof of Stake) also includes an opportunity to lease tokens. With these algorithms, generation of a block does not need energy consuming calculations, a miner should create a digital signature of a block.

Proof of Stake

In the Proof of Stake consensus algorithm, the right to generate a block is determined in a pseudo-random way: a next miner is identified on the basis of previous miner data and balances of all network users. This is possible due to a deterministic computation of a block’s generating signature, which can be obtained by SHA256 hashing of the current block’s generating signature and the account’s public key. The first 8 bytes of the resulting hash are converted to a hit digit Xn of an account, this digit will be a pointer to the following miner. The time of block generation for an i account is calculated as:

\[T_i = T_{min} + C_1 \log (1 - C_2 \frac{\log \frac{X_n}{X_{max}}}{b_i A_n})\]

where:

  • bi – a balance stake of a participant in comparison with the network total balance;

  • An – baseTarget, the adaptive ratio regulating the average time of issue of the block;

  • Xn – a pointer to the next miner;

  • Tmin – a constant value defining a minimum time interval between blocks (5 seconds);

  • C1 – a constant value correcting the form of interval allocation between blocks (70);

  • C2 – a constant value that is equal to the BaseTarget (5E17) by default and intended for its correction.

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 is calculated as follows:

\[(S > R_{max} \rightarrow T_b = T_{p} + max(1, \frac{T_p}{100})) \wedge (S < R_{min} \land \land T_{b} > 1 \rightarrow T_b = T_p - max(1, \frac{T_p}{100}))\]

where

  • R max – maximal decrease of complexity that is engaged when block generation time exceeds 40 seconds (90);

  • Rmin – minimal increase of complexity that is engaged when block generation time is less than 40 seconds (30);

  • S – the average time of generation of at least three last blocks;

  • Tp – the previous baseTarget value;

  • Tb – a calculated baseTarget value.

A detailed description of the technical characteristics and developments of the classical PoS algorithm for the Waves Enterprise blockchain platform is stated in this article.

Advantages over the Proof of Work (PoW)

The absence of complex calculations allows PoS networks to lower the hardware requirements for the system participants, which reduces the cost of deploying private networks. No additional emission is required, which in PoW systems is used to reward miners for finding a new block. In PoS systems, a miner receives a reward in the form of fees for transactions which appeared in the miner’s 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.

See also