An attacker can take all contract's fund after buy a box that have value, using reetrancy vulnerability
The function claimAllRewards and claimSingleReward have no protection from reentrancy attack. When a user have buy a box, then try to claim reward using the functions above, there is a line call external function with msg.sender address and after that the mapping update new state for rewardsOwned[msg.sender]
The msg.sender maybe a contract and have fallback/receive function that will call the claim function again, and because the mapping is not update, user can continue withdraw to take away all contract's fund.
Attacker after buy a box have value, can take away all fund of contract
Manual review
using CEI pattern to prevent reentrancy
using OZ's ReentrancyGuard
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.