Omniscia Native Audit

ConstantSumPricer Code Style Findings

ConstantSumPricer Code Style Findings

CSP-01C: Repetitive Value Literal

TypeSeverityLocation
Code StyleConstantSumPricer.sol:L14, L15, L26

Description:

The linked value literal is repeated across the codebase multiple times.

Example:

contracts/ConstantSumPricer.sol
14uint256 amountInWithFee = amountIn * (10000 - fee);

Recommendation:

We advise it to be set to a constant variable instead optimizing the legibility of the codebase.

Alleviation:

The repetitive value literal has been relocated to a constant declaration labelled PERCENTAGE_DIVISOR clearly depicting the literal's purpose and increasing the legibility of the code.