The function uses a require statement with a revert string to validate the ETH value sent:
Likelihood:
Higher gas consumption
Revert strings increase bytecode size and consume more gas during execution compared to custom errors.
Reduced efficiency at scale
In functions that may be called frequently or by many users, this pattern results in unnecessary cumulative gas overhead.
Impact:
Reason 1
This code path is executed every time users attempt to enter the raffle, making the gas inefficiency consistently observable.
Reason 2
The pattern is present in production logic rather than tests or scripts, meaning it directly affects end users.
Compared to a custom error, this approach embeds the revert string in the contract bytecode, increasing gas costs.
This approach significantly reduces deployment size and runtime gas costs while preserving clear error semantics.
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.