20,000 USDC
View results
Submission Details
Severity: gas
Valid

Use if + custom errors instead of using require + string

Summary

The require statement from Fees.sol require(_profits != WETH, "not allowed"); should be replaced with an if statement + custom error:

Fees.sol:

- require(_profits != WETH, "not allowed");
+ if (_profits != WETH) revert WETHNotAllowed();

Errors.sol:

+ WETHNotAllowed();

Support

FAQs

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

Give us feedback!