Within a contract UpliftOnlyExample.sol function onAfterRemoveLiquidity() will always revert because of the implementation of for loop within it.
Within onAfterRemoveLiquidity() function, for loop's uint variable "i" is decremented which will cause it to underflow and end up whole function to revert.
Copy this test function in any test file and run it.
This test function will revert with this error:
This line will cause function to revert.
Likelihood : HIGH
Manual Review
Increment array variable to prevent underflow error.
That’s definitely not the best way to handle that but there is indeed no impact. If someone tries to get more than their deposits, it must revert, and thanks to that "fancy mistake"(or genius code ?), it does.
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.