Liquidity management hook on Polygon

Uniswap v4 Hook Contract 0xf939097d78efb5966deb6ee6701e1b6acff7c040 on Polygon · Liquidity management

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

What it does

An afterSwap hook that appears to manage liquidity positions for a pool by rebalancing or collecting them after each swap, using a self-unlock flow to move tokens, though the exact behaviour cannot be confirmed without source.

How it works step by step

  • Enabled afterSwap callback runs after every swap on the pool
  • Reads and writes position and pool-state storage slots after each swap
  • Calls unlock and unlockCallback to perform token-moving operations inside the PoolManager
  • Uses take and transfer to move currency to or from the hook
  • Exposes getPositions and getConfig views describing managed positions
  • Has an owner() getter, suggesting privileged configuration
Swap behaviour
Only afterSwap is called: after each swap it reads position state and may update or rebalance managed positions, moving currency through the unlock callback.
Liquidity behaviour
Liquidity callbacks are not enabled in the hook permissions, so beforeAddLiquidity and afterRemoveLiquidity are not invoked by the PoolManager. The contract nonetheless exposes unlockCallback and self-unlock logic, and the bytecode references take, transfer and transferFrom, which indicates it can add or remove liquidity or move tokens through its own unlock flow.
Fee behaviour
Only afterSwap is enabled, so fees are not set by this hook; the pool's configured fee applies. The hook may manage or collect position fees through its own position storage, but this could not be confirmed.
Owner & admin controls
An owner address is stored (owner() selector present) and the contract has pool-configuration and position-management entry points (0x604a57e1, 0xaf8c72ad, 0xeb0b7605, 0xf243b5d0 write to storage slots 0-6). Whether these are owner-gated cannot be confirmed without source; no explicit pause or upgrade function was identified.

Enabled Uniswap v4 callbacks

afterSwap

afterSwap is the only enabled callback; it reads pool and position state (slots 1-9) and writes slot 1 and the position fields, likely to record or rebalance positions after each swap.

Security & trust assessment

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

Who controls it: An owner key appears to control hook configuration and managed positions. A privileged key could redirect position management, change the stored pool/position parameters, or withdraw tokens the hook holds via take and transfer calls.

Risk to user funds: The hook can hold and move tokens through take, transfer and transferFrom during its unlock callback, so funds it custodies for managed positions are exposed to its logic and to the owner key. Pool LPs using this hook depend on that custody being correct.

Security findings

  • [medium] Hook moves currency via self-unlock: The hook uses unlockCallback with unlock, take and transfer, so it can move pool and token balances on its own behalf during afterSwap-triggered rebalancing.
  • [medium] Owner-controlled position configuration: Storage writes in the owner-set slots and an owner() getter suggest a single privileged account controls configuration and managed positions.
  • [info] Reentrancy guard present: ReentrancyGuard and SafeERC20 errors are present, indicating some reentrancy and transfer-safety protection.
  • [info] Unverified source: No source is verified, so function semantics, owner gating and upgrade paths are inferred from selectors and storage only.

Contract details

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

Pools using Liquidity management hook