The PuppyRaffle contract does not have a re entrancy guard.
This presents vulnerabilities on several functions, and particularly the following state altering ones:
PuppyRaffle::enterRaffle()
PuppyRaffle::refund()
PuppyRaffle::selectWinner()
A malicious contract calling one of these three functions might use its fallback function to recursively call PuppyRaffle.sol and either drain its total funds or make it so that it would break its business logic.
PuppyRaffle::enterRaffle(): a hacker could re enter the function and duplicate an address in order to increase its probability of winning the raffle.
PuppyRaffle::refund(): a hacker could re enter the function and drain all the fees paid by all the raffle's players.
PuppyRaffle::selectWinner(): a hacker could re enter the function and make it that there are several winners for the same raffle.
VScode
Slither
Apply the following modifications to PuppyRaffle.sol:
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.