Raffle can be locked up for new entrants by entering with the same address twice.
enterRaffle
function has a hard requirement that two addresses not be the same
This requirement also means that in any user, malicious or accidental enters the raffle for the second time, no one else will be able to enter the raffle.
This check needs to be performed before the new player is added to the players
storage array.
src/PuppyRaffle.sol
https://github.com/Cyfrin/2023-10-Puppy-Raffle/blob/07399f4d02520a2abf6f462c024842e495ca82e4/src/PuppyRaffle.sol#L88C26-L88C26
No new players can enter the raffle.
It is recommended to first perform the duplicate check with players
storage array and the addresses in the function argument and then do players.push()
when no duplicates are found. Instead of aborting the transaction, just do not players.push()
the duplicate ones.
Manual Audit
Foundry
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.