The MysteryBox::transferReward() function uses delete to remove an item from the rewards array, which can leave "holes" in the data structure.
This creates gaps in the rewardsOwned array, leading to potential inefficiencies and unexpected behavior.
Visual Studio Code
Solidity
Foundry
Use a more efficient method to remove the reward by replacing it with the last item and reducing the array length.
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.