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

function stakingPool() external view returns (address)

Return Values

NameTypeDescription

stakingPool

address

address of staking pool

sdlPoolCCIPController

Returns the address of the SDL pool CCIP controller

function sdlPoolCCIPController() external view returns (address)

Return Values

NameTypeDescription

sdlPoolCCIPController

address

address of SDL pool CCIP controller

whitelistedCallers

Returns whether a caller is whitelisted or not

function whitelistedCallers(address _caller) external view returns (bool)

Parameters

NameTypeDescription

caller

address

address of caller

Return Values

NameTypeDescription

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

function checkUpkeep(bytes) external view returns (bool, bytes)

Return Values

NameTypeDescription

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

function updateRewards(uint256[] _strategyIdxs, bytes _data) external

Parameters

NameTypeDescription

_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

function performUpkeep(bytes _performData) external

Parameters

NameTypeDescription

_performData

bytes

abi encoded list of strategy indexes to update

whitelistCaller

Adds or removes an address from the whitelist for calling updateRewards

function whitelistCaller(address _caller, bool _shouldWhitelist) external

Parameters

NameTypeDescription

_caller

address

address to add/remove

_shouldWhitelist

bool

whether address should be whitelisted

Last updated