The UpliftOnlyExample contract's position transfer mechanism allows users to evade uplift fees on profitable positions by manipulating the deposit value transfers.
The vulnerability exists in the afterUpdate function of the UpliftOnlyExample contract, which handles NFT transfers between addresses. The contract attempts to mitigate deposit/withdraw attacks with a minimum fee, but this does not adequately protect against uplift fee evasion:
Comment in code explicitly states the intention:
User deposits when pool value is low (e.g., 1000)
Pool value increases significantly (e.g., to 1500)
User transfers position to another address (possibly self-controlled)
New deposit value is recorded as 1500
If pool value decreases slightly (e.g., to 1400)
System sees this as a loss (-100) rather than actual gain (+400)
Only minimum fee is charged (minWithdrawalFeeBps) instead of the much higher uplift fee (upliftFeeBps)
Assuming:
upliftFeeBps = 500 (5%)
minWithdrawalFeeBps = 50 (0.5%)
Actual profit = 400 (40% gain)
Normal case:
Uplift fee = 400 * 5% = 20 units
Attack case:
Minimum fee = 1400 * 0.5% = 7 units
Fee reduction = ~65% despite position being profitable
The vulnerability allows users to:
Pay only minimum fee (minWithdrawalFeeBps) instead of the higher uplift fee (upliftFeeBps)
Significantly reduce protocol revenue
Create unfair advantage over users paying proper uplift fees
Manual code review
Economic model analysis
Fee calculation simulation
Preserve original deposit context during 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.