Rewards Initiator
The RewardsInitiator
handles reward accounting and distribution updates for the StakingPool
. It periodically initiates reward updates by calling the StakingPool
to trigger a rebase followed by the SDLPoolCCIPControllerPrimary
to distribute rewards to all secondary chains. It will also trigger an emergency rebase in the case of a slashing event within the StakingPool
.
View Functions
stakingPool
Returns the address of the staking pool
Return Values
stakingPool
address
address of staking pool
sdlPoolCCIPController
Returns the address of the SDL pool CCIP controller
Return Values
sdlPoolCCIPController
address
address of SDL pool CCIP controller
whitelistedCallers
Returns whether a caller is whitelisted or not
Parameters
caller
address
address of caller
Return Values
isWhitelisted
bool
whether caller is whitelisted
checkUpkeep
Returns whether or not rewards should be updated due to a negative rebase and the strategies to update
Return Values
upkeepNeeded
bool
whether or not rewards should be updated
performData
bytes
abi encoded list of strategy indexes to update
Write Functions
updateRewards
Updates strategy rewards in the staking pool and distributes rewards to cross-chain SDL pools
Parameters
_strategyIdxs
uint256[]
indexes of strategies to update rewards for
_data
bytes
encoded data to be passed to each strategy
performUpkeep
Updates rewards in the case of a negative rebase
Parameters
_performData
bytes
abi encoded list of strategy indexes to update
whitelistCaller
Adds or removes an address from the whitelist for calling updateRewards
Parameters
_caller
address
address to add/remove
_shouldWhitelist
bool
whether address should be whitelisted
Last updated