As #4 stands today, the dogfood module relies on operator and delegation hooks to decide the validator updates which need to be passed to Tendermint. However, in a multi-asset staking situation, this is not feasible because the price of the asset (which is being delegated / undelegated) may change during the epoch. Hence, a function called GetAvgDelegatedValue is envisaged in the restaking_assets_manage keeper. This function should return the sum of the currently delegated values (not pending undelegation) multiplied by the average price of the assets within the epoch (derived from the oracle module). With this new design, a lot of the complexities of the previous design have been eliminated or offloaded to other modules; however, it is a heavier operation because of the iteration of validators that is required at each epoch.
As #4 stands today, the dogfood module relies on operator and delegation hooks to decide the validator updates which need to be passed to Tendermint. However, in a multi-asset staking situation, this is not feasible because the price of the asset (which is being delegated / undelegated) may change during the epoch. Hence, a function called
GetAvgDelegatedValue
is envisaged in therestaking_assets_manage
keeper. This function should return the sum of the currently delegated values (not pending undelegation) multiplied by the average price of the assets within the epoch (derived from the oracle module). With this new design, a lot of the complexities of the previous design have been eliminated or offloaded to other modules; however, it is a heavier operation because of the iteration of validators that is required at each epoch.