Liquidity management hook on BNB Chain

Uniswap v4 Hook Contract 0x908f616c1e0384bc84cbfe35f74d71196c601040 on BNB Chain · Liquidity management

Volume (24h)
$25
Value locked (TVL)
$101
All-time volume
$5.17K
Pools using this hook
1
Swaps (24h)
16 (14 traders)
Total swaps
1,391

What it does

A liquidity-management hook that runs a self-managed concentrated liquidity position for a pool, periodically re-centering the range when price drifts past a threshold and rebalancing inventory through an external router.

How it works step by step

  • Stores the pool key and tracks the pool's current tick range after initialization.
  • Manages its own liquidity position via the unlock callback and modifyLiquidity.
  • Re-centers the position range when price moves beyond a configured rebalance threshold, subject to a cooldown.
  • Uses an exponentially weighted moving average of price movement to inform rebalance decisions.
  • Can rebalance inventory through an external swap router and sync token balances.
  • Can be paused by the owner and includes an owner emergency withdrawal.
Swap behaviour
afterSwap updates internal tracking state (EWMA and tick statistics) after each swap, and rebalancing may route swaps through an external router; traders see the pool's normal swap pricing.
Liquidity behaviour
Before and after add/remove liquidity and donate callbacks are present as selectors; the hook manages its own liquidity position in the pool via a self-unlock flow (unlockCallback and modifyLiquidity) and executeRebalance moves the position range based on the current tick, a threshold in basis points, a cooldown and a range multiplier. It also calls an external swap router (exactInputSingle) to rebalance inventory, using pool tokens held by the hook.
Fee behaviour
Uses the pool's static fee for swap pricing; the hook does not appear to take or redirect fees, so fees accrue to the pool's position liquidity.
Owner & admin controls
Owner (slot 0) can transfer ownership via setOwner, set the keeper address via setKeeper, pause or unpause the hook via setPaused, and call emergencyWithdraw; the owner also appears to configure rebalance parameters through the da19419f setter (cooldown, threshold, range multiplier, max range ticks, EWMA alpha and tick bounds), which is written in storage.

Enabled Uniswap v4 callbacks

afterInitialize, afterSwap

afterInitialize sets up the stored pool key and initial position state; afterSwap updates tracking values (EWMA-style stats and the tick-based parameters) after each swap so the rebalance logic can react to price movement.

Security & trust assessment

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

Who controls it: The owner or keeper can trigger rebalances and withdraw the hook's funds through emergencyWithdraw, and the owner can pause the hook and redirect rebalance parameters, so a privileged key can move the hook's position inventory and change range/threshold settings affecting LP outcomes.

Risk to user funds: The hook holds liquidity in the pool it manages and can move that inventory through rebalances and an owner-triggered emergency withdrawal; LPs who deposit into the hook's position are exposed to owner actions and to losses from rebalancing through the external router, and the owner can pause operations.

Security findings

  • [medium] Owner emergency withdrawal of hook-held funds: emergencyWithdraw is callable by the owner and can move tokens held by the hook out of the pool position and to an address of the owner's choosing.
  • [medium] Owner-tunable rebalance parameters: Owner can change rebalance parameters (threshold, range multiplier, cooldown, max range ticks) that determine how and when the hook moves its liquidity and routes swaps, which can be used to force unfavorable rebalances.
  • [medium] External router dependency during rebalance: The hook calls an external swap router during rebalancing; the router address is stored in an immutable/pure getter, so compromise or misconfiguration of that router could expose the hook's inventory to slippage or sandwiching.
  • [info] Pausable by owner: A setPaused flag blocks liquidity and swap-related operations when set, so the owner can halt the hook's rebalancing and the pool's managed liquidity.
  • [low] Single-step ownership transfer: Ownership transfer via setOwner is a single-step operation with no evidence of a two-step acceptance pattern in the bytecode.

Contract details

Verified source
No
Bytecode size
17,235 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, pausable, self-unlock

Pools using Liquidity management hook