In the enterRaffle function, users can add player addresses to the storage array called "players." However, when the array reaches a certain length, the function may become unavailable due to running out of gas. Additionally, the function checks for duplicate addresses using a nested loop, which consumes a significant amount of gas and increases the likelihood of the function failing.
high
manual review
Use the upper boundary of the players length to limit the gas cost.
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.