The ProportionalToXPReward reward strategy fails to validate totalXP values during reward calculation. Both division by zero (when totalXP = 0) and overflow from excessively large totalXP can occur. In both cases, rewards cannot be claimed, causing the entire prize pool to become permanently locked.
Reward computation formulas do not validate totalXP:
reward = userXP * prizePool / totalXP;
rewards[i] = xps[i] * prizePool / totalXP;
totalXP == 0 → division by zero revert.totalXP is extremely large (e.g., 2^255 provided by the asserter) → userXP * prizePool underflows effectively to zero, and reward distribution breaks.Enforce validation of totalXP:
require(totalXP > 0 && totalXP <= MAX_REASONABLE_XP, "Invalid total XP");
Enforce reasonable bounds on XP tiers in setXPTiers.
A session is created with ProportionalToXPReward as the reward strategy.
Contestants join and participate normally.
When results are submitted:
0.2^255.UMA oracle finalizes the assertion (if undisputed).
During claimRewards, getReward or getRewards executes division with invalid totalXP:
0 due to overflow/precision loss.In both cases, all winners are blocked from claiming rewards.
Coded POC attached - Please refer @audit comments