This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
nomination-pools: Defer first reward claim for 2 eras #10861
Labels
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
When a delegator first joins a nomination pool, we record the
reward_pools_total_earnings
at the exact point in time. However, at best the reward pool has the rewards up through the previous era. If the delegator joins prior to the snapshot they will benefit from the rewards of the active era despite not contributing to the pool's vote weight. If they join after the snapshot is taken they will benefit from the rewards of the next 2 eras because their vote weight will not be counted until the snapshot in active era + 1.In order to be fair to current pool members, all new joiners should wait for 1-2 eras to have their
reward_pools_total_earnings
set. Prior to having it set they should not be able to claim rewards because they have not contributed to the pools vote weight.One way to achieve this would be to make delegator's
reward_pools_total_earnings
an enum:Then we could expose an extrinsic that allows anyone to flip a delegator from
JoinEra
toRewardPoolsTotalEarnings
if the current era is>= JoinEra::era + 2
.This approach would maintain the nomination pools design goal of being constant complexity relative to delegators. However it would make the UX for new joiners less friendly because they would have to call this second extrinsic with some time delay after initially joining in order to start earning rewards.
Should wait until #10694 is merged to start working on this.
The text was updated successfully, but these errors were encountered: