You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an admin of the staking system (aka owner of contracts), I want to update the token reward using the onlyOwner function so that I can change incentive at any time and incentivize early users differently from later-stage users.
The text was updated successfully, but these errors were encountered:
Im coding a struct to create vaults in the smartcontract. This will include a vault update feature that will allow the reward math to be updated. Stay tuned.
As it's been a while since @slavakurilyak asked this question, I thought I would add the code here in case anyone wishes to add this function themselves.
@net2devcrypto you may have a better way of implementing this however I thought this would be the simplest and easiest.
You will require a new global variable underneath the totalStaked variable:
uint256 public tokenRewards = 100000;
Change the following within the _claim and earningInfo functions:
As an admin of the staking system (aka owner of contracts), I want to update the token reward using the
onlyOwner
function so that I can change incentive at any time and incentivize early users differently from later-stage users.The text was updated successfully, but these errors were encountered: