Staking Operator's Guide
How to operate staking contracts
Last updated
Was this helpful?
How to operate staking contracts
Last updated
Was this helpful?
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
.
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:
- is approved to call transferFrom
to move tokens
- holds a balance of reward tokens in the notifier. Distributes them over time.
- mints new reward tokens directly from the token contract
To add a new reward source:
Deploy a
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.