TL;DR A new calculation tool is being integrated into Octez to help bakers and baking tooling builders understand better how much each of their delegators contributes to their consensus rights. The output of this tool will be available as an Octez node RPC endpoint, enabling more transparency and insight into baking power distribution — without aiming to become a full delegation rewards distribution system.
We are sharing this plan today, to give a heads up to Tezos bakers and builders. Do not hesitate also to provide feedback on the proposed design, and suggestions on how to improve this new feature.
Context
The adoption of the Paris protocol upgrade changed how the Tezos protocol estimates delegators’ contributions towards their bakers’ baking power, and consequently the share of rewards they would be eventually paid by their baker. Paris deprecated the previous approach based on aleatory stake snapshots by a continuous mechanism which determines the minimal delegated balance of a baker in the cycle.
The Quebec protocol refined this mechanism further by amending the granularity of the computation of the minimal delegated balance and improving the information available via RPC endpoints. This was necessary to address reported frictions in downstream infrastructure, like indexer and Tezos reward distribution tools.
To assist bakers and tool developers further, and remove the burden of computing delegator shares closer to the Tezos protocol, core engineering teams are planning to introduce a new RPC endpoint which will easily report all contributions by delegators to their baker’s delegated balance in a given cycle.
What This Tool Does
- For a given cycle and baker, it breaks down the computation of the baking power arising from delegated tez in that cycle.
- Crucially it provides the share of each individual delegator and the baker’s own towards this total.
- It helps quantify the real impact of each delegator on baking power and would allow for a leaner computation of delegator rewards.
This tool is not a full reward calculator – its purpose is to provide more clear information on the different contributions to baking rights from delegation.
Please see Baking Power in Octez for further reference.
How It Works
The new tooling will be integrated into the Octez suite, and can be queried via a new dedicated Octez node RPC endpoint.
RPC path
/chain/main/delegators_participation/<reward-cycle>/<baker-pkh>
Parameters
reward-cycle
: The target cycle for which to calculate the share of baking power from delegated tez.baker-pkh
: The public key hash of the baking (or manager) key for the baker whose shares are being calculated.
JSON Output
The RPC endpoint outputs values given in weighted mutez.
Staked and delegated tez have different weights in the computation of baking power:
- Staked tez have a weight of 1. That is, they contribute to baking power at their nominal value.
- Delegated tez have a weight of 1/3, meaning they contribute a third of their nominal value.
The proposed JSON output has the following shape:
{ "total_baking_power" : 96_000_000_000 ,
"total_baking_power_from_delegation" : 6_000_000_000 ,
"delegators_share" :[
"tz1a…." : 6000 ,
"tz1b…." : 4301 ,
"KT1b…." : 201 ,
...
],
"self_delegated": 8000,
"overstaking_share": 4800,
"untracked_unstake_requests": 5000,
"overdelegation" : 150,
}
where:
total_baking_power
: The baker’s total baking power in the queried cycle.total_baking_power_from_delegation
: The portion of the baker’s baking power that comes specifically from delegated tez, with:
total_baking_power_from_delegation =
delegators_share + overstaking_share + untracked_unstake_requests - overdelegation`
delegators_share
: Maps delegators to their respective contributions towards their baker’s total baking power from delegation. It includes delegated spendable tez, frozen rollup bonds, unstaked tez, and other sources - see the docs for its complete definition.self_delegated
: The baker’s own contribution to its delegated baking power.overstaking_share
: The total share of the baking power from delegation that originates from overstaked tez.untracked_unstake_requests
: The aggregated contribution from unfinalized unstake requests from delegators that have changed their delegation to a new baker and that are still counted towards the baker’s baking power.overdelegation
: The total delegation excess which is not taken into account for the computation of baking power in the case the baker is overdelegated.
Requirements & Best Practices
As hinted by the path of the proposed endpoint, this is not a “protocol” RPC endpoint, but rather a shell one. This is because of the additional business logic required to serve these requests, which takes place outside the Tezos protocol.
- Given its computational cost, the Octez node’s RPC server should be configured to be run as a separate process, when using the proposed endpoint.
- It should not be exposed publicly by Octez nodes.