Sablier

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

Use of constant variables over literals

Summary

This report emphasizes the importance of defining and using constant variables instead of using literals repeatedly within smart contract code to increase the readability, maintainability, and potentially save gas costs.

Vulnerability Details

The vulnerability lies in the inefficiency and lack of code maintainability caused by using literals repeatedly instead of defining constant variables.

Impact

Repeated use of literals can lead to code redundancy, decreased readability, and higher gas costs due to gas inefficiency.

Tools Used

Manual code review

Recommendations

To address this issue, define constant variables for common literal values, and use them throughout the contract code. Ensure clear naming conventions for constant variables to indicate their purpose and usage.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/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.