The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Using Fixed Compiler Version for Security Best Practices in Solidity

Description:

This report explains why it is important to use a fixed compiler version when developing and deploying solidity smart contracts, and how to do it using the version pragma. It also provides some advantages and disadvantages of using fixed compiler version versus using a range of compiler versions.

Why use fixed compiler version?

Solidity is a programming language for creating smart contracts on the Ethereum blockchain. Solidity is constantly evolving and new compiler versions are released frequently, introducing new features, bug fixes, and breaking changes. This means that different compiler versions may produce different bytecode and behavior for the same source code. 💡

Advantages:

  • It ensures that the smart contracts are deployed with the same compiler version and flags that they have been tested the most with, reducing the risk of errors or exploits.

  • It indicates the compiler version intended by the original authors, and makes the code more readable and verifiable.

  • It avoids the need to update the code for every new compiler release, saving time and effort.

Disadvantages:
It prevents the smart contracts from benefiting from the new features, bug fixes, and optimizations introduced by newer compiler versions.

2 pragma solidity ^0.8.17;

https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L2

2 pragma solidity ^0.8.17;

https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPoolManager.sol#L2

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

Support

FAQs

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