An attacker can refund themselves multiple times (creating zero addresses in the players array), then call enterRaffle to cause the duplicate check to revert when comparing zero addresses against each other, preventing legitimate entries until the next raffle.
The normal behavior is for players to enter and optionally refund themselves, with the duplicate check preventing the same address from appearing twice.
The issue is that after refunding, a player's slot becomes address(0). Multiple refunds create multiple zero addresses. When new players enter, the duplicate check compares these zero addresses and reverts, blocking all entries.
Likelihood:
An attacker can refund their own entry to create a zero address, then call refund on another player they previously entered
Once multiple zero addresses exist in the array, any call to enterRaffle will revert on the duplicate check when comparing address(0) == address(0)
This persists until the raffle winner is selected and the players array is cleared
Impact:
Raffle is blocked from accepting new players for an extended period
Denial of service until the next winner is selected
Loss of potential entrance fees for the protocol
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.