In the setQuantAMMSwapFeeTake function, the contract enforces:
However, the error message “Swap fee must be less than 100%” conflicts with the actual code:
• The code uses <= 1e18, which allows a 100% fee.
• The error message suggests strictly less than 100%.
This can cause confusion about whether 100% (_quantAMMSwapFeeTake == 1e18) is allowed or not.
Manual audit
Clarify the Condition or the Error Message
If exactly 100% is permitted, the error message should read “Swap fee must be ≤ 100%.”
If the intention is to disallow 100%, then change the code to
require( _quantAMMSwapFeeTake < 1e18, "Swap fee must be less than 100%" );
Maintain Consistency in all similar checks (for example, “uplift fee must be less than 100%” in the setQuantAMMUpliftFeeTake function).
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.