There are two instances in the contract where reentrancy is possible and an attacker could be able to take more than he should.
Both claimAllRewards and claimSingleReward functions do not follow the Checks-Effects-Interactions patterns correctly making it possible for a malicious contract to claim more rewards than it should.Since there is no check that the user that buys boxes and claims their rewards is an address and not a contract,a malicious user could use a contract with a fallback function that re-calls the claim functions and since the
and the
are after the call to the contract and not before as they should it is possible for a malicious contract to claim again and again until there is nothing left.
The impact is very high since this way the contract could be left without any funds by only one malicious user.
Manual
1.Use reentrancy guard.
or
2.Make sure that the Checks-Effects-Interactions patterns are correctly used.
Correct claimAllRewards
correct claimSingleReward
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.