The feePerLP is calculated incorrectly in the onAfterRemoveLiquidity function within the UpliftOnlyExample contract.
In the onAfterRemoveLiquidity function, the feePerLP is incorrectly calculated using localData.lpTokenDepositValueChange. This is wrong because lpTokenDepositValueChange represents the change in the value of the LP tokens since the deposit, which should not be used for fee calculation.
The fee should be based on the deposited value, not the change in the deposit value of LP tokens, leading to an incorrect fee calculation.
The feePerLP variable will be calculated incorrectly, resulting in an erroneous fee being applied.
Incorrect fee will be applied.
Manual Review
change the localData.lpTokenDepositValueChange to
1.localData.lpTokenDepositValueor
2.localData.lpTokenDepositValueNow.
Use one of the two value of lpTokenValue. As required.
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.