Users can enter the 0 address in the Raffle to manipulate winning probabilities.
While it is stated in the CodeHawks documentation that "Zero address checks" are not valid findings, in this case a use can use this to increase his chance or winning.
The function that selects a winner and mints the NFT selectWinner requires that at least 4 addresses are registered in the Raffle. One can register the 0 address which will count as one of the 4 minimum entries.
If the 0 address is selected as winner, the minting will fail due to the ERC721 spec. In this case a user can call selectWinner until another address.
A user can register the 0 address to increase his chance of winning. For example, if there are 4 participants including the 0 address, the effective probability for a certain address to win will be 1/3 instead of 1/4.
Manual review
Add a 0 address validation in enterRaffle.
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.