enterRaffle function has a double loop through all players causing O(2n+1) complexity. This creates huge gas cost if there are too many players on the round and even prevent the function to run if it hits block gas limits.
Users entering early will have cheaper gas advantage and can enter with multiple wallets to increase the gas limit for further users.
Use mapping to check (roundId to address : boolean) if user has entered the raffle round. This provides single check instead of looping and have the same gas for everyone.
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.