GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Bug Report: Use Stable Solidity Version (0.8.18, 0.8.19 , 0.8.20 ................) Instead of Floating (^0.8.0)

Summary:
The current contract files, GivingThanks.sol and CharityRegistry.sol, use the floating pragma version ^0.8.0, which allows for any version of Solidity starting from 0.8.0 to the next breaking change (e.g., 0.9.0). This can lead to unexpected issues if a new Solidity version introduces breaking changes that are not backward-compatible with the current contract. It is recommended to use a specific stable version, such as 0.8.18, 0.8.19 , 0.8.20 ................, to ensure compatibility and avoid potential issues caused by unexpected updates.

Vulnerability Details:
The caret (^) symbol means "compatible with version 0.8.0 and any newer version until the next breaking change" (e.g., 0.9.0). This introduces risks because:

  • Solidity may introduce breaking changes that are not backward compatible, causing unexpected behavior or vulnerabilities in the contract.

  • It can result in unpredictable results during contract deployment, especially when the compiler is updated or changes between patch or minor versions.

Impact:

The impact of leaving the floating version is mainly related to ensuring contract stability and predictability. By locking the version to 0.8.19, the contract will always compile with the same version, ensuring that no future compiler changes cause issues.

Tools Used:

  • Manual code review

Recommendations:
It is highly recommended to use a fixed Solidity version to avoid unexpected issues related to compiler changes.

Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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