QuantAMM

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

Incorrect Length Check in `UpliftOnlyExample::addLiquidityProportional` Allows 101 Items Instead of 100

Summary

In the UpliftOnlyExample::addLiquidityProportional function, the contract performs a check on the length of the poolsFeeData[pool][msg.sender] array to prevent excessive deposits:

if (poolsFeeData[pool][msg.sender].length > 100) {
revert TooManyDeposits(pool, msg.sender);
}

The issue is that this condition allows up to 101 items in the array, rather than the intended maximum of 100 items.

Recommendations

Adjust the conditional check to ensure the array length does not exceed 100 items:

if (poolsFeeData[pool][msg.sender].length >= 100) {
revert TooManyDeposits(pool, msg.sender);
}

This fix ensures the check correctly enforces the maximum limit of 100 items.

Updates

Lead Judging Commences

n0kto Lead Judge 7 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.