QuantAMM

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

off by one error with the number of nft holded by the user

Summary

user bypasses the limit of 100 deposits in addLiquidityProportional by one

Vulnerability Details

In UpliftOnlyExample::addLiquidity Proportional each user holds up to 100 deposits however the check reverts when it surpasses 100 so the user can have 101 deposits which is against the docs and the normal behavior

File: UpliftOnlyExample.sol
226: if (poolsFeeData[pool][msg.sender].length > 100) {

Impact

off by one error in the length of the array affecting the intended design and normal behavior as it mustn't exceed 100 deposits

Tools Used

manual review

Recommendations

-- if (poolsFeeData[pool][msg.sender].length > 100) {
++ if (poolsFeeData[pool][msg.sender].length >= 100) {
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

invalid_Uplift_101_deposit_strict_equal

Only 1 more NFT won’t have any impact. Informational.

Support

FAQs

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

Give us feedback!