DOS attack is possible when a malicious user call PuppyRaffle#enterRaffle()
to register many addresses, which could cause excessive gas consumed and even transactions reverted when other users are trying to enter the raffle by calling this method.
The nested for loop for checking duplication in PuppyRaffle#enterRaffle()
could cause excessive gas consumed and even transactions reverted when the players
array's length get too big.
DOS attack will prevent new users from entering the raffle and only the addresses that belong to the attacker are eligible for winner selecting and token minting.
A proof of concept for the attack is provided below.
Manual review
Use a mapping mapping(address => boolean) registeredUsers
to store the users who entered the ruffle
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.