QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: high
Valid

Uplift Fee Bypass Through Token Transfer

Summary

The UpliftOnlyExample contract allows users to bypass uplift fees by transferring LP NFTs between their own wallets, as the position value is reset without charging profit fees during transfers.

Vulnerability Details

In the afterUpdate function of UpliftOnlyExample.sol, when an LP token is transferred between addresses, the contract updates the deposit value to the current value without applying any uplift fees:

function afterUpdate(address _from, address _to, uint256 _tokenID) public {
// ... existing code ...
uint256 lpTokenDepositValueNow = getPoolLPTokenValue(prices, poolAddress, MULDIRECTION.MULDOWN);
// ... existing code ...
if (tokenIdIndexFound) {
if (_to != address(0)) {
// Update the deposit value to the current value of the pool in base currency (e.g. USD) and the block index to the current block number
//vault.transferLPTokens(_from, _to, feeDataArray[i].amount);
feeDataArray[tokenIdIndex].lpTokenDepositValue = lpTokenDepositValueNow;
// ... existing code ...
}
}
}

The vulnerability exists because:

  1. The transfer resets the position's deposit value to the current value

  2. No profit fees are charged during the transfer

  3. Users can maintain their actual position value while avoiding fees by transferring between their own wallets

This creates a significant economic exploit where users can:

  1. Accumulate profits in their position

  2. Transfer the LP token to another wallet they control

  3. Reset their profit tracking without paying any fees

  4. Remove liquidity without paying any fees

Impact

Loss of yield - The protocol and liquidity providers lose fee revenue as users can systematically avoid paying uplift fees on their profits through transfers.

Tools Used

Manual Review

Recommendations

Consider not updating the deposit value during transfers. This would allow profit to persist and but the obligation to pay fees on the recipient. As long as it is documented that the recipient will be charged fees on whatever profit the position has this would be a valid solution.

Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding_afterUpdate_bypass_fee_collection_updating_the_deposited_value

Likelihood: High, any transfer will trigger the bug. Impact: High, will update lpTokenDepositValue to the new current value without taking fees on profit.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.