Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: low
Invalid

Activate the optimizer

Summary

This report emphasizes the importance of activating the Solidity compiler optimizer to optimize gas efficiency during contract deployment and function execution.

Vulnerability Details

Activating the optimizer significantly reduces gas consumption, leading to cost savings and increased contract performance.

Impact

Without activating the optimizer, contracts may incur higher gas costs during deployment and function execution, potentially impacting the project's economic viability.

Recommendations

By default, the optimizer will optimize the contract assuming it is called 200 times across its lifetime. If you want the initial contract deployment to be cheaper and the later function executions to be more expensive, set it to --optimize-runs=1. Conversely, if you expect many transactions and do not care for higher deployment cost and output size, set --optimize-runs to a high number.

module.exports = {
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
};

For further information, please visit this site.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

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