The claimAllRewards function may run out of gas if a user owns a large number of rewards, preventing successful execution.
The function iterates over the entire rewardsOwned array to calculate the total value of rewards. If the array is too large, the transaction could exceed the block gas limit, causing it to fail.
Steps to Exploit:
A user accumulates a large number of rewards.
Attempts to call claimAllRewards result in transaction failure due to gas exhaustion.
Users with many rewards may be unable to claim them all at once, leading to a denial of service for claiming rewards.
Manual Review
Implement a batching mechanism to allow users to claim rewards in smaller chunks.
Consider optimizing the reward storage or calculation logic to reduce gas consumption.
Alternatively, impose a limit on the number of rewards that can be claimed in a single transaction.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.