The enterRaffle function does not validate that the newPlayers array contains at least one address. An attacker can call the function with an empty array, emit a RaffleEnter event with no actual players, and waste transactions.
The normal behavior is that players submit a non-empty list of addresses to enter the raffle with the appropriate ETH payment.
The issue is that the function accepts empty arrays, allowing calls with no players and no payment, which emits events that may confuse off-chain tracking systems.
Likelihood:
Callers can trivially invoke the function with an empty array (address[] memory newPlayers = new address[](0))
The require check passes because 0 ETH is required for 0 players
Impact:
Misleading events are emitted with no actual participants
Potential confusion in off-chain event indexing or monitoring systems
Wasted block space for no value
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.