gobitfly/eth2-beaconchain-explorer

Validator daily stats with unexpectedly high CL rewards

dospore opened this issue · 2 comments

Describe the bug
I was doing some graphing of rewards for a project I am working on at the moment. Just by chance I noticed a couple of things on testnet. I have not validated them on mainnet and they might be known but will explain below.

First one:
Blocks produced timestamps arent bucketed correctly into /api/v1/validator/stats/ route.

If you query blocks for validator 556, the block produced has timestamp 1698194880 which is "2023-10-25T00:48:00Z". The corresponding day stat shows

    ...,
    "day_end": "2023-10-25T12:00:00Z",
    "day_start": "2023-10-24T12:00:00Z",
    "proposed_blocks": 1,
    ...
}

Since the day_end < 1698194880 shouldnt this block be in the following days bucket? I was thinking I might be misunderstanding something with delays between proposal and finality inclusion but thought I'd ask anyway.

Second one:
The daily stats usually have CL rewards of ~1500000 if you subtract the start and end balances. On the day of the block this jumps to 50873595. This is a relatively signaficant jump in CL rewards judging the consistency of the data on other days with no indication of the reason for the increase (the attestations are similar on each day, no heavy decrease on this day). I checked this on validatorIndex 555 as well, on the day of a proposed block it showed a significant increase of CL rewards. I was thinking this could be explained but just seemed a bit fishy. You can see this on the holesky site as well if you look at the daily income graph.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://holesky.beaconcha.in/validator/556
  2. Scroll down to Daily income graph
  3. Load all results
  4. Scroll graph to large spike in rewards

Expected behavior
No increase in CL rewards, or a corresponding EL reward.

Screenshots
Screen Shot 2024-03-11 at 11 33 34 am

Hello @dospore,

  1. The timestamp of the block is 2023-10-25T00:48:00Z, that's between 2023-10-24T12:00:00Z and 2023-10-25T12:00:00Z. I don't see an issue in the provided example.
  2. There was a block and an Execution Income, the Execution Income was tiny in comparison to the Consensus Income, but it's visible on the tooltip. Testnet blocks often have only a very low number of transactions, or even no transactions at all. This can cause the Consensus Income to be way higher than the Execution Income.

I couldn't identify any bugs based on the information you provided.

@one-three-three-seven 2. makes sense. 1. You are totally right I just assumed day end and day start would be 00:00:00 but they are at 12. Thankyou, closing this ticket