From c2cfdd3e3e6705ed1b31d5dbb5ad1b41dad6b23e Mon Sep 17 00:00:00 2001 From: Talfao <46968230+talfao@users.noreply.github.com> Date: Fri, 16 Jan 2026 14:00:58 +0100 Subject: [PATCH] Update fee accrual explanation for Uniswap v4 Clarified the behaviour of fee accrual and claims in Uniswap v4, emphasising automatic handling of unclaimed fees during liquidity changes. After testing and exploration of the codebase, the previous message claims that the unclaimed fees are proportionally claimed based on what we remove from the LP position. But based on tests of part of the UNIV4 codebases, the full amount of unclaimed fees for that position is always gathered. --- docs/sdk/v4/guides/liquidity/collecting-fees.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdk/v4/guides/liquidity/collecting-fees.md b/docs/sdk/v4/guides/liquidity/collecting-fees.md index 3892b3c44..0ed5520b2 100644 --- a/docs/sdk/v4/guides/liquidity/collecting-fees.md +++ b/docs/sdk/v4/guides/liquidity/collecting-fees.md @@ -101,7 +101,7 @@ Total fees = Collected + Unclaimed ### Fee Accrual and Credit Changes -**Fee Accrual and Credit:** Uniswap v4 changes how fee accrual is handled when modifying liquidity. In v3, adding or removing liquidity didn't automatically claim fees – you had to call a separate `collect` function to pull out accrued fees. In v4, **accrued fees act like a credit** that is automatically applied or required depending on liquidity changes. Increasing a position's liquidity will **roll any unclaimed fees into the position's liquidity**, and decreasing liquidity will **automatically withdraw** the proportional unclaimed fees for that position. This means that partially removing liquidity in v4 will force-claim the fees earned by that liquidity portion. However, if you want to claim fees without changing liquidity, you can perform a liquidity change of zero (as we'll do in this guide). +**Fee Accrual and Credit:** Uniswap v4 changes how fee accrual is handled when modifying liquidity. In v3, adding or removing liquidity didn't automatically claim fees – you had to call a separate `collect` function to pull out accrued fees. In v4, **accrued fees act like a credit** that is automatically applied or required depending on liquidity changes. Increasing a position's liquidity will **roll any unclaimed fees into the position's liquidity**, and decreasing liquidity will **automatically withdraw** the position's unclaimed fees. However, if you want to claim fees without changing liquidity, you can perform a liquidity change of zero (as we'll do in this guide). ### Why StateView is Required