QuantAMM

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

Allows 1 deposit above the 100 documented max deposit limit

Summary

UpliftOnlyExample.sol comments state:

The user is restricted to 100 deposits to avoid Ddos issues.

But due to a looser "if" compare it allows to add one more.

Vulnerability Details

In addLiquidityProportional function the first "if" verifies if the user already exceeds 100, but due to using ">" instead of ">=" it allows one more.

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

When the user will try to create a deposit when his mapping value length is already at 100, the "if" will pass.

Impact

Allows more deposits than intended and increasing max gas usage limits further in case max deposits exist and all are being removed. Otherwise nothing critical - low.

Tools Used

Manual review

Recommendations

Use >= instead of >

- if (poolsFeeData[pool][msg.sender].length > 100) {
+ if (poolsFeeData[pool][msg.sender].length >= 100) {
revert TooManyDeposits(pool, msg.sender);
}
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.