DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: low
Invalid

Non-Fixed and Outdated Solidity Compiler Version

Description

The contract uses a floating compiler version with the caret (^) operator. This allows compilation with any Solidity version from 0.8.4 up to but not including 0.9.0. While all 0.8.x versions include important safety features like overflow checks, using floating versions can lead to non-deterministic compilation results across different development environments and deployments.

Additionally, the specified minimum version 0.8.4 is outdated. The latest stable Solidity version includes important optimizations and bug fixes

Impact

Using a floating compiler version could potentially lead to:

  • Inconsistent bytecode across different deployments

  • Missing out on compiler optimizations and security improvements

  • Potential introduction of bugs if compiled with different versions

Tools Used

Manual Review

Recommendations

Lock the compiler version to a specific release by removing the caret (^)
Update to the latest stable 0.8.x version

pragma solidity 0.8.24;
Updates

Lead Judging Commences

n0kto Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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