Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Staking Contract to Use Transaction Fees for Staking Rewards #233

Closed
joshuahannan opened this issue Aug 20, 2021 · 2 comments · Fixed by #235
Closed

Update Staking Contract to Use Transaction Fees for Staking Rewards #233

joshuahannan opened this issue Aug 20, 2021 · 2 comments · Fixed by #235

Comments

@joshuahannan
Copy link
Member

Issue To Be Solved

Flow rewards are meant to include transaction fees, so we need a way to move the transaction fees from the FlowFees contract to the staking contract so they can be used instead of minting even more tokens and burning the fees. It allows for a more direct transfer.

Suggest A Solution

  • Figure out where the FlowFees.Administrator resource is
  • Organize for the FlowFees.Administrator to be moved to the staking contract account
  • In the payRewards function, using the Fees admin resource to withdraw all the fees that have accumulated in the fees vault
  • Ensure that all of the fees tokens are used before any more tokens are minted
  • Maybe mint all the extra tokens in one batch instead of individually for each staker

cc @laynelafrance @Kay-Zee

@laynelafrance
Copy link
Member

@joshuahannan in addition, @Kay-Zee pointed out that this should include the automation of rewards as it's currently hard coded. Would you like me to make a separate issue for that? It would include calculating rewards rather than taking an input and then reducing the mint by the amount fees contribute to the payout pool for that epoch.

@joshuahannan
Copy link
Member Author

We could include that also, but I was told that for this version of epochs, we weren't going to automate rewards calculation and payment yet. Has that changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants