The UpliftOnlyExample contract's position transfer mechanism allows users to evade uplift fees on profitable positions by manipulating the deposit value transfers.
The issue lies in the UpliftOnlyExample contract's afterUpdate method, which manages NFT transfers between addresses. The contract attempts to mitigate deposit/withdrawal attacks with a minimum charge, but this does not provide effective protection 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.