Closed 0xean closed 1 week ago
SANITY CHECK:
Does the sum of the earned rewards for the epoch match the expected amount of earned rewards (REWARD_RATE * seconds in epoch)
SANITY CHECK:
Does the sum of the earned rewards for the epoch match the expected amount of earned rewards (REWARD_RATE * seconds in epoch)
Very close when REWARD_RATE
is divided by WAD
- but not exactly possibly due to integer rounding precision. From my example, from block 216083216 to 216092990, using previous epoch end of 216083215 to calc secondsInEpoch
:
totalRewardsEarned
(as aggregated by account): 2450999999873,secondsInEpoch
: 2451,REWARD_RATE
: 1e27/1e18 = 1000000000REWARD_RATE * secondsInEpoch
= 2451000000000When using epoch start timestamp to calc secondsInEpoch
, we're further off the mark:
totalRewardsEarned
(as aggregated by account): 2450999999873,secondsInEpoch
: 2450,REWARD_RATE
: 1e27/1e18 = 1000000000REWARD_RATE * secondsInEpoch
= 2450000000000
https://github.com/shapeshift/rFOX/issues/46
Based on the findings above, its clear we are going to need to use a hot wallet style implementation to distribute RUNE. This ticket is a placeholder for that implementation that we will spec out further this week.