Omniscia fetchai Audit

DebtBalancer Static Analysis Findings

DebtBalancer Static Analysis Findings

DBR-01S: Redundant Visibility Specifiers

TypeSeverityLocation
Gas OptimizationInformationalDebtBalancer.sol:L91, L94

Description:

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

Example:

contracts/ALP/DebtBalancer.sol
90/// @notice number of decimal places we support
91uint256 public constant DECIMALS = 18;
92
93/// @notice integer representation of one
94uint256 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.