Likely liquidity management hook on Unichain

Uniswap v4 Hook Contract 0x74c3c5743a9adade396538fd563c4934d0a7d5c0 on Unichain · Liquidity management

Volume (24h)
$0.78
Value locked (TVL)
$16
All-time volume
$1.20K
Pools using this hook
2
Swaps (24h)
2 (2 traders)
Total swaps
2,127

What it does

Lets each user place a grid of up to 500 concentrated liquidity positions in a Uniswap v4 pool and rebalance it around the current price.

This read was written for the hook 0xb648…95c0 on Base and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Stores per-user grid configuration (spacing, order count, distribution type, rebalance threshold, slippage limits) per pool.
  • Deploys a grid of up to 500 liquidity positions across ticks centred on the current pool tick, sized by a chosen weight distribution.
  • Rebalances a deployed grid around the new centre tick when price has moved beyond the configured threshold, subject to a 60-second cooldown and a same-block-as-swap guard.
  • Closes a grid by removing all positions and returning tokens to the user.
  • Tracks pool tick and swap counts from afterInitialize and afterSwap, and reverts swaps that move the tick by more than 500 in a block.
Swap behaviour
beforeSwap records block-level swap metadata and afterSwap checks that the tick moved no more than 500 in one block, reverting otherwise; swaps are otherwise unaffected and no delta is taken.
Liquidity behaviour
Each user deploys a grid of up to 500 concentrated liquidity positions, one per tick interval, around the current pool tick via poolManager.modifyLiquidity. Deploy places liquidity and settles token amounts from the user through Permit2 or ETH value. Rebalance removes all orders and redeploys them around the new centre tick, subject to a cooldown and a tick-threshold check. Close removes all liquidity and returns tokens to the user.
Fee behaviour
Uses the pool's static fee; the hook does not set or take fees, and returns zero delta from all callbacks.
Owner & admin controls
No owner or pause role. Each user manages their own grid config and can authorize keepers via setRebalanceKeeper; keepers can only call rebalance for users who opted in. The pool manager address and permit2 are immutable.

Enabled Uniswap v4 callbacks

afterInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap

afterInitialize records pool initialisation and current tick. afterAddLiquidity and afterRemoveLiquidity return zero deltas only. beforeSwap records the start tick and swap count per block for the same-block rebalance guard. afterSwap updates the current tick, emits an event, and reverts if the in-block tick movement exceeds 500 ticks.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, high confidence).

Who controls it: No privileged owner key exists, so no single key can alter user funds. Authorised keepers can trigger rebalances of a user's grid, which moves that user's liquidity to a new range but cannot withdraw tokens to a third party.

Risk to user funds: Users' grid liquidity sits in the pool under the hook as owner and can be moved by the user or an authorised keeper. The hook does not custody tokens beyond settlement within a single unlock. Swaps through the pool can revert when price impact exceeds the per-block cap, which can block trading in that pool.

Security findings

  • [info] Keeper rebalance authority: Rebalance and close use the user's own address as the settlement destination, and keeper rebalance requires explicit user authorization via setRebalanceKeeper.
  • [medium] Pool-wide swap revert on price impact: afterSwap reverts any swap whose resulting tick move within a block exceeds 500 ticks, so large-impact trades in a single block fail for all users of the pool, not just grid users.
  • [low] Hook acts as LP owner of user positions: Deploy and rebalance settle using token transfers from the user via Permit2 and take tokens to the user with poolManager.take; the hook holds positions as the pool owner and transiently holds no user funds beyond the unlock call.
  • [info] ETH refund and reentrancy handling: Rebalance and close functions read and write storage keyed by msg.sender or the explicit user; ETH refunds use a low-level call to msg.sender after the operation, guarded by a transient reentrancy lock.

Contract details

Verified source
No
Bytecode size
23,171 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, self-unlock

Pools using Likely liquidity management hook