QuantAMM

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

Maximum Swap Fee Percentage is Too High

Summary

Maximum Swap Fee Percentage is Too High

Vulnerability Details

_MAX_SWAP_FEE_PERCENTAGE is set to 10e16, which is equivalent to 10%. This limit may be too high and may cause users to incur excessive fees when making swaps.

https://github.com/Cyfrin/2024-12-quantamm/blob/main/pkg/pool-hooks/contracts/hooks-quantamm/UpliftOnlyExample.sol

Impact

If the contract owner sets hookSwapFeePercentage close to the maximum value, users will lose a large amount of funds on each swap. This may seriously affect the usage and liquidity of the protocol.

Tools Used

vscode

Recommendations

Consider lowering the value of _MAX_SWAP_FEE_PERCENTAGE, such as setting it to 1e16 (1%) or 5e15 (0.5%).

Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

Informational or Gas / Admin is trusted / Pool creation is trusted / User mistake / Suppositions

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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