The claimSingleReward function is designed to allow users to claim rewards stored in a mapping, rewardsOwned, by specifying an index. However, the implementation contains a reentrancy vulnerability that can be exploited by malicious actors to withdraw funds multiple times without proper validation.
Relevant code - claimSingleReward
The function transfers rewards to the msg.sender without updating the user’s balance in the contract. This design flaw allows a malicious actor to repeatedly invoke the function with the same index, draining the contract’s balance until it reaches zero.
Attackers can drain the contract’s balance, causing financial loss.
Manual Review
Before sending the reward, set the msg.sender's reward amount to zero.
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.