Gas inefficiency due to storing and emitting string literals instead of custom errors.
While the Pot contract correctly implements some custom errors (e.g., Pot__RewardNotFound), if there are any remaining require(condition, "String message") statements within the broader codebase (like the ContestManager), they will consume unnecessary gas. Solidity 0.8.4 introduced custom errors, which allow developers to define errors using the error keyword. Unlike string messages, custom errors do not require storing large strings in the contract bytecode, making them significantly cheaper to deploy and execute when a revert triggers.
Reason 1: It is a common leftover from older Solidity codebases (pre-0.8.4) or standard library imports.
Reason 2: Developers often default to require statements for quick debugging during development.
Impact
Impact 1: Increased deployment gas costs because string literals take up more bytes in the compiled bytecode.
Impact 2: Increased runtime gas costs when a transaction reverts, as the EVM has to allocate memory for the string array.
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.