Staking Operator's Guide
How to operate staking contracts
Configuration and deployment
To deploy a staking contract, you'll need to decide the following parameters:
rewardToken
- The ERC20 token in which rewards will be denominated.
stakeToken
- The ERC20 token which users will stake to earn rewards.
earningPowerCalculator
- The contract that will calculate earning power for the staking system.
maxBumpTip
- The max that a searcher bot can earn from updating an account's earning power.
admin
- The address which will have permission to manage rewardNotifiers
.
Managing Rewards
Reward Notifiers are responsible for distributing rewards to the staking system. The admin of Staker can add and remove them.
There are currently three kinds of reward notifiers:
TransferFromRewardNotifier - is approved to call
transferFrom
to move tokensTransferRewardNotifier - holds a balance of reward tokens in the notifier. Distributes them over time.
MintRewardNotifier - mints new reward tokens directly from the token contract
To add a new reward source:
Deploy a RewardNotifier
Give the notifier tokens with approve, a balance or mint permission as needed.
As the admin, call
setRewardNotifier(address _rewardNotifier, bool true)
Once the notifier is hooked up, its rewards will flow through the staking system.
Last updated
Was this helpful?