The function is intended to return a player's position in players[]. When no match is found it returns 0, which is indistinguishable from a valid match at index 0.
Likelihood:
Off-chain tooling or a player checking their index receives 0 even when they are not in the raffle
A non-participant who trusts the return value attempts refund(0), wasting gas
Impact:
Incorrect UX / off-chain index resolution
A non-participant's refund(0) call reverts rather than failing gracefully
A player not in the raffle calls getActivePlayerIndex(theirAddress), receives 0, then calls refund(0) — the require(players[0] == msg.sender) check reverts, but the caller had no way to distinguish "not found" from "at index 0" using the return value alone.
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.