Last Man Standing

First Flight #45
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Floating pragma can cause deployment issues

Root + Impact

Description

  • Smart contract should be deployed with the same solidity version it was tested against which ensures that deplyed smart contracts will behave as expected.

  • As mentiod in the description, the game is planned to be deployed on multiple EVM-compatible blockchains. Starting from 0.8.20 solidity version, a new bytecode PUSH0 was introduced which might not be handled by a blockchain which can lead to unexpected behavior.

@> pragma solidity ^0.8.20;

Risk

Likelihood:

  • The issue will erise when the game will be deployed on EVM-compatible chain which doesn't support new features in one of solidity version that can be used because of floating pragma version.

Impact:

  • Deployment will fail and will lead to additional gas consumption.

Proof of Concept

Recommended Mitigation

Security best practices strongly recommend using a strict, fixed pragma version:

- pragma solidity ^0.8.20;
+ pragma solidity 0.8.20;
Updates

Appeal created

inallhonesty Lead Judge about 2 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.