Verification checklist
- Ask whether Position.update has run. Once growth records 3000, both tokensOwed values are still 0 before the poke.
- The denominator is the in-range liquidity 1000000, not one position. After the poke the 250000 position is credited 749, not 3000 and not 750.
- The 750000 position is credited 2249. The two credits sum to 2998. A direct share of 3000 is 750 and 2250.
- The same 250000 with a lower tick of 120, while the current tick is 0, has an inside delta of 0. After the poke, tokensOwed is still 0.
1. tokensOwed is a checkpoint. Growth is accumulated somewhere else
Position.sol at v1.0.0 splits fee state in two. The comment on feeGrowthInside0LastX128 and feeGrowthInside1LastX128 calls them the fee growth per unit of liquidity inside the position, as of the last update to liquidity or to fees owed. tokensOwed0 and tokensOwed1 are the fees owed to the position owner. The first pair is a checkpoint. The second pair is the balance already settled from that checkpoint. A fee enters feeGrowthGlobal, Tick.getFeeGrowthInside turns that into growth inside the range, and only Position.update turns the difference into tokensOwed.
update subtracts the position's Last from the current feeGrowthInside, multiplies by the liquidity before the update, and divides by 2^128. FullMath.mulDiv floors. Last is then overwritten with the inside value just used. A liquidityDelta of 0 still settles fees when the existing liquidity is above 0. A position with zero liquidity reverts with NP, so an empty position cannot be poked. Reading tokensOwed without calling update shows whatever was left after the previous settlement.
This is not the question in Fee Check: The Pool Fee Tier Is Not the Cut LPs Keep. That note splits a gross fee of 3000 into the 2250 or 2500 liquidity providers keep, depending on the protocol denominator. This note starts from the amount that is about to be written into growth. The teaching figure is 3000 so the floors below stay visible. It does not recompute that earlier protocol split.
2. The 3000 is divided by the 1000000 the pool is using
UniswapV3Pool at v1.0.0 writes the liquidity-provider fee, after the protocol cut, as growth: fee times 2^128, divided by the current state.liquidity, floored with mulDiv, and added to feeGrowthGlobal. The denominator is the liquidity the pool is using. It is not one position's liquidity, and it is not the sum of liquidityGross. Gross writes one position onto two ticks. That is the question in Liquidity Check: Gross on Four Ticks Sums to 2800, and the Pool Is Using 1000. The 1000000 in this note is the denominator of this one write.
Position A has liquidity 250000 between tick -60 and tick 60. Position B has liquidity 750000 between tick -120 and tick 120. The current tick is 0, and the fee tier's spacing is 60, so every boundary is a multiple of 60. Tick 0 is at or above each lower bound and below each upper bound, so both positions are inside and the pool is using 1000000. The token0 fee written into growth is 3000. The delta is floor(3000 times 2^128 divided by 1000000), which is 1020847100762815390390123822295304634. No token1 fee is written, so that side of growth stays 0.
If one position owned the whole 1000000, the later poke would credit floor(delta times 1000000 divided by 2^128), which is 2999. The missing 1 is the first division. It is not a second protocol cut, and it is not a third position left out of the sum.
| Position | Liquidity | Bounds | tokensOwed0 before the poke | tokensOwed0 after the poke |
|---|---|---|---|---|
| A | 250000 | -60 to 60 | 0 | 749 |
| B | 750000 | -120 to 120 | 0 | 2249 |
3. Inside growth is already there. The position still owes 0
Tick.getFeeGrowthInside at v1.0.0 chooses each side from the current tick. When the tick is at or above the lower bound, growth below is the lower tick's feeGrowthOutside. Otherwise it is global growth minus that outside value. When the tick is below the upper bound, growth above is the upper tick's outside value. Otherwise it is global growth minus the upper outside value. Inside growth is global, minus below, minus above.
At the mint, global growth is still 0. The comment on Tick.update says that growth before a tick was initialized is assumed to have happened below that tick. feeGrowthOutside is copied from the current global only when the initialized tick is at or below the current tick. The teaching lower ticks -120 and -60 are at or below 0, so the copied value is 0. The upper ticks 60 and 120 are above 0, so their outside values stay 0. After the fee is written, position A at tick 0 has 0 at or above -60, so below is 0, and 0 is below 60, so above is 0. The inside delta is the whole 1020847100762815390390123822295304634. Position B also has 0 at or above -120 and below 120, so its inside delta matches.
That inside value is a view. It does not write the position. Last on both positions is still the 0 from the mint, tokensOwed0 is still 0, and tokensOwed1 is still 0. A display that labels tokensOwed as uncollected fees prints 0 here, next to growth that already records 3000. The 0 means the checkpoint has not moved. It does not mean the fee never happened.
4. After the poke the credits are 749 and 2249, not 750 and 2250
The poke is Position.update with liquidityDelta 0. Position A uses its pre-update liquidity of 250000: delta times 250000, divided by 2^128, floored, is 749. Last moves to the current inside growth, and tokensOwed0 moves from 0 to 749. Position B uses 750000 and is credited 2249. The sum is 2998. The token1 difference is 0, so tokensOwed1 does not increase.
Skipping the fixed-point step and multiplying by the share gives 250000/1000000 times 3000, which is 750, and 2250 for the other position. The contract is short by 1 on each. The shortfall is not the protocol fee. Growth was floored once when it was written, so a single position of the whole 1000000 can collect only 2999. Splitting that remainder across two positions floors again, and 2999 loses one more unit, leaving 2998. Adding 2 back onto 749 and 2249 to restore 3000 repairs a display. It is not the amount the checkpoints can pay.
update multiplies by the liquidity from before the call. Liquidity added in that call does not reach back into growth that already happened. A position minted after the fee was written has old liquidity 0, so the product is 0, while Last is still advanced to the inside growth at that moment. From then on it earns only growth ahead of Last. Multiplying today's liquidity share by historical fees pays the late position for a 3000 that was already allocated.
5. The same 250000, outside the range, is credited 0
Position C also has liquidity 250000, between tick 120 and tick 180, minted before the fee, with the current tick still at 0. Lower tick 120 is above 0, so initialization does not copy global growth into outside, and both outside values stay 0. After the fee, 0 is below 120, so growth below equals the global delta minus 0. Tick 0 is below 180, so growth above is 0. Inside growth is the global delta minus itself, which is 0. The poke multiplies 250000 by 0, and tokensOwed stays 0.
A and C have the same liquidity, and both exist before the 3000 is written. The difference is whether tick 0 sits inside the range. A is credited 749. C is credited 0. Dividing C's 250000 by the pool's 1000000 and multiplying by 3000 writes 750. That 750 is not in the inside delta. getFeeGrowthInside tests the upper bound with a strict less-than: a tick equal to the upper bound takes the outside formula. That matches the mint rule that a tick sitting on the upper bound is not inside the range. The fee in this note happens at tick 0. The price is not moved onto the upper bound.
6. collect spends the checkpoint. It does not recompute growth
collect on the core pool reads tokensOwed, transfers the smaller of the request and the balance, and subtracts that amount from tokensOwed. It does not call Position.update. Collecting from A before the poke transfers 0. Last is still 0, and the inside delta is still there. The next poke still computes 749. collect did not consume the growth.
After the poke, A's tokensOwed0 is 749. collect transfers 749 and the balance returns to 0. A second collect transfers 0. A second poke also adds nothing, because Last now equals the current inside growth. Only a new fee, which pushes inside growth ahead of Last, makes the next update credit a nonzero difference. The unreliable sentence is "tokensOwed is the fee this position earned." The more reliable sentence names the amount written into growth, the in-range liquidity used as the denominator, whether update has run since that write, the position's own liquidity, and whether the current tick is inside the range. In the teaching set the written fee is 3000. Before the poke both owed values are 0. After it they are 749 and 2249, summing to 2998. The out-of-range 250000 stays at 0.
This is an analytical frame. The checkpoint, the floored product, and the fact that a zero liquidityDelta still settles fees come from Position at v1.0.0. The inside-growth branches, and the rule that growth before initialization is treated as below the tick, come from Tick at v1.0.0. Writing growth as the fee times 2^128 divided by the liquidity then in use, and collect spending only tokensOwed, come from UniswapV3Pool at v1.0.0. 1020847100762815390390123822295304634, 2999, 749, 2249, and 2998 are the teaching results of those integer divisions. They are not a pool reading from 6 November 2026, and they are not investment advice.
7. Misreadings that keep coming back
If fee growth records 3000, is tokensOwed 3000 too?
No. The 3000 is first turned into a fixed-point fee-growth delta using pool liquidity 1000000. tokensOwed waits for Position.update, which subtracts the last checkpoint and floors by that position's own liquidity. Before the poke both values are 0. After it they are 749 and 2249, which sum to 2998.
Does multiplying 3000 by 25% and 75% produce 750 and 2250?
A direct share does: 250000/1000000 times 3000 is 750, and 750000/1000000 times 3000 is 2250. The contract first floors 3000 times 2^128 divided by 1000000, then floors again by each position's liquidity over 2^128. The credits are 749 and 2249.
If another 250000 of liquidity sits outside the current tick, does the poke still credit 749?
No. With tick 0 to the left of lower tick 120, getFeeGrowthInside treats the growth as below the range, so the inside delta is 0. After the poke, tokensOwed is still 0.