QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: high
Valid

QuantAMMAdmin is unable to withdraw earnings

Summary

UpliftOnlyExample::onAfterRemoveLiquidity calculates and distributes fees when a user withdraws their position from the protocol. A portion of the shares is allocated to the admin, but an NFT is not minted for the admin, preventing the liquidity from being withdrawn.

Vulnerability Details

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

Nested fees are not being avoided, and the NFT should be minted via a hook, not solely through UpliftOnlyExample::addLiquidityProportional.

Impact

  • The admin will be unable to withdraw their earnings.

  • If withdrawal is possible, nested fees would be generated, preventing the admin from receiving the full amount owed.

Tools Used

Manual Review

Recommendations

Mint an NFT for the admin.

Updates

Lead Judging Commences

n0kto Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding_Uplift_admin_cannot_withdraw_without_nft

Likelihood: High, won’t be able to withdraw. Impact: High, funds stuck.

Support

FAQs

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

Give us feedback!