The addLiquidityProportional function in UpliftOnlyExample.sol has an issue with its deposit limit check that allows users to make 101 deposits instead of the intended maximum of 100 deposits, violating the contract's documented requirements.
Looking at the if loop in the addLiquidityProportional function:
starting from index 0, the current implementation checks if its >100 which would result in 101 deposits and this contradicts the documented requirement in the error definition:
Users can make 101 deposits instead of the intended 100
Manual code review
Change the condition to use greater than or equal to:
or you can also still stick with just greater than but chnage the digit from 100 to 99:
This fix will allow exactly 100 deposits (indices 0 to 99) and revert on attempt to make the 101st deposit.
Only 1 more NFT won’t have any impact. Informational.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.