WTDLiquidityManager Contract

The WTDLiquidityManager contract manages Uniswap v4 liquidity pool positions for the WTD/USDC pair. It allows the admin to lock LP NFT positions for a specified duration (or eternally) and collect trading fees while the liquidity remains locked.

Key Features

  • Position locking — Lock Uniswap v4 LP NFTs with a specified unlock time

  • Eternal locks — Lock positions permanently (unlock time = max uint256)

  • Fee collection — Collect accumulated trading fees without removing liquidity

  • Pool verification — Only accepts positions from the correct WTD/USDC pool

Pool Configuration

Parameter
Value

Pair

WTD / USDC

Fee

0.30% (3000 pips)

Tick Spacing

60

Hooks

None

The pool key is determined at deployment by sorting the WTD and USDC token addresses.

How It Works

1

Create pool and liquidity

Create the pool and add liquidity via the Uniswap v4 interface (this is external to this contract).

2

Lock the position

Transfer the LP NFT to this contract using lockLiquidity.

3

Collect fees

Collect accumulated trading fees at any time with collectFees while liquidity remains locked.

4

Unlock

After the unlock time has passed, the NFT can be withdrawn. For eternal locks, unlock never occurs.

Uniswap v4                WTDLiquidityManager
PositionManager            (holds NFTs)
     │                          │
     │  NFT transferred in      │
     │◄─────────────────────────│ lockLiquidity()
     │                          │
     │  Decrease 0 liquidity    │
     │  (collect fees only)     │
     │◄─────────────────────────│ collectFees()
     │                          │
     │  NFT transferred out     │
     │◄─────────────────────────│ unlockLiquidity()

Lock Types

Type
Unlock Time
Description

Timed

Future timestamp

Unlockable after the specified time

Eternal

type(uint256).max

Never unlockable — permanent liquidity lock

Access

All functions in this contract require DEFAULT_ADMIN_ROLE. This is an admin-only contract — there are no user-facing functions.

See Admin Guide for detailed function reference.