Uniswap V3: When collect() Is More Than “Collect Fees”

Published: (February 5, 2026 at 06:11 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Overview

Uniswap V3 introduced concentrated liquidity, NFTs for positions, and a much more expressive — but also more subtle — event model. One consequence of this design is that on‑chain events can be perfectly correct, yet still semantically confusing for end‑users.

The “Collect” Action

Common Assumption

For many users (and even some dashboards):

collect() = collect earned fees

What a Uniswap V3 Position Represents

  • Liquidity
  • Fee growth inside the tick range
  • Last fee checkpoints

Typical Exit Flow

  1. decreaseLiquidity()
  2. collect()

Key Nuance

collect() can bundle two different things:

  • Accrued fees (actual yield)
  • Leftover liquidity (principal being returned)

This occurs especially when:

  • Liquidity is fully removed
  • The position is closed
  • Amounts remain owed to the position

From the protocol’s point of view, this is perfectly valid:

  • Everything owed to the position is paid out
  • All values are emitted correctly in event logs

However, fees and principal are very different concepts semantically.

Protocol vs. User Perspective

Most explorers (Etherscan included) handle the log level correctly:

  • Decode Collect events faithfully
  • Display the amounts emitted by the contract
  • Label the action according to the function/event name

The problem is not decoding accuracy; it is the gap between log‑level correctness and user‑level semantic clarity.

User‑Facing Ambiguity

  • “Collect: 12,000 USDC”
  • vs. “Fees earned: 1,200 USDC” & “Liquidity returned: 10,800 USDC”

Without protocol context, these meanings are indistinguishable.

Decoding Challenges

You cannot reliably separate fees from liquidity by decoding a single event. To do this correctly you must:

  1. Decode all event logs in the transaction.
  2. Detect the removeLiquidity event and the collect event.
  3. Extract the “Liquidity return” and the “Fee earned” amounts from the collect event.

Events remain low‑level and composable; meaning emerges only when state is reconstructed. This creates UX gaps between “what happened” and “what users think happened”.

Implications for Data Builders

  • Accurate decoding is the baseline.
  • Building higher‑level semantics requires aggregating multiple events and reconstructing state.

Resources

  • Transaction decoding API – standardizing blockchain data into one unified, readable schema on Ethereum, Base, BSC, Solana
    • Website:
    • X (Twitter):
    • Telegram:
    • Announcements:
    • Medium:
Back to Blog

Related posts

Read more »