QuantAMM

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

DoS Attack via Overflow in `numMinted` by Spamming Zero-Amount Liquidity Additions

Summary

The ability to add liquidity with zero-value amounts allows attackers to spam storage with invalid transactions. This behavior could lead to the numMinted variable in the LPNFT contract reaching type(uint256).max, causing an overflow reversion when incrementing numMinted. This attack effectively renders the addLiquidityProportional function which is the entrypoint in the UpliftOnlyExample contract.

Vulnerability Details

Impact

Permanent DoS: The addLiquidityProportional function of UpliftOnlyExample contract becomes permanently unusable for everybody once numMinted overflows, as no further tokens can be minted.

Tools Used

Manual auditing

Recommendations

  1. Reject Zero-Value Deposits: Prevent deposits of 0 by adding a check in the addLiquidityProportional function:

Updates

Lead Judging Commences

n0kto Lead Judge 10 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!