shapeshift / rFOX

rFOX - RUNE rewards for FOX stakers
MIT License
0 stars 0 forks source link

CLI - hot wallet implementation #58

Closed 0xean closed 1 week ago

0xean commented 3 weeks ago

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.

0xean commented 2 weeks ago

Step 1 on day 1 after epoch:

Step 2 on distribution day (15 days after epoch ends or next weekday):

other notes

  1. Design script so that its modular for error handling to pick up in different states, but allow the happy path for the msig signers to run it in one go.
  2. README and docs to walk through non technical users (msig signers)
0xean commented 2 weeks 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)

0xean commented 2 weeks ago
woodenfurniture commented 2 weeks 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)

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:

When using epoch start timestamp to calc secondsInEpoch, we're further off the mark: