Users can weaponize the afterUpdate hook during NFT transfers to dodge paying fees on Up Lifts, since during the hook, it override the lpTokenDepositValue that was previously registered by setting it to lpTokenDepositValueNow tricking the system to have no upLifts by calling removeLiquidityProportional in the same block from their second wallet
During user adding Liquidity, we register the deposit value of LP token here
This is used as a reference value to see how much the value of LP token has increased since deposit when calling removeLiquidityProportional specifically in onAfterRemoveLiquidity Here
But Users can avoid paying that fee by transferring the NFT to other wallet
As you see, we retrieve the current LP Deposit value and override the old one with it and then assign those values to the new owner to in Line 614
Loss of funds to LP providers and QuantAdmin
Manual Review
Don't override deposit value when transferring, or charge fees during transfers (will require complexity since it will require vault.unlock() etc, more gas cost, )
Likelihood: High, any transfer will trigger the bug. Impact: High, will update lpTokenDepositValue to the new current value without taking fees on profit.
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.