Users can bypass the “uplift” fee—meant to charge them whenever the pool’s value has grown since their original deposit—by simply transferring their NFT to a new address before withdrawing.
This transfer resets the recorded “deposit value” to the pool’s current, higher price(lpTokenDepositValueNow), thereby nullifying any accrued fee from earlier gains. As a result, the user ends up paying no uplift fee when they remove liquidity, even if the pool has significantly increased in value since their true deposit time.
The key code is in the afterUpdate(...) function of UpliftOnlyExample, which is called whenever an NFT is transferred. Notice how the original lpTokenDepositValue (the baseline price used to calculate uplift fees) gets overwritten with the latest pool value:
Because lpTokenDepositValue gets set to lpTokenDepositValueNow, the system treats the new owner as if they just deposited at the updated, higher price. Any earlier price growth that happened while the old owner held the NFT is effectively erased from the fee calculation.
Notice when the user withdraws his funds by calling removeLiquidityProportional, BalancerV3`s Vault will trigger
onAfterRemoveLiquidityand it is here that fees are calculated and applied in case the LP value has grown over time.
Now that the user has his NFT with the current lpTokenDepositValue, the contract thinks that the LP value has remained/decreased over time.
User skips all the protocol fees applied on gains over time.
In a nutshell, the scenario to bypass is quite simple:
User transfers his NFT to a secondary address
User withdraw funds.
That's it.
The protocol relies on these uplift fees for revenue. Thus the loss of funds for the protocol.
Honest users who do not realize they can reset their baseline effectively pay more, while malicious users or arbitrageurs pay none.
Likelihood: High, Impact High, therefore submitting it as a High.
Manual Review
If a transfer should reset the baseline for the recipient, then the protocol should first charge the current “uplift” fee to the outgoing owner, ensuring they can’t escape fees accrued up to that point.
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.