Description
Currently, a group’s averageGroupRewardShare can only increase when a new IP is added to the group. When an IP is removed—especially the IP with the highest expectedMinimumGroupRewardShare—the averageGroupRewardShare remains unchanged.
This behavior is intentional and designed to avoid iterating over all IPs in a group on-chain, which could result in out-of-gas (OOG) failures. However, this design also causes averageGroupRewardShare to become stale or inflated, no longer reflecting the actual composition of the group after IP removals.
As a result, a group may effectively become “locked” at a higher averageGroupRewardShare. Even if high-share IPs are removed, the group cannot accept new IPs with lower expected reward shares. In practice, this forces the group owner to create a new group to continue onboarding IPs, introducing unnecessary operational overhead and additional costs.
This issue aims to improve user experience and long-term group usability by enabling a safe and supported way to decrease or recompute averageGroupRewardShare when group composition changes.
Current Behavior
- averageGroupRewardShare:
- Increases when adding an IP to a group.
- Never decreases, even when IPs are removed.
- Removing an IP with the highest expectedMinimumGroupRewardShare does not update averageGroupRewardShare.
- This behavior is by design to avoid unbounded iteration over group IPs, which may be unsafe in terms of gas consumption.
Expected Behavior
- Provide a mechanism to:
- Decrease averageGroupRewardShare, or
- Safely recalculate averageGroupRewardShare,
- When an IP—particularly one with the highest expectedMinimumGroupRewardShare—is removed from the group.
- The solution should preserve gas safety guarantees while improving correctness and UX.
Description
Currently, a group’s
averageGroupRewardSharecan only increase when a new IP is added to the group. When an IP is removed—especially the IP with the highestexpectedMinimumGroupRewardShare—theaverageGroupRewardShareremains unchanged.This behavior is intentional and designed to avoid iterating over all IPs in a group on-chain, which could result in out-of-gas (OOG) failures. However, this design also causes
averageGroupRewardShareto become stale or inflated, no longer reflecting the actual composition of the group after IP removals.As a result, a group may effectively become “locked” at a higher
averageGroupRewardShare. Even if high-share IPs are removed, the group cannot accept new IPs with lower expected reward shares. In practice, this forces the group owner to create a new group to continue onboarding IPs, introducing unnecessary operational overhead and additional costs.This issue aims to improve user experience and long-term group usability by enabling a safe and supported way to decrease or recompute averageGroupRewardShare when group composition changes.
Current Behavior
Expected Behavior