enterRaffle() consumes a lot of gas which can result in DoS and "out of gas" error.
entherRaffle() uses loops and nested loops in for iterating the players array. This results in longer function execution and potential out of gas problem. The test will not revert because Foundry has a very high gas limit. The following:
shows how quickly used gas is increased:
High. The attacker may easily discover this vulnerability and perform a denial-of-service attack because the function takes a lot of time to iterate through the loops.
Manual check.
Avoid loops and especially nested loops. Refactor the contract to use a mapping(uint256 => address) players instead of an array.
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.