πŸ” CabalV4LiquidityLocker

The CabalV4LiquidityLocker brings secure time-locking and fee collection mechanics to Uniswap V4 positions, adapting to V4's new architecture.

It supports V4-specific Currency types, integrates with the V4 hook mechanism, and manages all V4 LP NFTs locked through the platform.


βš™οΈ Responsibilities

  • Locks Uniswap V4 position NFTs on launch

  • Tracks custom Currency types for both tokens in the pool

  • Enforces strict unlock times (default: 5 years)

  • Enables secure fee extraction using the V4 modifyLiquidities() pattern

  • Distributes earnings to users and the protocol


πŸ’Έ Fee Collection

  • Uses the V4 DECREASE_LIQUIDITY + TAKE_PAIR actions to collect

  • All collected fees are split:

    • 50% to the position owner

    • 50% to the protocol (configurable)

  • Supports ETH and ERC-20 based Currency values

  • Users can call collectFees(tokenId) or collectAllUserFees()


πŸ” Security & Admin

  • Only authorized V4 helper contracts can initialize positions

  • Locker verifies NFT ownership before accepting or unlocking

  • Owner can recover stuck ETH or ERC-20 tokens using emergencyRecover*() functions


🧠 Design Philosophy

  • LP tokens remain non-withdrawable until unlockTime passes

  • Supports complex V4 flows while keeping usage simple

  • Emits detailed logs: FeesCollected, PositionLocked, PositionUnlocked


Both lockers are essential to The Cabal's decentralized token launch flow β€” bringing security, transparency, and trust to every deployment on Base.

Last updated