QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: low
Invalid

Unnecessary division results in small precision loss

Summary

In UpliftOnlyExample.sol there is double division, which could lead to minor, uneccessary precision loss as this precision loss could be mitigated with the same calculation recalculated as a multiplication then division.

Vulnerability Details

uint256 adminFee = hookFee / (1e18 / quantAMMFeeTake);

Mathematicaly hookFee / (1e18 / quantAMMFeeTake = hookFee * quantAMMFeeTake / 1e18.

In solidity more instances of multiplication and less division reduces unnecessary precision loss, which could make the admin fee slightly lower than anticipated.

Impact

The admin fee may be slightly lower than expected.

Tools Used

Manual review.

Recommendations

Replace the double division with multiplication and division.

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Appeal created

0xdanielc Submitter
10 months ago
0xdanielc Submitter
10 months ago
huntoor Auditor
10 months ago
n0kto Lead Judge
10 months ago
n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!