Original title: "How to Calculate the Staking Income of Boca?"
Originally written by PolkaWorld
PolkaWorld community
If you want to know how many awards your DOT gets nominated for, it's right here on the page & NBSP;https://polkadot.js.org/apps/#/staking/targets& have spent Enter your DOT count and view the revenue for each of the nominated validators.

If you want to learn more about boca's interesting Staking design, start reading below.
Staking
Polkadot USES NPoS (Nominating interest proof mechanism) as the mechanism for selecting the verifier node pool. It has designed the roles of verifier and nominee to maximize chain security. Participants interested in maintaining the network can run the validator node. At Genesis, Polkadot will provide a limited number of slots for these verifiers, but this number will increase to over 1000 over time.
This mechanism encourages DOT holders to participate as nominees. The nominee may support up to 16 verifiers as credible candidates.
The verifier has the role of generating new blocks, verifying parallel chain blocks, and ensuring finality in BABE. Nominees can choose to use their stake to support the chosen validator.
The Staking system gives equal rewards to all verifiers. After deducting the verifier's own portion, the award will be distributed pro rata to all nominees. In this way, the network encourages people to nominate validators with low stakes, so as to create a validator node pool with equal stakes.
How is Staking done in Polkadot?
Define your role
In Staking, you can be the nominee or the verifier.
As a nominee, you may nominate one or more (up to 16) trusted candidates to help you win the DOT Award. You can check out the nominee guide here to see what needs to be done when the main network launches. Soft Launch Stage Tutorial for New Boca Nominees
Verify people nodes need to be online by 7*24, perform your duties in a timely manner, and avoid any penalties with Slash. If you want to run a validator in Kusama, look at NBSP; Kusama's validator's guide.
2. Nomination stage
Any node of interest to the verifier can indicate their intention to be a candidate for verifier. Their candidacy is open to all nominees, who in turn submit a list of endorsed candidates (there is no limit to the number of candidates). In the next epoch (lasting a few hours), a certain number of validators with the most DOT support were selected and activated. We have no requirements for DOT holders to be nominees, but we expect each nominee to be able to carefully track the person's performance and credibility.
Once the nominating phase is over, the NPoS election mechanism outputs a limited set of verifiers with the input of the nominee and his associated votes to maximize the support of any verifier and to distribute the support of the verifier as evenly as possible. The goal of such an election mechanism is to maximize network security and fair representation of the nominee. If you want to learn more about how NPoS works (such as elections, runtime complexity, etc.), please read here.http://research.web3.foundation/en/latest/polkadot/NPoS.html
3. Allocation of Staking rewards
To explain how rewards are assigned to validators and nominees, we need to consider the validator pool, which consists of selected validators and nominees who support it. Note: If a nominee N USES S votes to support K validators, the NPoS election mechanism divides it into S_1, s_2,... , s_k, that is, it supports validator I with s_i stake. In this case, the reward to nominee N is the same as it would be if each nominee supported one verifier I with s_i in another verifier pool with K nominees. For each validator pool, we keep a list of nominees with the relevant stakes.
The general rule for validating pool rewards is that two validating pools get the same number of DOT for the same job, that is, they are not paid in proportion to the stake in each validating pool. In the validator pool, part of the incentive (which can be set) is used to pay the validator's commission, and the rest is paid to the nominee and validator in proportion to stake. Please note that the verifier will be awarded twice: once as a commission for verification and once as a commission for nominating himself as a self-collateral.
To estimate the rate of inflation and how much DOT you can get each month as a nominee or verifier, you can use this Excel sheet as a reference (https://docs.google.com/spreadsheets/d/1-9Hc3kZ23EhZC3X6feRUKSTv6gj4xR7cvUbJD2zUEZk/edit? Usp = sharing) and better estimate the rate of inflation by changing some parameters (such as verifying pool of people, total supply, commission, etc.). Although this may not be entirely accurate, since Staking participation is dynamic, it can serve as a rough estimate.
4. Incentives
We emphasize two features of this payment scheme. First, because the rewards of the validator pool are the same, each of their DOT gets more awards from the pool of fewer stakes than from the pool of more stakes for the nominee. So we get enough credit for giving economic incentives to nominees to gradually shift their preferences to lower stakes. The reason for doing this is that we want the stake in the validation pool to be as evenly distributed as possible to avoid having large validators. In the long run, we want to have roughly the same number of validators in all of them, and stake is high for validators with high credibility, but at the same time, nominees who are willing to take more risk by supporting validators with low credibility are paid more.
The following example explains the problem above. For simplicity, we assume the following:
- These verifiers did not self-mortgage
-They don't charge any commission
- The award amount is 100 DOT tokens
- The minimum number of DOT to become a verifier is 350

Each of the two verifiers, A and B, has 4 nominees, and the total stake number is 600 DOT and 400 DOT, respectively.
Based on the above award allocation, the nominee in Validation pool B receives more awards than the nominee in Validation pool A because validation pool A has more total pledges. Sam pledged 50 DOT in pool A, but he only received 8.3 DOT in return, while Kitty received 12.5 DOT in Pool B for the same amount.
It is also important to note that slash has a fixed percentage (instead of a fixed number of DOT) when the network validates because of an error (e.g., verifier dropped offline, duplicate signature, etc.), which means that the verifier pool with more stake will be punished with more DOT. Again, the goal here is to give the nominees an economic incentive to change their preferences and support validators they deem worthy of trust but who have a low stake in favorability.
The second thing to note is that each verifier candidate is free to set a desired commission (in the form of a percentage) to cover operating costs. Since the validation pool returns are the same, the lower commission pool pays more to the nominee than the higher commission pool. Therefore, each verifier can choose to increase their commission to earn more DOT, or reduce their commission to attract more nominees and increase their chances of being elected. We need to let the market regulate itself in this regard. In the long run, we want all validators to be cost effective and competitive, and reputable validators to be able to charge a slightly higher commission (which is fair).
account
Here are two different accounts that manage the money: Stash And & have spent The Controller.

Stash: & have spent This account stores funds for binding DOTs participation collateral, but delegates certain functions to the Controller. So using Controller can be an active participant, which keeps the Stash key in the cold wallet, which means it stays offline forever. You can also specify proxy accounts to vote on governance proposals.
Controller This account is responsible for issuing nominations and validations on behalf of the Stash account. It is used to set rewards to be sent to that account and commission. If you are the validator, it is also used as a setting & NBSP; The session key, and only enough money is needed to cover the transaction costs.
We designed this hierarchy to separate key types to better protect verifiers and nominees than a single key system. Often one key is used for more than one role, and even using one associated with key export loses security. You should not use any account key as a "hot" Session key.
The Controller and Stash account keys can be SR25519 or ED25519. For more information on how to use the key in Polkadot and the encryption behind it, see here.https://wiki.polkadot.network/docs/en/learn-keys
Verifier and Nominee
Since the validator slot is limited, most people want to pledge their DOT and contribute economic security to the network that will be the nominee. The verifiers do most of the heavy lifting: they generate new candidate blocks in BABE, vote and agree in GRANDPA, verify the parallel chain's state transition capabilities, and perhaps some other responsibilities with regard to data availability and XCMP. Nominees, on the other hand, don't have to do anything once they've bound their DOT. The nominee's experience is similar to "set it up and leave it alone," while the verifier will actively serve the network by performing critical operations. Therefore, they had certain privileges for The mechanism of Staking and payout, and would be able to set their award ratio before giving their shares to subscribers.

Want to pledge DOTs?
Soft Launch Stage Tutorial for New Boca Nominees
Latest Tutorial: How to Set up A Poka Validator Node
Slashing punishment
Slash penalties occur if the verifier behaves improperly on the network (such as going offline, attacking the network, or running modified software). They and their nominee will lose a part of DOT over slash penalties.
A pool with a larger total pledge will be subject to a harsher Slash penalty than a less popular pool, so nominees are encouraged to move their nominations to less popular pools to minimize possible damage.
Poca defines the following levels of bad behavior:
Level 1: No response for a single shot, i.e. offline for a long time. There is no Slash penalty, only freezing.
Level 2: Concurrent non-responsive or single-issued duplicate signatures. Slash a small part of the DOT is pledged and frozen.
Level 3: Most likely due to non-accidental misconduct, but will not greatly damage the network security. Examples include simultaneous duplication of signatures or in NBSP; GRANDPA [3] & have spent Individual cases of unreasonable voting appeared above. Slash a small amount of pledged DOT and freeze.
Level 4: Misconduct or large-scale collusion that poses a serious security or currency risk to the system. Slash all or most of the values behind the verifier are frozen.
Let's look at these violations in more detail.
No response
For each session session, the validator sends an "I'm online" message indicating that they are online. If the verifier failed to generate a block during an epoch and failed to send a heartbeat, it would be reported as unresponsive. Slash penalties will occur depending on repeated violations and how many other validators fail to respond or go offline.
The calculation formula is as follows:
Let x = Federal, n = Total no. Validators
Min (3 times (x - (n / 10 + 1))/n, 1) * 0.07
Note that if less than 10% of the verifiers are offline, no penalty will be imposed.
The verifier should have a well-architected network infrastructure to ensure nodes are running smoothly and to reduce the risk of being punished with Slash. High availability Settings are desirable, it is best to set up backup nodes and start them only when the original node is verifiably offline (to avoid double and slash-see below), and proxy nodes [4] to avoid DDoS attacks if the IP address of the verification node is exposed. Here is a comprehensive guide to security verifier Settings. [5]
GRANDPA repeat signature
The verifier signs two or more ballots on different chains in the same round.
BABE repeats his signature
The verifier generates two or more blocks on the relay chain at the same time.
The penalties for GRANDPA and BABE to repeat their signatures are slash:
Let x = Federal, n = Total no. Validators
Min of 3 times x over n squared, 1.
Validators can run their nodes on multiple machines to ensure that they can still perform validation if one of the nodes fails. It should be noted that duplicate signatures are possible if they are not well coordinated to manage the signer.
If the verifier is reported for any violation, they will be removed from the verifier node pool (that is, frozen) and will not be paid when they are removed. They will immediately be considered inactive validators and will lose the nominee. They need to reissue verification intent and gather support for the nominee.
If you want to know more about slash, see our research page.https://research.web3.foundation/en/latest/polkadot/slashing/amounts.html
Chilling freezing
Freezing removes the behavior of validators from the active validator node pool and disqualifies them from the alternative candidate List in the next NPoS cycle.
Freezing can be voluntary and is at the verifier's discretion, for example, if the verifier's environment or server provider has a planned outage and the verifier wishes to exit to protect itself from Slash. When voluntary actions occur, then freezing keeps the validators active in the current session, but moves them to the inactive set in the next session. Validators do not lose their nominees.
Being frozen means not being nominated when used as part of a punishment. It also loses the ability to authenticate for the current remaining ERA and removes the offending verifier at the next election.
Polkadot allows some validators to be disabled, but if the number of disabled validators is too large, Polkadot will trigger a new validator election to get the full validator node pool. Disabled verifiers need to resubmit their verification intent and regain support from the nominee.
Slash punishment across the Era
There are three difficulties in calculating the Slash penalty in NPoS:
A nominee can nominate multiple verifiers and slash through any one of them.
These stakes are used repeatedly from era to ERA before being slash. Just because you have N tokens in a row with E era doesn't mean you have N*E tokens in slash, you still have N tokens.
Punishable infractions can also be discovered after they have occurred, and not in any order.
In order to balance the above points, we only penalize the maximum punishment a participant can receive within a certain period of time, not the total of all punishments. This prevents excessive slash. Also, the time span for computing the maximum Slash is limited and the verifier was frozen and withdrawn after the Slash event, as described in the previous section. This prevents rage-quit attacks, in which intentional misconduct is exacerbated by the fact that the participants have maximized their slash rates anyway.
Distribution of rewards
Note that Kusama runs about four times as fast as Polkadot, except for block time. Polkadot also blocks out at intervals of about 6 seconds.
A reward is recorded per session (approximately 1 hour on Kusama and 4 hours on Poka), and is calculated per ERA (approximately 6 hours on Kusama and 24 hours on Poka). Therefore, the Kusama reward is calculated four times a day, and the Boka reward is calculated once a day.
In order to get your Staking award, someone must collect it for each person you nominate for verification. The Staking reward is valid for 84 era, about 84 days on Boca and about 21 days on Kusama. For more information about why, see the simple Payouts [6] page.
"Note: If no one is claiming your staking award at this time, you will not be able to claim and part of your Staking award will be lost."
Get the rewards
If you go into Polkadot JS (https://polkadot.js.org/apps/#/staking/payout) of the Staking Payment page, you will see a list of the verifiers you have nominated in the past 84 ERA. Every person can choose to trigger all unclaimed ERA of Payout. Note that this will be paid to each verifier nominated in that ERA and anyone can call it.
Examples of reward allocation
PER_ERA * BLOCK_TIME = **Reward Distribution Time**
3600 * 6 seconds = 21,600 s = 6 hours
***These parameters can be changed by owning a referendum***
The verifier may create a portion of the award that is not Shared with the nominee. This section is calculated by the percentage of the block reward, not the absolute value. After deducting this value, the rest is divided between the validator and all the nominees who vote for it, based on the value of their stake.
For example, suppose the validator's block reward is 10 DOT. The verifier can set the verifier's commission to be 50%, in which case the verifier will receive 5 DOT. The remaining five dots are divided between the validators and their nominees, according to the proportion of stake that each nominee has. Note that the verifier may set its own self-mortgage, and for this part of the calculation, their self-mortgage may be considered another nominee.
Rewards can be assigned directly to the same account (Controller) or stash account (increased pledge value or not increased pledge value). You can also recharge/extract some bound DOT without canceling all stakes.
For more information about validator Payouts, see this guide. [7]
inflation
The inflation rate is designed to be 10% in the first year, and the stakes are set to be a function of the number of people, with the rest being put into the Treasury.

Source: & have spent Research - Web3 Foundation [8]
X axis: the proportion of DOT in Stake & NBSP;
Y-axis: inflation rate, annualized percentage
The blue line: A pledger's inflation reward
The green line: the mortgagor's rate of return
The graph above shows the inflation model of the Boca Net. According to staking participation, the ratio of inflation between the verifier and the Treasury will change dynamically to provide an incentive to participate (or not participate) in Staking. For example, if 50% of all KSM/DOT were pledged, all inflation would flow to the verifier, but any deviation from 50% (positive or negative) corresponding remainder would be sent to the Treasury, effectively reducing the verifier's payouts.
For more on the inflation model design for the web, see here.https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html
Why pledge?
Since the Internet started, inflation has been running at 10 per cent a year
50% of the target staking amount
About 20% annualized return
Why not pledge it?
After the token is unbound, it needs to be locked for 28 days on the boka and 7 days on Kusama
If the verifier is found to have misbehaved, he will be punished
You want to use tokens for parallel chain slots
How many verifiers are there in Boca?
The plan is to start with about 50 to 100 open verifiers and gradually open them up. An upper limit on the number of validators has not yet been determined, but is limited only by the network bandwidth strain caused by frequent and large point-to-point messaging. Polkadot will have about 1,000 validators when the network matters. And Kusama, Boca's canary network, currently has more than 400 verifier slots.
Refer to the link
[1] the session keys: https://wiki.polkadot.network/docs/en/learn-keys#session-keys
[2] freeze: https://wiki.polkadot.network/docs/en/learn-staking#chilling
[3] GRANDPA: https://wiki.polkadot.network/docs/en/learn-consensus
[4] HTTP: / / https://wiki.polkadot.network/docs/en/maintain-guides-how-to-setup-sentry-node: https://wiki.polkadot.network/docs/en/maintain-guides-how-to-setup-sentry-node
[5] HTTP: / / https://wiki.polkadot.network/docs/en/maintain-guides-secure-validator: https://wiki.polkadot.network/docs/en/maintain-guides-secure-validator
[6] simple payouts: https://wiki.polkadot.network/docs/en/learn-simple-payouts
[7] HTTP: / / https://wiki.polkadot.network/docs/en/maintain-guides-validator-payout: https://wiki.polkadot.network/docs/en/maintain-guides-validator-payout
[8] Research - Web3 Foundation: https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html
[9] Secure the validator setup: https://wiki.polkadot.network/docs/en/maintain-guides-secure-validator
Text link:https://mp.weixin.qq.com
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia