Lisk Staking Process

This blog post explains the Lisk block generation mechanism and more specifically, the staking process.

By Lisk

15 May 2023

Post content head

In the Lisk blockchain, blocks are generated every 10 seconds by validators. Every account on the blockchain can register to become a validator, but only the ones with the highest validator weight get to generate blocks. The validator weight is computed according to the different stakes cast for the validator.

Please note that this blog post covers the staking process for the current Lisk Betanet. Lisk Testnet and Lisk Mainnet are utilizing Lisk Core v3, and therefore still follow this guide. We will update this guide as network upgrades occur.

image3.png

In order to support the Lisk network, a user can either be a validator or decide to contribute by staking for already existing validators. The Lisk staking system was described in detail in a previous blog post. In this blog post, we firstly focus on describing how the Lisk wallet can be used for staking, and then give a summary of the staking system and the relevant implications for stakers.

Staking with the Lisk Wallet

Staking in the Lisk wallet is easy and straightforward, so let's start by describing how it's done. We are currently creating a video guide for this process. In the meantime, you can view the video for Lisk Core v3, How to Vote in Lisk Desktop v2.0.0, which has a very similar approach and user interface.

  1. Login into your account in the Lisk wallet.
  2. Navigate to the profile page of the validator you want to stake for. This can be achieved by the following:
    • Using the search bar to search for a validator, by name or by address.
    • From the validator page, browse and click on the chosen validator.
    • Click the "Stake validator" button on the validator profile page.
    • Enter the amount of LSK you want to use to stake for this validator → The stake is then added to your staking queue.
    • You can repeat steps 2 to 4 to add other stakes to your staking queue.
    • Verify your staking queue and confirm it → The stakes are sent to the network.

This process will submit your stakes to the network and will then be visible in your validators tab. It is then possible to view and access the information listed below:

  • The "stakes" page shows a summary of your claim rewards, current stakes, and unlock stakes.
  • By clicking on the pencil icon it is possible to edit any existing stakes, such as adding or removing staked LSK.
  • By clicking on the padlock icon, it is possible to view your locked LSK and the tokens that can be unlocked.

Lisk’s PoS

Staking Mechanism

The LIP Introduce stake locking periods and new stake weight definition introduces the staking system used in the Lisk blockchain. This staking system enables users to choose exactly how much LSK they want to use for staking and which validators those stakes target. Once a stake is cast, it remains valid until the user sends another stake transaction to remove the stakes. The stakes are aggregated and used to compute the validator weight, which in turn is used to assign blocks to validators. In general, a validator with more stakes is more likely to generate blocks.

Locked Tokens

The tokens used for staking are locked, which means that they still belong to the user but they cannot be used for transactions. The funds are locked for as long as the user is staking using these tokens. In order to be able to unlock them, the user should first remove them from the stakes, and wait for 6 hours. Only then, unlocking the tokens will move them back to the “available balance”.

image2.png Figure 1: The Lisk wallet displays both the available and locked tokens.

image (1).png Figure 2: When clicking on the padlock icon, it is possible to view how the locked tokens are split up. Clicking the "Unlock" button will unlock the 750 LSK that are available to unlock, (as shown in the example illustrated above).

Unlocking Tokens and Waiting Periods

In general, 6 hours after removing stakes from a validator, the tokens are available for unlocking. This action is available in the Lisk wallet and can be executed at any time after the waiting period has elapsed. However, in some cases the waiting time is extended.

For example, this is the case for validators that stake for themselves, and the waiting time here is roughly 30 days. Furthermore, if the validator misbehaves and is punished on chain, the locking time of all tokens staking for this validator is extended. If the validator that the user is staking for is punished, the user’s tokens will be locked for 30 days and the self-staking tokens of the validator will be locked for 90 days.

image4.png

Validator Weight

The validator weight is used in the selection mechanism to decide if a validator can forge a block in the coming round or not. A validator with a high weight is more likely to generate a block than a validator with a low weight.

In each round, 101 blocks are generated by the 101 validators with the highest validator weight. This means that all validators in the top 101 list will forge one block every round, regardless of their respective validator weight. It could be that the validator with the most weight has three times more weight than the validator in the 100th position, nevertheless, they will forge the same number of blocks.

In each round, 2 blocks are also assigned to validators outside the top 101 list, which are known as standby validators. For those two blocks, the validators selected to generate them are chosen randomly, proportional to their validator weights. The details of this selection mechanism are available in LIP 22. For example, the total amount of weight for standby validators is currently 652,000 LSK, and this implies that a validator with a weight of 10,000 LSK would forge on average 76 blocks per month.

image5.png

Punishments and Proof of Misbehavior

Generating blocks is an important responsibility. Lisk BFT, specified in LIP 14, defines a set of rules that must be followed by validators in order to guarantee that the blockchain progresses correctly, and that all Lisk nodes eventually agree on the same blocks. To enforce those rules, the Lisk protocol contains a punishment mechanism for validators that have created contradicting blocks.

The definition of contradicting blocks is outside the scope of this blog post and can be found in LIP 14. However, it should be noted that the consequences of being punished apply to the validator who generated the contradicting blocks, and to all the tokens currently staking for this validator.

In essence, this means that if a validator that a user stakes for is punished, the user’s tokens will be locked for an extended period of approximately one month. To avoid having your LSK locked, it is recommended to stake for reputable validators and consider staking for multiple validators to lower the risks of all your LSK being locked at the same time.

Benefits of Staking

The first and most important reason is "securing the network". Indeed, if there are only a few stakes, then this means that it is easier for an attacker to control multiple active validators. Whereas if the total number of stakes is high, then it will be difficult and costly for an attacker to gain a forging slot. This is similar to the total hash power of a network in proof-of-work chains. So staking for experienced and responsible validators improves the overall security of the network.

Secondly, validators receive block rewards when they generate a block. Validators may choose to share these rewards with their stakers. You can view how much commission each validator keeps for themselves on the Validator page.

Risks

As stated above, all tokens used for staking are locked, therefore making those tokens available again will take at least 6 hours. Furthermore, if the validator you stake for is punished, the stakers will face part of the punishment as well. This punishment represents a security feature of the network.

As a consequence of the punishment, users who staked for the punished validator will see their locking period for this stake increased to 30 days. It is important to know that if something goes wrong, your tokens could be locked for 30 days. The funds are not lost, they are still in the same account, however, they cannot be used for any transaction during this 30 day period.