Users might drain the contract due to a possible re-entrancy attack while calling refund
function
Since the contract does not respect the CEI
(Check-Effects-Interactions
), users can trigger re-entrancy attack by calling the refund
function from their malicious contract and make PuppyRaffle.sol
call into it and never get to update the state for that user before fully draining itself.
Critical, completely draining the contract of its funds.
Manual inspection.
Let contract first update its state before sending the user their funds. Do that by putting the line 101 (sending the funds) at the end of the function.
reentrancy in refund() function
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.