celo-org / staked-celo

GNU Lesser General Public License v3.0
8 stars 2 forks source link

Create cron job for `Account.activateAndVote` #20

Closed soloseng closed 2 years ago

soloseng commented 2 years ago

Account.activateAndVote should be called for each validator group that has had votes scheduled recently

Note: This does not need to be called for every deposit call, but ideally should be called before the epoch during which the deposit was made ends. This is because voting CELO doesn't start generating yield until the next epoch after it was used for voting. The function can be called by any address, whether or not it had previously deposited into the system (in particular, there could be a bot that calls it once a day per validator group).