Omniscia fetchai Audit

LendingPoolStorage Code Style Findings

LendingPoolStorage Code Style Findings

LPS-01C: Inefficient Modifier Types

TypeSeverityLocation
Code StyleInformationalLendingPoolStorage.sol:L15

Description:

The current modifier types are declared as seperate incremental variables whose correct order is entirely dependant on the programmers of the system.

Example:

contracts/ALP/LendingPoolStorage.sol
14/// @notice XSC Modifier type, used when to differentiate events for value modifications
15uint8 public constant XSC = 3;

Recommendation:

We advise an enum to be coded instead in the PoolStorageBase implementation that declares all possible modifier types to ensure consistency across the codebase.

Alleviation:

The Atomix team has stated that they wish to retain the current design as what we propose would not be future extensible, a trait important for the Atomix system.