A Closer Look Into Snapshots on Tezos — What Happens When I Change the Amount of a Delegation?
In our Bakery’s public Telegram and by email, we are often asked about what happens when a Tezos delegator changes their delegation amount.
Here is a continuation of an explanation on how snapshots in the Tezos protocol work and how it impacts delegations, so delegators and Tezos holders can understand how rewards are calculated, at least in the case of Cryptium Labs, whenever they change the amount of their delegations.
Before continuing, if you haven’t yet, take a look at the previous article in the “A closer look into snapshots on Tezos” series: A Closer Look Into Snapshots on Tezos — Why Does it Take 7 Cycles for My Delegation to Start Baking?.
What Happens When You Change the Amount of a Delegation?
In the previous article, we have reviewed the concepts and saw how new delegations are taken into account, let’s test our understanding by answering the following questions: What happens when a delegator changes the amount in a delegation?
Note that this article is assuming that the baker is tracking new delegations, amount adjustments, and lost delegations automatically, or tracking the snapshots and calculating the rewards considering the exact snapshot used for the assignment of baking rights.
As a recap, snapshots are taken every 256 blocks within a cycle. As a cycle is by definition 4096 blocks, this means that there are 16 snapshots taken per cycle.
Changing the Amount in the Same Cycle
Taking back the previous example, a delegator makes a new delegation at the beginning of Cycle 18 of 10,000 XTZ to Liptium Crabs. The same delegator decides to increase the amount, so he/she transfers another 10,000 XTZ during the same cycle. Because of the frequency of snapshots, now there is a set of snapshots showing 11 Rolls and another set of snapshots showing 12 Rolls for the same baker.
Since bakers can use the Tezos RPC endpoints to track exactly which snapshot was chosen for the assignment slots, Liptium Crabs will be able to see which Total Staking Balance (exactly which snapshot) was used by the Tezos protocol when assigning the slots for Cycle 25. Considering this information, Liptium Crabs calculates the rewards accordingly.
When making changes in the amount of a delegation, the earlier the change is made, the higher the chances that the newest amount is considered. This is due to the fact that, within the same cycle, the earlier the amount of delegation is changed, the more amounts of snapshots of that cycle include the newest changes, hence the higher likelihood of the that snapshot to be chosen for the assignment of slots and that newest amount “contributing to baking”.
Changing the Amount in a Different Cycle
What happens when you change the amount you delegated in the following cycle In this case the initial delegation was made during Cycle 18, but the additional roll was added during Cycle 19, as the diagram below shows:
Similar to the previous case, the earliest the new delegation (blue area) is considered would be in Cycle 25 (7 cycles after). As the increase of amount happened in a different cycle, the snapshots showing 120,000 XTZ be taken for Cycle 19 (dark blue area). As a result, the earliest the new amount is taken into consideration for baking is after 7 cycles, so in Cycle 26.
Considering how frequently snapshots are taken within the cycle, the 7 cycles reference is just an estimation. In reality, depending on how early or late in a cycle the new or change of delegation was made, there is a higher or lower chance for that staking balance to be considered.
- A Closer Look Into Snapshots on Tezos — What Happens When I Change the Baker of a Delegation?