QuantAMM

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

Insufficient message from some require checks in `QuantAMMStorage` contract

Summary

In the QuantAMMStorage contract, there are instances where an integer parameter is checked to see if it falls between the minimum and maximum values of a type. However, if this check fails, it results in an overflow revert rather than distinguishing between overflow and underflow reverts.

Vulnerability Details

There are three instances where we can observe this issue. Links are provided below:

Impact

It might confuse users.

Tools Used

Manual review

Recommendations

  • Use more clear message.

- require(elem <= MAX32 && elem >= MIN32, "Overflow");
+ require(elem <= MAX32 && elem >= MIN32, "Overflow or Underflow");
  • Consider seperate checks for overflow and underflow.

- require(elem <= MAX32 && elem >= MIN32, "Overflow");
+ require(elem <= MAX32, "Overflow");
+ require(elem >= MIN32, "Underflow");
Updates

Lead Judging Commences

n0kto Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
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.

Give us feedback!