Omniscia fetchai Audit

InterestManager Static Analysis Findings

InterestManager Static Analysis Findings

IMR-01S: Inexistent Visibility Specifiers

TypeSeverityLocation
Code StyleInformationalInterestManager.sol:L76

Description:

The linked variable contains no visibility specifier explicitly set.

Example:

contracts/ALP/InterestManager.sol
76uint256 spread;

Recommendation:

We advise one to be set explicitly as currently the compiler automatically assigns a visibility specifier to it which may cause compilation discrepancies between versions.

Alleviation:

A private visibility specifier was added for the linked variable.

IMR-02S: Redundant Visibility Specifiers

TypeSeverityLocation
Gas OptimizationInformationalInterestManager.sol:L55, L56

Description:

The linked variables are meant to be system constants yet are exposed publicly via the public visibility specifier.

Example:

contracts/ALP/InterestManager.sol
55uint256 public constant DECIMALS = 18;
56uint256 public constant ONE_UNIT = 10**DECIMALS;

Recommendation:

We advise them to be set as internal greatly reducing the generated bytecode of the contract.

Alleviation:

The Atomix team has stated that they wish the DECIMALS member to remain exposed to conduct proper checks in future upgrades of the protocol, however, the other variables have been set to internal properly.