Omniscia Euler Finance Audit
ConfigAmount Code Style Findings
ConfigAmount Code Style Findings
CAT-01C: Repetitive Value Literal
Type | Severity | Location |
---|---|---|
Code Style | ConfigAmount.sol:L18, L25, L32, L45 |
Description:
The linked value literal is repeated across the codebase multiple times.
Example:
src/EVault/shared/types/ConfigAmount.sol
18return uint256(self.toUint16()) * multiplier / (1e4 * divisor);
Recommendation:
We advise it to be set to a constant
variable instead, optimizing the legibility of the codebase.
In case the constant
has already been declared, we advise it to be properly re-used across the code.
Alleviation (fb2dd77a6ff9b7f710edb48e7eb5437e0db4fc1a):
The referenced repetitive value literal 1e4
has been declared as a constant
at the Constants
contract under the label CONFIG_SCALE
, optimizing the legibility of the codebase.