Snowman Merkle Airdrop

First Flight #42
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Floating Pragma

Root + Impact

Description

  • The contract uses a floating pragma (^), allowing the contract to be compiled with any compiler version starting from 0.8.24 up to, but not including, 0.9.0.

@> pragma solidity ^0.8.24;

Risk

Likelihood: Low

  • Different compiler versions will be used across different development environments and deployments

  • CI/CD pipelines might use the latest compatible version automatically

Impact:

  • Different compiler versions may introduce inconsistent behaviour

  • Bug fixes and optimizations in specific versions might be missed

  • Security patches in newer versions might not be applied consistently

Proof of Concept

// This contract can be compiled with multiple versions:
pragma solidity ^0.8.24; // Could use 0.8.24, 0.8.25, 0.8.26, etc.
contract SnowmanAirdrop is EIP712, ReentrancyGuard {
// Contract code...
}
// Deployment 1 (Local): Compiles with 0.8.24
// Deployment 2 (Test): Compiles with 0.8.25
// Deployment 3 (Prod): Compiles with 0.8.26
// Each deployment might behave slightly differently

Recommended Mitigation

// Remove this code
- pragma solidity ^0.8.24;
// Add this code
+ pragma solidity 0.8.24;
Updates

Lead Judging Commences

yeahchibyke Lead Judge 25 days ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

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