The calculation of localData.lpTokenDepositValueChange
in function onAfterRemoveLiquidity()
will have unexpected behaviour. Unless the pool value increases in increments of 100%, value changes will be supressed:
If value increases by 90% -> localData.lpTokenDepositValueChange
== 0
If value increases by 100% -> localData.lpTokenDepositValueChange
== 1
If value increases by 190% -> localData.lpTokenDepositValueChange
== 1
If value increases by 200% -> localData.lpTokenDepositValueChange
== 2
If value increases by 290% -> localData.lpTokenDepositValueChange
== 2
... and so on
If pool value increases by 99% feePerLP
will be charged as the base fee. All succeding fee variables will take into acocunt the base fee instead of a corresponding uplift fee: localData.feeAmount
, localData.feePercentage
, exitFee
, localData.accruedQuantAMMFees[i]
, localData.accruedFees[i]
.
Consider measuring value changes in terms of BIPS.
Likelihood: High, every call to the function (withdraw) Impact: Low/Medium, uplift fees will be applied only when the price of one asset is doubled but fixed fees will still be collected.
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.