Submitted by juancito, also found by Bigsam, crypticdefense, tobi0x18, rspadi, Chinmay, 0x04bytes, KupiaSec, Audinarey, h2134, HChang26, kennedy1030, Ryonen, rbserver, and shaflow2
Users should be able to claim Uniswap fees for their current liquidity position regardless of their pending vestings, or cliff. But most users wont be able to claim those Uniswap fees.
It is also possible that they wont be able to claim their vesting if they accumulate sufficient unclaimed Uniswap fees.
The root issue is that the claim() function collects ALL the owed tokens at once, including the ones from the burnt liquidity, but also the fees corresponding to ALL positions:
https://github.com/code-423n4/2024-06-vultisig/blob/main/src/ILOPool.sol#L246-L247
Then the platform fees are sent alongside the Uniswap fees from the users that still didnt claim amountCollected - amount:
https://github.com/code-423n4/2024-06-vultisig/blob/main/src/ILOPool.sol#L252-L260
The next time a user calls claim(), pool.collect() will not contain any Uniswap fees as all of them have already been claimed and sent to the first claimer and the rest to the fee taker. If the platform fees are enough to cover the owed fees for the claiming user, the transaction might succeed (this may be possible if the burnt liquidity is enough).
As time passes, more fees will be accumulated, and when Uniswap fees > platform fees, the transaction will also revert even for unclaimed vestings with liquidity to burn. In addition, in most cases after the initial vesting, users wont be able to claim Uniswap fees, as no fees will be collected, and the contract doesnt hold those assets (they have been sent to the fee taker).
This POC shows how after one user claims their share of the fees, there are no more fee tokens to collect for the next claims, and the transactions revert.
Heres an suggestion on how this could be solved. The idea is to only collect() the tokens corresponding to the liquidity of the tokenId position. So that the next user can also claim their share.
Uniswap
0xsomeone (judge) commented:
Haupc (Vultisig) confirmed
