Aleph Zero Blog
Business

How to Navigate the Aleph Zero Staking Menu

Apr 7, 2022

Staking has been launched on the Aleph Zero testnet, and you may have some questions on how to navigate the menu. Read on for a thorough explanation of how the staking mechanism currently works. 

Note that until the next update, there will be no community validators on our network, hence some things are going to be a bit different than in the target solution:

  • As there is no alternative but to nominate validators controlled by the Foundation, they will take 0% commission,
  • As the elections system is not online yet, the economics of nominations will operate a bit differently, namely, it is more profitable to nominate validators that have fewer nominations (details can be found later on in the article). This will change with the next update.

Once you get through the article, you will have a firm grasp of the entire menu and current staking mechanism. We hope that it will completely demystify the process and make it easy for all of you to carry out operations through the interface. 

Staking Menu Guide

First of all, let’s explain the menu. Most of the functionalities can be interacted with by accessing Staking through the Network tab.

Aleph Zero Staking Menu

Once you click Staking, you will notice a tab called Overview to the left. Clicking this tab will give you a high-level overview of the following aspects of the staking mechanism. 

  • number of validators elected in the current era/total number of validators,
  • number of validators waiting to be elected in the next era,
  • number of active nominators in Era/number of nominators waiting for an era to start,
  • validators’ commission,
  • which session we’re in,
  • current era number,
  • list of current validators with their points gained for block production (currently 20 points for each produced block). Note that at least until the next update the number of points for each era would be likely different for some validators, albeit not significant for 1-day eras.
  • ideal staked is always 50% – it is a recommended ratio in the Substrate ecosystem, although in Aleph Zero having a different staking ratio doesn’t have economic consequences,
  • staked is the sum of total staked funds by validators and nominators divided by total issuance,
  • inflation is 30 mln divided by the total allocation (expected to be 10% on testnet/mainnet).
Aleph Zero Staking Overview

The next crucial element to go over is the “Account actions” view. Accessing this view will allow you to validate, and nominate, via UI.  There are two important concepts one needs to understand before starting to nominate on Aleph Zero:

Stash account: is an address that is used to keep the funds, it is used infrequently. You can think about it as your “cold wallet.”

Controller account: it does not keep funds, and is frequently used. Specifically, it is used to perform actions (such as nominating a validator) on behalf of the stash but can’t transfer the funds from the stash.

Aleph Zero Account Actions

How to Stake Your $TZERO Tokens

To begin staking you must acquire some testnet tokens from the Aleph Zero Faucet. The funds will be sent to your testnet wallet. After you receive your tokens, you can proceed to stake them through the “Account Actions” view. On the right, you will see the words Nominator, Validator, and Stash, each of these words will be accompanied by a plus sign. To stake, your tokens click Nominator. This will initiate a pop-up window. On the first screen, you will choose your Stash Account, Controller Account, and the number of tokens you wish to bond. Once you submit your answers, you will proceed to the next screen in which you will choose your Validator. And finally, the last view of the pop-up will ask you to authorize the transaction with your password. Voila, you have just staked your first tokens! 

Payouts

Allow me to introduce the  Payouts tab. The Payouts tab is shown only when you raised intent to be a validator or nominator already. You can request rewards via the UI – internally, this is done via calling extrinsic payoutStakers. Rewards can be claimed for each era independently. 

Aleph Zero Payouts

Next up, we have the Targets tab. It shows similar info to the Overview tab, and by browsing it, you will find out:

  • the sum of each validator and nominators stakes,
  • that the part marked Returns describes the yearly returns from all staked money, i.e., it is calculated as inflation / staked_fraction,
  • a comparison of the lowest to average stake proportions,
  • the total validator and nominator rewards from the previous era ( minus 10% costs which go to the Treasury). 
Aleph Zero Targets

Waiting, Slashing, and Validator Stats 

We’ll now take a look at the last three elements of the Staking tab before we move on to the more technical aspects of the system. The Waiting tab presents information about the intentions of either soon-to-be validators or nominators. 

Aleph Zero Waiting Menu

One of the defense mechanisms to guard the Aleph Zero blockchain against malevolent agents involves a slashing mechanism that penalizes users financially for disrupting the workings of the network. The tab called Slashes is a way for you to check out which users have been behaving dishonestly and, as a consequence, had their funds slashed. There is no automatic slashing on Aleph Zero, every instance of slashing needs to be explicitly approved by the team (later to be replaced by decentralized governance) – it is to exclude the possibility of a validator being slashed for apparent misbehavior that occurred due to a software bug. 

Aleph Zero Slashes

The last tab we’ll look at is the Validator stats tab. It will reveal information on the following aspects of a validators operation:

  • what were the points received for block production in a given era vs. the average number of points till that era,
  • rewards received in a given era and average reward till that era,
  • input total stake for a given era,
  • validator commission in a given era.

By default, the stored history will go back only 84 eras. 

Aleph Zero Validator Stats

General Answers for General Questions 

What are Eras?

Payout periods are divided into eras that are 24 hours long: 96 sessions, each 15 minutes long.

In order to become a nominator or validator, currently one needs to wait for the next era to start. We are working on lowering this delay to one session, i.e., max 15 minutes. 

Payouts can be requested only after full-era completion up to the past 84 eras. What is also worth noting is the unbonding period – if one wants to get locked funds back after staking, then one needs to wait for 14 eras (days) to unlock the funds.

How are Rewards Calculated? 

Era rewards

In each era we split rewards accordingly:

  • 90% goes to nominators and validators,
  • 10% goes to the treasury.

Inflation

We use uniform era payout, meaning that in each era, we reward validators and nominators a constant amount of tokens, which is approx 73 921 tokens, calculated as 0.9 * 30 mln tokens divided by 365.25 – the average number of days in Julian year.

Rewards key takes

  • Validators and their nominator’s reward bucket are proportional to the validator’s uptime.
  • Validators and all their nominator’s reward bucket is currently not proportional to the validator’s stake. This is a temporary situation and will change after the next update. The consequence is that it is more profitable to nominate validators that currently have fewer nominations in total. 
  • Rewards assigned to a particular validator, are split among the validator itself and its nominators proportionally to their stake.

Example: The State of the Economy Before the Update Is Introduced

Let’s assume that there are ten validators, A_1,…,A_10, with a stake of 100000 AZERO each, additionally, there are 1M AZERO nominations in total, out of which 50000 AZERO is nominated for A_1. Additionally, Alice is one of A_1 nominators with a nominated stake of 1000 AZERO.

Then there is a total of 1M+10*100k=2M AZERO staked in total, out of which 150k is staked for A_1. 

As the rewards are not proportional to the stake, A_1 will get 10% of the total rewards, and the total yearly rewards for validators is 90%*30,000,000 = 27,000,000, hence after a month, it will accumulate to 27,000,000/12*10% = 225,000 AZERO. Out of this quota, Alice will get reward proportional to her stake, i.e., 225,000* (1,000/150,000) = 1,500 AZERO. Note that this is more than Alice would get if the rewards would be fully proportional to the validators’ stake (as intended after the update), as then it would be 27,000,000/12* (1,000/2,000,000) = 1125 AZERO.

Minimal validator stake

In order to become a validator, one needs to stake at least 25 000 AZEROs.

Minimal nominator stake

In order to become a nominator, one needs to stake at least 100 AZEROs.

Nominator count bounds

There’s no lower or upper bound for the number of nominators for a single validator.

The maximum number of paid nominators for a single validator is 1024 – only up to the 1024 biggest nominators are paid.

A nominator can nominate only a single validator at a time from a single account. 

Validator count bounds

There’s no upper bound number of validators.

There’s a lower bound threshold of 4 validators – validators won’t be elected in the next session if this number drops below 4.

Treasury

Staking sends the following fund types to the Treasury (10% of era reward):

  • unclaimed rewards,
  • slashed funds.

Final Takeaways 

Hopefully, after getting through this article, you have a fairly decent grasp of the testnet staking menu and how rewards are calculated. We want to thank everyone who is participating in this project of building the Aleph Zero decentralized community. Every individual who takes part and every completed transaction provides us with invaluable information on improving the system. With that being said, we can’t wait to bring staking to the mainnet. It’s only a matter of weeks, so keep an eye on our socials where we will announce the news!