The MysteryBox::claimAllRewards() function iterates over all rewards owned by a user to calculate their value, which can lead to high gas costs and potential failures for users with many rewards.
A user with a large number of rewards may not be able to claim them all at once due to high gas costs.
Visual Studio Code
Solidity
Foundry
Allow users to claim rewards in smaller batches or optimize the data structure for more efficient reward value calculations.
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.