The UpliftOnlyExample.sol contract applies an uplift fee only when a user profits from liquidity. However, malicious users can bypass this fee by transferring their lpNFT to their own address, resetting the price to the current BPT price. By doing so, they avoid paying the uplift fee, even after gaining a profit.
The afterUpdate() function is triggered when an lpNFT is transferred. This function resets the base price of the associated lpNFT to the current BPT price. A malicious user can:
Transfer their lpNFT to another wallet, causing the afterUpdate() function to set the profit baseline to the current price.
Remove liquidity from the new wallet without incurring any uplift fee, as the calculated profit becomes zero.
Loss of revenue for the protocol
Less fee for the malicious user
Manual Review
Apply the uplift fee during lpNFT transfers
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.