FLIP-GOV-2: Enable Automatic Staking Rewards

Abstract

Enable core contract feature to automatically calculate and payout rewards during system transaction at end of each epoch.

1 Like

Thanks @okjose!

I wanted to get this proposal out in the wild ASAP because enabling automatic payouts helps to reduce the dependence on weekly service account transactions.

Looking forward to the response!

1 Like

I don’t see how we could be against this proposal

I am definitely on board! The logic has been there for a while now and it mostly seems to be working fine on testnet(besides an issue because the increase rate was wrong. :grimacing:), so lets do it!

I wouldn’t expect anyone to be against this proposal, but I do want to make sure there’s space for feedback if there’s something which is important to someone in the community.

1 Like

Today’s service account signing party included the transaction to set the per-epoch reward rate!

I’ll submit a PR with that update and keep this marked as proposed since the later steps are more important for us to align on.

Update: https://github.com/onflow/flips/pull/6

Change to Automatic Rewards Payouts rollout:While putting together the process for manually testing automatic rewards payouts we came to the conclusion that the path we had sketched out will not work. This is because of how the code is written to assume that payment calculations & payouts occur at the same time.Because of this we believe the appropriate action is to modify the testing strategy as follows:

  • Perform normal wednesday rewards payouts.
  • Testnet will be updated on wendesday via a Spork, giving us the ability to watch the automatic rewards payments.
  • We can then use the same code as the contract to calculate the rewards payouts, and compare them to the existing process.
  • Assuming all these items correspond and there are no issues, we can enable automatic rewards payouts to begin on August 10th.

I’ll update the FLIP to reflect this!

Last week during the automatic rewards enablement on Mainnet, some bugs were discovered relating to the calculation of the total reward amount being emitted in a subsequent Epoch.

Due to this, we suggest waiting until the following week of august to enable rewards on mainnet. This will allow the smart contract team to integrate and test the bug fix.