15,000 USDC
View results
Submission Details
Severity: gas

Enable the optimiser for saving gas

Summary

Enable the optimiser in the configuration file for saving gas.

Vulnerability Details

It isn't a vulnerability but permits to save gas during the function calls.

Impact

Enable the optimiser encreases a bit the gas used during deployment. But at the same time permits to save gas during the transactions (call functions) having users cost savings (better user experience). To evaluate the best trade-off.

Tools Used

Manual analysis

Recommendations

Set these parameters in the foundry.toml:

optimizer = true
optimizer_runs = 500

A value of 500 should be a good trade-off.

Support

FAQs

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