Omniscia Bonq Audit
BONQMath Code Style Findings
BONQMath Code Style Findings
BON-01C: Deprecated Numeric Representation
Type | Severity | Location |
---|---|---|
Code Style | BONQMath.sol:L8 |
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:
8uint256 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.
BON-02C: Repetitive Value Literal
Type | Severity | Location |
---|---|---|
Code Style | BONQMath.sol:L52, L53 |
Description:
The linked value literal is repeated across the codebase multiple times.
Impact:
52|54|52,53
Example:
52if (_minutes > 525600000) {
Recommendation:
We advise it to be set to a constant
variable instead optimizing 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.