Omniscia Bonq Audit

constants Code Style Findings

constants Code Style Findings

CON-01C: Deprecated Numeric Representation

TypeSeverityLocation
Code Styleconstants.sol:L7

Description:

The linked representation depicting the maximum value of a particular data type (i.e. 2**256 - 1 / 0xFF..FF / ~uint256(0) for uint256) is deprecated.

Example:

contracts/utils/constants.sol
7uint256 public constant MAX_INT = 2**256 - 1;

Recommendation:

We advise the newly introduced type operator to be applied on the data type desired and the max member to be accessed (i.e. 2**256 - 1 would become type(uint256).max), increasing the legibility of the codebase.

Alleviation:

The Bonq Protocol team has NOT made any changes in the source code to apply this optimization and as such, we consider it as acknowledged.