Contracts should be deployed with the same compiler version and flags used during development and testing. Locking the pragma helps to guarantee that contracts do not accidentally get deployed using another pragma. For example, an out-of-date pragma version might introduce bugs that affect the contract system negatively or recently released pragma versions may have unidentified security vulnerabilities.
Transitioning to an earlier compiler version exposes the code to known security vulnerabilities that may have been addressed in the latest versions. However, in cases where the pragma is not fixed, using an older version might be an option due to compatibility with various compilers.
Opting for an extremely recent compiler version also comes with risks, as it may lack essential security fixes, making the code vulnerable to undiscovered threats.
Employing multiple pragma versions in different files can introduce code inconsistency, potentially resulting in unidentified security problems. It is crucial to maintain consistency in pragma versions across files to mitigate such risks.
Lock pragma to 0.8.18:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.