Liquidity management hook on Polygon

Uniswap v4 Hook Contract 0x989bdc9f8e37c79e3a71da7f68f6059a1116e888 on Polygon · Liquidity management

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
1
Swaps (24h)
1 (1 traders)
Total swaps
1

What it does

This hook runs a managed vault around a v4 pool that accepts deposits and sells shares, with dynamic fees on swaps set by owner-controlled parameters, but the owner and managers can pause trading, rebalance, freeze and burn accounts, and rescue all assets.

How it works step by step

  • Acts as a managed multi-asset vault wrapped around a Uniswap v4 pool, tracking NAV, cash, holdings and a share token supply.
  • Uses beforeSwap to apply a dynamic fee or return delta on swaps, and beforeInitialize/beforeAddLiquidity to gate pool setup and deposits.
  • Supports redemption of shares for cash or in-kind assets via redeemInKind, with an exit limit and redeem fee in basis points.
  • Maintains per-asset price feeds and paths (setFeed, setPaths, addAsset, removeAsset) and rebalances holdings through the router (rebalance, rebalanceAll).
  • Includes a freeze list, manager role, pause switch, cap and minimum deposit, plus burnFrozen and rescueAll for recovering assets.
Swap behaviour
beforeSwap is implemented and can return a before-swap delta, so the hook can alter swap amounts or take currency during swaps; the exact pricing rule cannot be fully determined without source, and swaps are blocked while the contract is paused.
Liquidity behaviour
beforeAddLiquidity is enforced: deposits are subject to minimum deposit, cap, pause and possibly a mint fee. Liquidity removal (beforeRemoveLiquidity) is not a permission on this hook, so withdrawals go through the vault's redeem functions instead.
Fee behaviour
Dynamic: the hook has a dynamic-fee tag and exposes mintFeeBps and redeemFeeBps (bounded by MIN/MAX fee constants), with breakerBps and maxSlippageBps guarding price moves. Exact swap fee schedule not verifiable from bytecode alone.
Owner & admin controls
Owner (Ownable with two-step transfer: transferOwnership, acceptOwnership, renounceOwnership) can set parameters (setParams, setExitLimit, setWeights), feeds and paths, managers, frozen accounts, pause state, and call rescueAll. Managers can call rebalance functions and burnFrozen. No timelock or upgradeability was detected in the selectors.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize: validates and initialises the pool. beforeAddLiquidity: gates deposits and enforces cap and minimum. beforeSwap (with return delta): adjusts swap pricing or fees and can take currency. beforeSwapReturnDelta: lets the hook return a delta that changes swap amounts.

Security & trust assessment

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

Who controls it: A single owner key can change fees, weights, feeds, paths, pause state, manager and freeze lists, and rescue all tokens; managers can rebalance and burn frozen balances. This is a highly centralised design.

Risk to user funds: The hook holds the vault's assets and can move them via rebalance, rescueAll, burnFrozen and in-kind redemptions. User funds are exposed to owner and manager actions and to oracle and router risk.

Security findings

  • [high] Owner can rescue all assets: rescueAll(address) lets the owner move the vault's tokens to an arbitrary address, which can drain user backing if the key is compromised or misused.
  • [high] Frozen accounts can be burned: burnFrozen and setFrozen let privileged roles freeze an account and destroy its shares, so holder balances depend on admin discretion.
  • [medium] Return-delta swap hook: beforeSwapReturnDelta with currency movement means the hook can take or redirect swap value, and its pricing depends on owner-set feeds and weights.
  • [medium] Pausable and privileged rebalancing: setPaused can halt swaps and deposits, and managers can rebalance holdings through the router, moving pool liquidity between assets.
  • [medium] Oracle dependence: Pricing relies on per-asset feeds set by the owner (setFeed), with staleness and price-move checks; a bad feed affects NAV and swap pricing.

Contract details

Verified source
No
Bytecode size
24,407 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, erc20, liquidity-management, moves-currency, ownable, pausable, return-delta, self-unlock

Pools using Liquidity management hook