Update a Rewards Manager Configuration

As the owner of a Rewards Manager, it is possible to update the configuration in order to:

  • Add new stake pools

  • Add new reward pools

  • Update rewards weights

  • Update drip models

To update the configs, the relevant call is RewardsManager.updateConfigs:

function updateConfigs(StakePoolConfig[] calldata stakePoolConfigs_, RewardPoolConfig[] calldata rewardPoolConfigs_)

The stake and reward pool configs for the update must obey the general requirements for creating a Rewards Manager (see Define Rewards Manager Configuration) with a few caveats:

  • It is not possible to remove stake pools, so existing stake pools must be included at the start of the StakePoolConfig[] sorted by the associated stake pool IDs. Any new stake pools come after the existing stake pools and must be sorted by the address of the underlying asset and not contain duplicates.

  • It is not possible to remove reward pools, so the existing reward pools must be included at the start of the RewardPoolConfig[] sorted by the associated reward pool IDs.

Note before a config update is applied, rewards are dripped and cumulative rewards values for all RewardPool and ClaimableRewardsData structs in storage are reset to 0. For an in-depth explanation why, see here.

Last updated