Detection of the reentrancy bug. Do not report reentrancies that involve Ether (see reentrancy-eth).
Location:
Reentrancy in PuppyRaffle.refund(uint256) (src/PuppyRaffle.sol#96-105):
External calls:
address(msg.sender).sendValue(entranceFee) (src/PuppyRaffle.sol#101)
State variables written after the call(s):
players[playerIndex] = address(0) (src/PuppyRaffle.sol#103)
PuppyRaffle.players (src/PuppyRaffle.sol#23) can be used in cross function reentrancies:
PuppyRaffle.enterRaffle(address[]) (src/PuppyRaffle.sol#79-92)
PuppyRaffle.getActivePlayerIndex(address) (src/PuppyRaffle.sol#110-117)
PuppyRaffle.players (src/PuppyRaffle.sol#23)
PuppyRaffle.refund(uint256) (src/PuppyRaffle.sol#96-105)
PuppyRaffle.selectWinner() (src/PuppyRaffle.sol#125-154)
If the participant's address is a contract, and it has a fallback function that reverts or consumes more than 2300 gas, the refund will fail.
Audit Wizard (Slither)
Apply the check-effects-interactions pattern.
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.