Telcoin Platform
Telcoin Platform
TELx Staking Management Automation Module
The StakingRewardsManager Contract provides the TELx Council with the ability to automate the topping up of staking contracts. The Manager Contract administers the staking contracts and allows for configurations to be set by the TELx Council. The configurations set by the council determine how the Manager Contract will pull TEL from the TELx Council Safe to maintain the staking contracts, ensuring they are always fully operational according to the council’s specifications.
System Overview
The StakingRewardsManager Contract provides the TELx Council with the ability to automate the topping up of staking contracts. The Manager Contract administers the staking contracts and allows for configurations to be set by the TELx Council. The configurations set by the council determine how the Manager Contract will pull TEL from the TELx Council Safe to maintain the staking contracts, ensuring they are always fully operational according to the council’s specifications.
By automating the topping up process, unless there are configuration changes the Manager Contract eliminates the need for the TELx Council to vote to disburse tokens to staking contracts. A system such as Gelato will be responsible for the smart contract calls.
How it Works
The Staking Manager contract helps the TELx Council maintain the TELx LP staking contracts. It accomplishes this by allowing the TELx Council to set the rewards parameters for each staking contract and allowing any account to call functions to pull TEL from the TELx Council Safe and send it to the staking contracts.
The Manager Contract maintains a list of staking contracts that it needs to administer. Each staking contract has a configuration with two properties:
Each function has a security role associated with it. This will allow more modular secuirty as certain aspects could be outsourced to third party providers.
- createNewStakingRewardsContract
- Roles of the staking contract can be added and removed by calling grantRole or revokeRole.
- setStakingConfig
- setStakingRewardsFactory
- recoverERC20FromStaking and recoverERC20
- This should only be used if there is a problem with a staking contract and it needs to stop distributing rewards or if configuration changes cannot wait until the end of the staking period
- updatePeriodFinish
- topUp provides rewards to the staking contracts from the source provided and initiates the next staking period
- These top up calls can be automated with a tool like Gelato
Altering the System
The Manager Contract is a transparent proxy, so the code of the manager can be changed while keeping the same contract address which owns the staking contracts. To upgrade the Manager, a new implementation of the code must be deployed, then the TELx Council can call upgradeTo on the proxy.