15,000 USDC
View results
Submission Details
Severity: low
Valid

Floating pragma

Summary

Contracts should be deployed with the same compiler version and flags used during development and testing. Locking the pragma helps to guarantee that contracts do not accidentally get deployed using another pragma. For example, an out-of-date pragma version might introduce bugs that affect the contract system negatively or recently released pragma versions may have unidentified security vulnerabilities.

Vulnerability Details

Transitioning to an earlier compiler version exposes the code to known security vulnerabilities that may have been addressed in the latest versions. However, in cases where the pragma is not fixed, using an older version might be an option due to compatibility with various compilers.

Opting for an extremely recent compiler version also comes with risks, as it may lack essential security fixes, making the code vulnerable to undiscovered threats.

Employing multiple pragma versions in different files can introduce code inconsistency, potentially resulting in unidentified security problems. It is crucial to maintain consistency in pragma versions across files to mitigate such risks.

Recommendations

Lock pragma to 0.8.18:

pragma solidity 0.8.18;

Support

FAQs

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