Omniscia Avocado Fund Audit

AvocadoVault Static Analysis Findings

AvocadoVault Static Analysis Findings

AVT-01S: Illegible Numeric Value Representations

TypeSeverityLocation
Code StyleAvocadoVault.sol:
I-1: L35
I-2: L36
I-3: L80
I-4: L81

Description:

The linked representations of numeric literals are sub-optimally represented decreasing the legibility of the codebase.

Example:

contracts/src/AvocadoVault.sol
35uint16 public constant MAX_FEE_BPS = 2_000; // 20% max performance fee

Recommendation:

To properly illustrate each 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 (a859cd2191d509cbc6d47508bdd44ec6d3cc9844):

All percentage values referenced have had the underscore separator introduced to them properly per our recommendation, properly depicting each number's expected percentage value.