APR calculation incorrect
Describe the bug
It appears that the APR value is incorrect, or at least inconsistent with the beaconcha.in calculation. Naturally, the question arises who's right. Perhaps the problem is compounding validators for some reason?
For example, for the same (hoodi) validator, weekly.
Siren
ETH 0.0142 ETH
USD. $55.91 USD
annualized 1.81%
In contrast on hoodi.beaconcha.in
Income 1d | 7d | 31d +0.00213 | +0.01505 | +0.06614
APR 7d | 31d | 365d 1.96% | 1.95% | 0.79%
Note: 0.0142 vs 0.01505, 1.81% versus 1.95% follows naturally.
To Reproduce Observe normal function in siren stats, compare to beaconcha.in
Expected behavior The same value for both, or some clarification
Screenshots
Desktop (please complete the following information):
- OS: OS/X
- Browser chrome
- Version 140.0.7339.132 (Official Build) (x86_64)
Yes. I suspect there is an issue with partial withdrawals. As Siren does not connect to an execution client, it has no visibility over past execution client withdrawals.
I remedy this, we took a few days rewards and extrapolate it over a year. This will inevitably less accurate than a block explorer that has access to the execution rewards and can extrapolate over a larger data set.
I think perhaps the best solution will be to remove these calculations all-together from siren and just defer to beaconcha.in.