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

Floating pragma

Summary

Floating pragma is not recommended. I only recommend floating pragma if the codebase is meant to be used as a library.

Vulnerability Details

Impact

Floating pragma can allow many different versions of the solidity compiler to compile the code. This isn't recommended for a production contract. It's better to stick to a particular version of the compiler taking into account factors like maturity of the version and the bugs different versions fix.

There is also a chance that a new compiler might produce code that many L2s will reject. eg. the newer versions of solidity might emit PUSH0 OPCODES which many popular L2s don't support.

Tools Used

Recommendations

Replace floating pragma with a exact pragma.

Support

FAQs

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