DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: low
Invalid

Custom Error

Summary and Vulnerability Details

One way to elevate our gas efficiency is by updating our require statements. As it stands, our require statement forces us to store this "Chop: no underlying" as a string array. When you consider how each character in this error log is stored individually, it quickly becomes apparent that the logic required to manage it all can be bulky and inefficient, especially when there is a far more gas-friendly alternative available.

Impact

with the use of require(underlyingAmount > 0, "Chop: no underlying"); more gas is used.

Tools Used

Manual Review

Recommendations

Custom Error should be introduced in the solidity code and revert function should be used to display the error. This will make the code lighter and less gas will be used.

Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Gas

Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.