Assessment reports>StaFi>Discussion>Pragma versions

Pragma causes math operations to be unchecked by default

Many of the files lock pragma to Solidity versions that do not include built-in checks for math operations. It is crucial for future developers to be aware of this and take appropriate measures when performing math operations. They should either utilize the SafeMath library, ensure their code is resilient to overflows and underflows or undergo a thorough security audit.

It is important to note that, at the time of this assessment, all math operations were found to be safe from overflows and underflows.

In the case of the current codebase, the pragma version is pragma Solidity 0.7.6, which is an almost three-year-old version of Solidity. We recommend bumping the version at least to 0.8, which is the earliest version of Solidity that includes built-in checks for math operations.

Zellic © 2024Back to top ↑