returnIfBelowMin should be used when lpTokenSupply < lastLpTokenSupply instead of lpTokenSupply > lastLpTokenSupply
The _capLpTokenSupply function expects a boolean value denoted as returnIfBelowMin. When this value is set to true, the function returns an empty array with a length of 0. Within the _capReserves function, a call to _capLpTokenSupply is made with returnIfBelowMin set to true. However, an issue arises regarding the intended usage of returnIfBelowMin. According to its name, it suggests that it should be employed when lpTokenSupply < lastLpTokenSupply. Nevertheless, in practice, returnIfBelowMin is utilized when lpTokenSupply > lastLpTokenSupply, contrary to its apparent purpose. This discrepancy requires attention to ensure the correct interpretation and application of the code.
cappedReserves calculation will be effected in _capReserves.
Manual review
use returnIfBelowMin when lpTokenSupply < lastLpTokenSupply and lpTokenSupply < minLpTokenSupply
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.