Hey
attestation_rewards
endpoint, the ideal_rewards
. In this update, I want to focus on the second and last part, the total_rewards
.total_rewards
The total_rewards
describe the actual rewards a validator receives through attestations. To rephrase the logic I already explained in earlier development updates:
0
.flag
(head
,target
, and source
).
flag
and their effective_balance
.flag
:
head
vote, the reward is 0
.target
and source
votes, the reward is a negative value calculated by multiplying the base reward by the weight and dividing by a certain value.My current implementation for the total_rewards
looks like the following:
To be able to merge this endpoint, there are still some things left to do. I need to get the inclusion_delay
, convert the HashMap of ideal_rewards
into a Vector, test the API manually, and make minor optimizations.
Hopefully, I will be able to finish the attestation_rewards
until the next update.