The contract owner can withdraw all funds from the contract without considering outstanding user claims, potentially leaving users unable to claim their rewards.
The withdrawFunds()
function allows the owner to transfer the entire contract balance:
There is no check to ensure that enough funds remain in the contract to cover user rewards. This can lead to situations where users are unable to claim their rewards if the owner withdraws all the Ether.
If the contract’s balance is drained, users will not be able to claim their rewards, resulting in significant user dissatisfaction and potential financial loss. This could lead to the contract being considered fraudulent or mismanaged.
Manual code review
Implement a function to calculate the total value of all unclaimed rewards and ensure the contract retains sufficient funds before allowing any withdrawal. For example:
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.