The claimAllRewards
and claimSingleReward
functions are susceptible to reentrancy attacks. This vulnerability arises from the use of external calls to transfer Ether before updating the contract's state, allowing attackers to potentially exploit the contract and claim rewards multiple times.
claimAllRewards
and claimSingleReward
functions transfer Ether to the caller using the call
method before updating the contract's state (i.e., deleting the claimed rewards). This sequence of operations is vulnerable to reentrancy attacks, where an attacker can re-enter the contract and execute the function multiple times before the state is updated.
An attacker can exploit this by creating a fallback function that calls back into the contract, allowing them to drain funds by repeatedly claiming rewards.
An attacker could potentially drain the contract's funds by repeatedly exploiting the reentrancy vulnerability, leading to significant financial loss.
Manual Review
Reorder the operations to update the contract's state before making external calls
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.