Tezos ecosystem includes solid tools to monitor network performance and staking rewards. Block explorers represent a major part of the ecosystem transparency and health. Delegators and bakers often rely on such tools before making decisions such as, should I add to my self-bond or which baker to stake with. Diversity of these services provide users with unique experience and allow them to choose one that corresponds to a particular need.
Analytical explorers display two types of parameters. The first is derived right from the blockchain data and in most cases they are identical on different analytical tools. Values of these parameters can be slightly different on various explorers because of the network data update frequency. The second type of parameters is calculated using network variables and blockchain data.
It may lead to a confusion when the same variable has different values on multiple resources. It can be because of different approaches taken for calculation or using different timeframes. Currently, available staking capacity has different values for the same bakers on various analytical websites. It represents an amount of XTZ that can be staked with a particular baker without making him over-delegated. Delegated tokens above the limit will not contribute to the power of the baker.
Stats for P2P Validator on various analytical tools for 19.03.2020:
Tzstats.io: staking capacity = 14 048 492 XTZ resulting in available staking capacity = 1 971 806 XTZ.
MyTezosBaker: available staking capacity = 802 752 XTZ| staking capacity = 12 881 681 XTZ.
Tezos Nodes: available staking capacity = 2 007 769 XTZ resulting in staking capacity = 14 079 769 XTZ.
Baking Bad: available staking capacity = 1 972 000 XTZ resulting in staking capacity = 14 044 000 XTZ.
In some cases, the difference between the values above is significant and cannot be explained by fluctuations of baking rights and endorsements. Who is right?
The purpose of this post is to establish a single approach for available staking capacity calculation and eliminate errors and confusion for end users on various analytical resources. Below I share my understanding of the correct approach to calculate this parameter and invite everyone in Tezos community to join the discussion, express your point of view or suggest other ways of thinking about this parameter.
In order to create blocks baker should maintain a specific amount of self-bond that is used for security deposit required by the Tezos protocol and subjected to slashing as a measure against misbehavior. Security deposit per created block is equal to 512 XTZ and per endorsement is equal to 64 XTZ. When validator bakes block or endorses, these funds become frozen for a number of preserved cycles defined by the protocol and unfreeze at their end.
If we assume that 100% of total supply participate in staking we can calculate the minimum bond requirement for a baker: ((block_security_depo + endorsement_security_depo * endorsers_per_block) * blocks_per_cycle * (preserved_cycles+1)) / total_supply
Let's split this formula into parts:
Part 1: block_security_depo + endorsement_security_depo * endorsers_per_block
In this part we calculate the total amount of security deposit per block.
Part 2: blocks_per_cycle * (preserved_cycles+1)
By multiplying the total security deposit per block by the number of blocks in the cycle and frozen period plus one we get the total amount of XTZ that are frozen for preserved cycles.
Part 3: Part 1 * Part 2 / total_supply
Here we finally calculate the security deposit share of the total supply.
Let's crunch some numbers:
block_security_depo = 512 XTZ
endorsement_security_depo = 64 XTZ
endorsers_per_block = 32
blocks_per_cycle = 4096
preserved_cycles = 5
All these parameters are derived from a Tezos protocol and represent constant values until community decides to propose changes via governance procedure. The only dynamic parameter is total_supply
which is equal ~ 829,34 million XTZ (19.03.2020).
The actual self-bond requirement is floating as baking frequency and endorsement rights are changing but for this case we will not take possible baking deviations into consideration.
The whole calculation of minimum self-bond requirement if 100% tokens at stake look like: ((512 + 64 * 32) * 4096 * (5+1)) / 829 340 996 = 7,59%
.
With a decrease of total supply percentage at stake, minimum self-bond requirement will increase as overall share of frozen XTZ in a security deposit related to the participating tokens will be higher.
To calculate the exact self-bond requirement we can simply put the exact number of tokens at stake instead of total_supply
or divide the result of previous calculation, made for 100% staked tokens, by the actual percentage of staked XTZ. It will result in ~9,64% of actual self-bond requirement for a baker.
The only caveat here is that total_supply
is growing over time while security deposits remain the same. In the long run it will result in lower self-bond requirement as well as the network security.
After finding the exact self-bond requirement we can answer two questions:
1) Does a particular baker maintain sufficient self-bond?
2) How many XTZ a particular baker can accept before it becomes over-delegated?
To answer the first question we should find a self-bond share in the total staking balance.
staking_balance = self_bond + delegated_balance
self_bond / staking_balance * 100 = X%
.
If X > actual_self_bond_req
then baker has enough self-bond and won't miss baking or endorsement slots.
The answer to the second question is available staking capacity. To find this value we should substract staking balance from the maximum balance.
max_balance = self_bond / actual_self_bond_req
available_staking_capacity = max_balance - staking_balance
To make calculation of available capacity even more precise you can adjust self_bond
by frozen_fees
+ frozen_rewards
as they do not take part in security deposits and use actual rolls of a baker to get the actual staking_balance
.
Using formulas from above we get available staking capacity of P2P Validator ~ 1 997 663 XTZ
(19.03.2020).
Seems like Baking Bad, Tzstats and Tezos Nodes are quite aligned with the value and use similar approach for calculation of a baker free space.
Now you have all the necessary information to check by yourself if the self-bond is sufficient enough to bake and what is the available staking capacity of a baker. In addition, we have created a spreadsheet with prepared calculations for simplicity. We also improved a calculation for self-bond and staking balance of a baker to make available capacity value even more precise.
Special thanks to Baking Bad and StakeNow for paying attention to the article and facilitating valuable discussions.
P2P Validator provides secure non-custodial staking. Subscribe to our channels and stay tuned for updates and new blog posts.
Web: https://p2p.org
Stake XTZ with us: p2p.org/tezos
Twitter: @p2pvalidator
Telegram: https://t.me/p2pvalidator
Research & Analytics at p2p.org.
<p><em><em>Staking will be available after a successful launch of Kava blockchain on mainnet. To use this guide you should have an existing account with KAVA tokens and connection to the node.</em></em></p><p>Requirements:</p><ul><li>Go 1.13+</li><li>Make</li><li>Ubuntu 18.04</li></ul><p><strong><strong>1) First you have to download Make and Go</strong></strong></p><p><em><em>-Download Make and other packets:</em></em></p><p><code>sudo apt install build-essential</code></p><p><em><em>-Download Go:</em></em></p><p><code>wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz</code></p><p><code>sudo tar -C /usr/local -xzf go1.13.1.linux-amd64.tar.gz</code></p><p><code>mkdir -p ~/go/{bin,src,pkg}</code></p><p>For correct work of Go you will need to define environment variables</p><p>Execute following commands by rotation:</p><p><code>export PATH=$PATH:/usr/local/go/bin</code></p><p><code>export GOPATH=$HOME/go</code></p><p><code>export GOBIN=$GOPATH/bin</code></p><p><code>export PATH=$PATH:$GOBIN</code></p><p>For convenience add these strings to the current user profile. In Ubuntu it is: <code>~/.profile</code>. Execute <code>nano ~/.profile</code> and put strings from the previous step in the end of the file:</p><p><code>export PATH=$PATH:/usr/local/go/bin</code></p><p><code>export GOPATH=$HOME/go</code></p><p><code>export GOBIN=$GOPATH/bin</code></p><p><code>export PATH=$PATH:$GOBIN</code></p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/1-8.png" class="kg-image" alt loading="lazy" width="1254" height="678" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/1-8.png 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/1-8.png 1000w, https://p2p.org/economy/content/images/2020/09/1-8.png 1254w" sizes="(min-width: 720px) 720px"></figure><p>After that execute: <code>source ~/.profile</code></p><p><strong><strong>2) Build Kava:</strong></strong></p><p>Go to the folder <code>cd ~/go/src/</code></p><p>Execute:</p><p><code>git clone https://github.com/kava-labs/kava</code></p><p><code>cd kava</code></p><p><code>git checkout tags/v0.3.1</code></p><p><code>make install</code></p><p>If everything went as it should in the folder <code>~/go/bin</code> appeared <code>- kvd</code> and <code>- kvcli</code> packets</p><p><strong><strong>3) Delegate KAVA tokens</strong></strong></p><p><em><em>In the following instruction all commands were sent from a network node in testnet and <code>chain id</code> and <code>validator address</code> values on screenshots differ from the mainnet values. The actual values provided below.</em></em></p><p>To make actions further you should have:</p><ul><li>Kava account</li><li>Active node (if you don't have you can use our node)</li></ul><p>Make sure that account exists and has a positive balance:</p><p><code>kvcli keys list</code></p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/2-10.png" class="kg-image" alt loading="lazy" width="1259" height="535" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/2-10.png 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/2-10.png 1000w, https://p2p.org/economy/content/images/2020/09/2-10.png 1259w" sizes="(min-width: 720px) 720px"></figure><p><code>kvcli keys show <your_key_name></code></p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/3-9.png" class="kg-image" alt loading="lazy" width="1268" height="161" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/3-9.png 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/3-9.png 1000w, https://p2p.org/economy/content/images/2020/09/3-9.png 1268w" sizes="(min-width: 720px) 720px"></figure><p><code>kvcli query account <your_address> --chain-id kava-2</code></p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/4-6.png" class="kg-image" alt loading="lazy" width="1255" height="563" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/4-6.png 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/4-6.png 1000w, https://p2p.org/economy/content/images/2020/09/4-6.png 1255w" sizes="(min-width: 720px) 720px"></figure><p><em><em>For assistance with command parameters you can execute <code>kvcli tx staking delegate --help</code></em></em></p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/5-5.png" class="kg-image" alt loading="lazy" width="1257" height="688" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/5-5.png 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/5-5.png 1000w, https://p2p.org/economy/content/images/2020/09/5-5.png 1257w" sizes="(min-width: 720px) 720px"></figure><p><em><em>Important note</em></em>, delegation amount nominated in uKAVA. For instance, if you want to stake 100 KAVA you should enter 100000000 in the amount field. Read this chapter in full before choosing the command for your case.</p><p><em><em>P2P Validator address:</em></em> <strong><strong>kavavaloper12g40q2parn5z9ewh5xpltmayv6y0q3zs6ddmdg</strong></strong></p><p>Chain ID: <strong><strong>kava-2</strong></strong></p><p>If you have connection to the node, for delegation execute:</p><p><code>kvcli tx staking delegate kavavaloper12g40q2parn5z9ewh5xpltmayv6y0q3zs6ddmdg <amount of KAVA you want to stake>ukava --from <address> --chain-id kava-2</code></p><p>If you don't have connection to the node you can use ours. Execute:</p><p><code>kvcli tx staking delegate kavavaloper12g40q2parn5z9ewh5xpltmayv6y0q3zs6ddmdg <amount of KAVA you want to stake>ukava --from <address> --chain-id kava-2 --node tcp://95.216.184.50:26657</code></p><p>If you used ledger to generate keys add <code>--ledger</code> in the end of command. Execute:</p><p><code>kvcli tx staking delegate kavavaloper12g40q2parn5z9ewh5xpltmayv6y0q3zs6ddmdg <amount of KAVA you want to stake>ukava --from <address> --chain-id kava-2 --node tcp://95.216.184.50:26657 --ledger</code></p><p>Below is an example of the output you should get after successful delegation.</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/6-2.png" class="kg-image" alt loading="lazy" width="1294" height="556" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/6-2.png 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/6-2.png 1000w, https://p2p.org/economy/content/images/2020/09/6-2.png 1294w" sizes="(min-width: 720px) 720px"></figure><p>If you have any questions or different operational system contact us at p2p.org or schedule a personal call with our development team to guide you through the whole process.</p><hr><p><em><em>If you have any questions feel free to contact us. We are always open for communication.</em></em></p><hr><p><strong><strong>P2P Validator</strong></strong> offers high-quality staking facilities and provides up to date information for educational purposes. Stay tuned for updates and new blog posts.</p><p><strong><strong>Web:</strong></strong><a href="https://p2p.org/?ref=p2p.org"> https://p2p.org</a></p><p><strong><strong>Stake KAVA with us:</strong></strong> <a href="https://p2p.org/kava?ref=p2p.org">https://p2p.org/kava</a></p><p><strong><strong>Twitter:</strong></strong><a href="https://twitter.com/p2pvalidator?ref=p2p.org"> @p2pvalidator</a></p><p><strong><strong>Telegram:</strong></strong><a href="https://t.me/kava_p2p?ref=p2p.org">https://t.me/kava_p2p</a></p>
from p2p validator
<p><em><em>To participate in Cyberway economy you need to purchase CYBER tokens on kuna.io exchange. To become a delegator you can stake using <a href="https://cyberway.gitbook.io/en/validators/stake_usage_guide?ref=p2p.org">cleos</a> or transfer tokens to your golos.io account and delegate from there.</em></em></p><p><strong><strong>Create an account on golos.io</strong></strong></p><p>Visit golos.io web page</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/1-9.PNG" class="kg-image" alt loading="lazy" width="1600" height="369" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/1-9.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/1-9.PNG 1000w, https://p2p.org/economy/content/images/2020/09/1-9.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>Press <code>sign up</code> and complete all the required fields</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/2-11.png" class="kg-image" alt loading="lazy" width="400" height="480"></figure><p>After filling in the verification code you will get a pdf file with all the information related to your account. Save it in a secure place.</p><p><strong><strong>Send CYBER tokens to your account</strong></strong></p><p>Press <code>three-dot</code> button on the top right side of the screen</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/3-10.PNG" class="kg-image" alt loading="lazy" width="1600" height="369" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/3-10.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/3-10.PNG 1000w, https://p2p.org/economy/content/images/2020/09/3-10.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>Choose a <code>setting</code> tab</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/4-7.png" class="kg-image" alt loading="lazy" width="1600" height="498" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/4-7.png 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/4-7.png 1000w, https://p2p.org/economy/content/images/2020/09/4-7.png 1600w" sizes="(min-width: 720px) 720px"></figure><p>Here navigate to the <code>account</code> button</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/5-6.PNG" class="kg-image" alt loading="lazy" width="1600" height="575" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/5-6.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/5-6.PNG 1000w, https://p2p.org/economy/content/images/2020/09/5-6.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>Here you will see your user ID. It is also written down in a PDF file that you will have received after registration. Put this address as a destination point for sending CYBER tokens from an exchange</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/6-3.PNG" class="kg-image" alt loading="lazy" width="1600" height="578" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/6-3.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/6-3.PNG 1000w, https://p2p.org/economy/content/images/2020/09/6-3.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>You will be able to check your balance in a wallet tab, see if a transaction was successful and funds have been received</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/7-2.PNG" class="kg-image" alt loading="lazy" width="1600" height="547" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/7-2.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/7-2.PNG 1000w, https://p2p.org/economy/content/images/2020/09/7-2.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p><strong><strong>Delegate CYBER tokens to a validator</strong></strong></p><p>To delegate your stake to a validator you will need to convert your CYBER into a STAKE CYBER. Press <code>convert</code>.</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/8-2.PNG" class="kg-image" alt loading="lazy" width="1600" height="491" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/8-2.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/8-2.PNG 1000w, https://p2p.org/economy/content/images/2020/09/8-2.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>You will see a conversion window where you should select CYBER</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/9-2.png" class="kg-image" alt loading="lazy" width="500" height="464"></figure><p>Fill the desired amount to bond and press <code>convert</code></p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/10-1.png" class="kg-image" alt loading="lazy" width="500" height="357"></figure><p>After that you will see the converted amount of tokens in your wallet.</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/11-1.PNG" class="kg-image" alt loading="lazy" width="1600" height="543" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/11-1.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/11-1.PNG 1000w, https://p2p.org/economy/content/images/2020/09/11-1.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>Now you can choose a validator. Press <code>three-dot</code> button on the top right side of the screen and go to the <code>validators</code> tab.</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/12-1.PNG" class="kg-image" alt loading="lazy" width="1600" height="498" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/12-1.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/12-1.PNG 1000w, https://p2p.org/economy/content/images/2020/09/12-1.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>On the list find <code>@creator</code> and press the upward arrow beside the name (in the same row)</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/13-1.PNG" class="kg-image" alt loading="lazy" width="1600" height="548" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/13-1.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/13-1.PNG 1000w, https://p2p.org/economy/content/images/2020/09/13-1.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>In a dialog window fill the amount of tokens you wish to delegate and press <code>transfer</code></p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/14.PNG" class="kg-image" alt loading="lazy" width="914" height="518" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/14.PNG 600w, https://p2p.org/economy/content/images/2020/09/14.PNG 914w" sizes="(min-width: 720px) 720px"></figure><p>You will see the delegated amount beside the name of your chosen validator</p><figure class="kg-card kg-image-card"><img src="https://p2p.org/economy/content/images/2020/09/15.PNG" class="kg-image" alt loading="lazy" width="1600" height="555" srcset="https://p2p.org/economy/content/images/size/w600/2020/09/15.PNG 600w, https://p2p.org/economy/content/images/size/w1000/2020/09/15.PNG 1000w, https://p2p.org/economy/content/images/2020/09/15.PNG 1600w" sizes="(min-width: 720px) 720px"></figure><p>Congratulations! You have finished the delegation process. You will receive your staking reward each <code>3499 blocks</code> (~3 hours).</p><hr><p><em><em>If you have any questions feel free to contact our team. We are always open for communication.</em></em></p><hr><p><strong><strong>P2P Validator</strong></strong> offers high-quality staking facilities and provides up to date information for educational purposes. Stay tuned for updates and new blog posts.</p><p><strong><strong>Web:</strong></strong><a href="https://p2p.org/?ref=p2p.org"> https://p2p.org</a></p><p><strong><strong>Twitter:</strong></strong><a href="https://twitter.com/p2pvalidator?ref=p2p.org"> @p2pvalidator</a></p><p><strong><strong>Telegram:</strong></strong><a href="https://t.me/p2pvalidator?ref=p2p.org"> https://t.me/p2pvalidator</a></p>
from p2p validator