Omniscia LimeChain Audit

FeeCalculatorFacet Manual Review Findings

FeeCalculatorFacet Manual Review Findings

FCF-01M: Incorrect Limit Enforcement

Description:

The initFeeCalculator function ensures that the _precision provided is non-zero, however, a _precision of 1 would cause no fee to be possible and would thus be considered incorrect.

Example:

contracts/facets/FeeCalculatorFacet.sol
21require(
22 _precision != 0,
23 "FeeCalculatorFacet: precision must not be zero"
24);

Recommendation:

We advise the require check to instead ensure the precision is at least equal to 10 and above.

Alleviation:

The precision limit imposed was adjusted as per our recommendation to greater-than-or-equal-to (>=) ten.