Consensus missed rewards computation

This page discusses Rated's methodology on calculating missed consensus layer rewards from missed block proposals and failed attestation duties.

There are two distinct parts in computing missed consensus rewards for validators, and these are missed rewards that happen owing to (i) missed proposals and (ii) missed attestations, such that:

consensus_missed_rewards == consensus_missed_proposal_rewards + consensus_missed_attestation_rewards

In the following sections, we examine the methodology in calculating each of the two components.

Consensus missed proposal rewards

There will be times wherein validators miss proposing on slots they are assigned to. Aside from penalties, this will correspond to missed CL rewards that they would have gotten if these validators were able to fulfil their duty.

Rated estimates this opportunity cost by taking the average of the consensus layer proposer duty rewards for the epoch where the slot proposal was missed. As such the calculation is as follows:

consensus_missed_proposal_rewards == sum(consensus_rewards_per_epoch_block)/proposed_blocks_in_epoch

An epoch-level average is taken because conditions and parameters are set on a per-epoch basis by the network (e.g. proposer assignments, number of active and participating validators). Therefore the missed slot is under the same conditions as the rest in the epoch and we can take a credible comparison.

In the extreme scenario where there is a serious inactivity incident and there are several epochs without blocks, we fall back to the global average (i.e. since the start of the beacon chain).

Consensus missed attestation rewards

This approach defines the Rated methodology insofar as the post-Altair era is concerned.

Our approach to calculating missed attestation rewards is to first count how many attestation duties were wrongly fulfilled and then apply the spec based methodology on what these would have translated to in terms of rewards were they performed appropriately.

consensus_missed_attestation_rewards = head_vote_missed_rewards + source_vote_missed_rewards + target_vote_missed_rewards + sync_committee_missed_rewards

Diving a little deeper into the methodology, recall that the attestation duties wherein a missed reward event can happen are the following:

1. source vote: the validator has made a timely vote for the correct source checkpoint
2. target vote: the validator has made a timely vote for the correct target checkpoint
3. head vote: the validator has made a timely vote for the correct head block
4. sync committee reward: the validator has participated in a sync committee

Our calculation starts by aggregating the count of these misses over a given epoch-based time-period.

count(missed_source_votes)
count(missed_target_votes)
count(missed_head_votes)
count(missed_sync_committee_signatures)

We then take these counts and multiply them by their respective base reward weights according to the Altair spec.

count(missed_source_votes) * 14/64 base_reward
count(missed_target_votes) * 26/64 base_reward
count(missed_head_votes) * 14/64 base_reward
count(missed_sync_committee_signatures) * 2/64 * active_validators * base_reward / (32*512)

The products of these operations are then multiplied by the respective network-wide fulfilment rates of each duty (i.e. the proportion of validators correctly fulfilling that duty) for the period, except for the missed sync committee signatures wherein the uptime does not factor in the calculation.

It goes without saying that completely missing an attestation counts towards a missed head vote, target vote, and source vote altogether.

Consensus missed rewards pre-Altair

According to the Phase 0 Beacon Chain spec, missed rewards were more tightly coupled with penalties. It's worth revisiting how the EF's documentation formalizes rewards and penalties.

The penalties for missing the head, target, and source votes are equal to the rewards the attester would have received had they submitted them. This means that instead of having the rewards added to their balance, they have an equal value removed from their balance.

Given all of the above, there is a simple and elegant way in which we can capture missed attestation rewards on the Beacon Chain for any given validator index in any given epoch:

consensus_missed_attestation_rewards == |penalties|

While the calculation is relatively straightforward, there is an important distinction to make here. The above stated approach is strictly encompassing of missed_rewards, when missed rewards are understood as a wholly different set frompenalties, in a way that:

opportunity_cost == |penalties| + missed_attestation_rewards

Last updated