According to the Altair spec, the penalties are:
According to the current spec, which is the Dencun spec, the penalties are:
These penalties are them summed together to get the full penalties received by the validator index.
The main advantages of this approach are two-fold. First is that it removes the variability of uptime since the penalties calculation do not rely on the participation rate of the network. Second is that one can attribute the exact source of the penalties.
Please note that in the RatedDB, we have applied the above methodology only for the post-Altair part of the sample (Day 330; Oct 27, 2021 and onwards). Thus when using the RatedAPI and looking for penalties in the “All-time” frame, you will get a discrepancy in reconciling rewards with the sum of their parts as the methodology described on this page gets mixed with the Pre-Altair penalties computation.