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¶

The mechanism for delegating of rights for block generation is based on the number of tokens in the user’s account. The more tokens a user has, the more likely this user will be able to generate a block.

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 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 X_{n} 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:

where:

b

_{i}- a balance stake of a participant in comparison with the network total balance;A

_{n}- baseTarget, the adaptive ratio regulating the average time of issue of the block;X

_{n}- a pointer to a next miner;T

_{min}- a constant value defining a time interval between blocks (**5 seconds**);C

_{1}- a constant value correcting a form of interval allocation between blocks (**70**);C

_{2}- a constant value that is, by default, equal to the BaseTarget (**5E17**) and serving 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 in its turn is calculated as:

where

R

_{max}- maximal decrease of complexity that is engaged when block generation time exceeds 40 seconds (**90**);R

_{min}- minimal increase of complexity that is engaged when block generation time is less than 40 seconds (**30**);S - average time of generation of at least three last blocks;

T

_{p}- a previous baseTarget value;T

_{b}- 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 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.