QuantAMM

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

LPNFT can be used to rug users

Summary

The UpliftOnlyExample contract allows partial withdrawals of liquidity while an NFT is listed for sale on marketplaces, enabling a bait-and-switch attack where sellers can drain value before a sale completes.

Vulnerability Details

The issue exists because:

  1. In removeLiquidityProportional(), the contract doesn't check for any external NFT approvals

  2. The NFT ownership and actual liquidity value are decoupled - an NFT can represent partial liquidity after withdrawals.

Attack flow:

  1. Attacker deposits 100K USD worth of liquidity, receiving an NFT

  2. Lists NFT on OpenSea for 98K USD (appearing as a good deal)

  3. When buyer attempts purchase, attacker frontruns by withdrawing most liquidity

  4. Buyer receives an NFT worth much less than expected

Impact

Ruging users causing bad reputation for QuantAmm

Tools Used

Manual review

Recommendations

prevent withdrawals as long as external NFT approvals are set

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!