Titan LockerTITAN
All articles

How to Collect Uniswap V3/V4 Trading Fees on a Locked Position

How to collect the trading fees a locked Uniswap V3 or V4 position keeps earning on Titan Locker (Robinhood Chain) - what collectFees() actually does on-chain, where the fees go, and why it doesn't touch your locked principal.

Published · Last reviewed · Titan Locker

Locking a Uniswap V3 or V4 position on Titan Locker (Robinhood Chain, chain ID 4663) locks the principal, not the trading fees it keeps earning. The lock owner can call collectFees() on the lock at any time - before, during, or after the unlock countdown - and every collected fee goes straight to the owner's wallet, never through the lock contract or Titan Locker itself. This only applies to V2 (position-based) locks holding a Uniswap V3 or V4 position; V1 locks and plain Uniswap V2 LP-token locks don't have this button, for reasons covered below.

Why locking a position doesn't mean giving up its fees

A Uniswap V3/V4 position is a concentrated-liquidity NFT that keeps accruing trading fees the whole time it provides liquidity, regardless of who holds it or whether it's locked. Titan Locker's lock contract holds the NFT itself, but exposes a collectFees() function the lock owner can call to pull the accrued fees out - without withdrawing, unlocking, or otherwise disturbing the position. Locking a position to prove long-term commitment and continuing to earn its fee income aren't in tension; the contract is built so you get both.

Step by step: collecting fees on Titan Locker

  1. Open the lock's certificate page - find it via /locker, or search by the position manager address if you don't have the direct link.
  2. Connect the wallet set as the lock's owner. Only that address can call collectFees(); anyone else sees a read-only message instead of the button.
  3. Click "Collect trading fees" and confirm the transaction in your wallet.
  4. Once confirmed, the accrued fees (in both of the pool's underlying tokens) have already landed in the owner's wallet - there's no separate claim or withdrawal step afterward.

What collectFees() actually does on-chain

The lock contract handles V3 and V4 differently under the hood, since their position managers expose fee collection differently - but both send funds directly to the lock owner, with the lock contract itself never taking custody of the collected tokens even momentarily.

Uniswap V3Uniswap V4
MechanismCalls the position manager's own collect(), requesting the maximum available amount of each tokenCalls modifyLiquidities() with a zero-amount decreaseLiquidity (which realizes pending fees without touching principal) followed by a take of both currencies
RecipientThe lock owner's wallet, directlyThe lock owner's wallet, directly
Touches principal?No - only accrued fees moveNo - the liquidity decrease is explicitly for zero, only realizing fees
Native ETH handlingN/A - V3 wraps ETH as WETHCan send native ETH directly if that's one of the pool's currencies

How much do you get - everything available, or a set amount?

Always the maximum available. On V3, the lock requests collection up to the position manager's own maximum per-token amount, which in practice means every fee currently accrued to the position - there's no way to collect a partial or custom amount through Titan Locker. Same outcome on V4: the zero-liquidity-decrease step realizes all pending fees before the take. If you want to leave some fees uncollected for any reason, the only option is not to call collectFees() yet - there's no partial-collection parameter.

Do you need to wait for the position to unlock?

No. collectFees() has no unlock-time check at all - it's callable any time the position NFT is still held by the lock contract, whether the countdown is still running, has already reached zero, or the position simply hasn't been withdrawn yet. The only gate is ownership: the connected wallet must be the lock's owner.

Why V1 locks and Uniswap V2 LP-token locks don't have this button

V1 predates Titan Locker's position-lock support entirely - it only ever holds plain ERC-20 balances, so there's no NFT position to collect fees from. A Uniswap V2-style LP token is different again: its trading fees compound automatically into the LP token's own value as reserves grow, rather than accruing separately and needing a claim step - so there's nothing to "collect" independently of the token itself. collectFees() exists specifically because V3/V4 positions are the one asset type Titan Locker locks where fees genuinely accrue as a separate, claimable amount.

Common mistakes

  • Assuming you need to unlock or withdraw the position first - collectFees() works independently of both.
  • Expecting a partial-collection option - there isn't one; every call collects everything currently accrued.
  • Trying to collect fees from a wallet other than the lock owner's - the button and the underlying call are both owner-gated.
  • Looking for a collect-fees button on a plain Uniswap V2 LP-token lock - that fee mechanism doesn't apply there; see the comparison article above for why.

Security notes

  • Fees are sent directly from the Uniswap position manager to the lock owner's wallet - Titan Locker's lock contract never holds or routes the collected tokens itself.
  • collectFees() only ever touches the one position NFT that specific lock holds (its immutable token ID) - it can't reach any other lock's position or fees.
  • Calling collectFees() has no effect on the unlock time or the locked principal - it's purely a fee-claim action.

Frequently asked questions

Do I need to unlock my Uniswap V3/V4 position before collecting its fees?

No. collectFees() has no unlock-time check - it's callable any time the position is still held by the lock, whether it's still counting down, already past its unlock time, or not yet withdrawn.

Where do the collected trading fees go?

Directly to the lock owner's wallet. Neither the lock contract nor Titan Locker ever takes custody of the collected tokens, even momentarily.

Can I collect only some of the accrued fees instead of all of them?

No. Both the V3 and V4 code paths always request the maximum amount currently accrued - there's no partial-collection option through Titan Locker.

Does collecting fees affect my locked principal or unlock time?

No. Only the accrued trading fees move. The position's underlying liquidity and the lock's unlock time are both untouched.

Can I collect fees the same way on a Uniswap V2 LP-token lock?

No. A Uniswap V2 LP token's trading fees compound automatically into the token's own value rather than accruing separately, so there's no collectFees() equivalent for it - that button only appears for Uniswap V3/V4 position locks.