Omniscia Steer Protocol Audit

StrategyRegistry Static Analysis Findings

StrategyRegistry Static Analysis Findings

SRY-01S: Illegible Numeric Value Representation

TypeSeverityLocation
Code StyleStrategyRegistry.sol:L91

Description:

The linked representation of a numeric literal is sub-optimally represented decreasing the legibility of the codebase.

Example:

contracts/StrategyRegistry.sol
91maxMaxGasPerAction = 15000000; // 15 million by default

Recommendation:

To properly illustrate the value's purpose, we advise the following guidelines to be followed. For values meant to depict fractions with a base of 1e18, we advise fractions to be utilized directly (i.e. 1e17 becomes 0.1e18) as they are supported. For values meant to represent a percentage base, we advise each value to utilize the underscore (_) separator to discern the percentage decimal (i.e. 10000 becomes 100_00, 300 becomes 3_00 and so on). Finally, for large numeric values we simply advise the underscore character to be utilized again to represent them (i.e. 1000000 becomes 1_000_000).

Alleviation (200f275c40cbd4798f4a416c044ea726755d4741):

The underscore separator was adequately introduced to the value literal highlighting that it represents the value of 15 million.

SRY-02S: Inexistent Visibility Specifier

TypeSeverityLocation
Code StyleStrategyRegistry.sol:L61

Description:

The linked variable has no visibility specifier explicitly set.

Example:

contracts/StrategyRegistry.sol
61bytes32 constant hashedEmptyString = keccak256("");

Recommendation:

We advise one to be set so to avoid potential compilation discrepancies in the future as the current behaviour is for the compiler to assign one automatically which may deviate between pragma versions.

Alleviation (200f275c40cbd4798f4a416c044ea726755d4741):

A public visibility specifier was properly set for hashedEmptyString as advised.