Penalties computation
With Rated v0 we have also introduced a feed that attempts to capture the penalties incurred on the validator index level and aggregated to the group level thereafter.
The way we approach this calculation is by looking at the delta between the estimated rewards a validator should have received per successful action performed (e.g. attesting correctly and in perfect time, participating in a sync committee) and the actual rewards the validator received in a given day.

Estimating rewards

Validator rewards pre- and post-Altair are some function of base_reward. Our calculation follows the spec along each of the two periods. To estimate the actual reward amounts in Gwei, we sum the number of units validators should receive per activity, and then we multiply them by the estimated base_reward for that day. Base_reward is a function of active validators and uptime, and is computed per epoch, but the variability between a day is small enough to approximate it with daily averages; which is the approach we are taking.
CASE WHEN vd.day > 329
THEN (
rewards*u.uptime*br.base_reward +
proposed_count*br.base_reward*br.active_validators*8.0/(32.0*64.0) +
sync_signature_count*(((br.total_active_balance*64)/FLOOR(SQRT(br.total_active_balance))) / (32*512*32))
)
ELSE (
rewards*u.uptime*br.pre_alt_base_reward +
proposed_count*(br.pre_alt_base_reward/8.0)*(br.active_validators/32.0)
)
END as estimated_rewards

Deriving penalties

Now from Lighthouse we fetch a validator_index's daily earnings and we can compare the theoretical maximum rewards for the given activities they performed with the actual outcome. We compute estimated penalties as:
estimated_penalties = estimated_rewards - realised_rewards
Example under Altair: A validator attested perfectly 90 times but missed 10 attestations. Say the base_reward is 20K GWei For the 90 perfect attestations, the validator should get:
90 * (0.218752 + 0.40625) = 75.9375 * base_reward =
75.9375 * 20K = 1,518.75K = 1.5M GWei
If a validator received 1.2M Gwei, we have a difference of 300K Gwei that we need to attribute somewhere! It is not opportunity cost, as the theoretical maximum is not factored in at all in the model.
Thus it has to be the penalties!
The reason why we don’t compute the penalties based on the estimated penalties of the missed activities (eg there is a spec about how much you should be penalised for missing an att) is that those are computed by a non-linear function of validator uptime and network finality lag.
Copy link
On this page
Estimating rewards
Deriving penalties