Liquidity management hook on Avalanche
Uniswap v4 Hook Contract 0x7478a9701ac0c127eb2450294ddd78c79259c040 on Avalanche · Liquidity management
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $1.99
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 1
What it does
A Uniswap v4 hook that runs custom logic after swaps and manages its own liquidity positions by unlocking the PoolManager and moving currency, based on unverified decoded bytecode.
How it works step by step
- Enables only the afterSwap callback among the v4 hook points
- Self-unlocks the PoolManager through unlock and unlockCallback to perform accounting
- Uses take and ERC20 transfer/transferFrom to move tokens during its callback flow
- Stores pool key fields and tick-range position data in low storage slots
- Exposes getPositions and getConfig views to read its tracked positions and settings
- Swap behaviour
- After each swap the afterSwap callback runs; it may unlock the PoolManager to take or settle currency, but the exact logic is not confirmed without source.
- Liquidity behaviour
- The hook exposes beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity callbacks as view stubs, but only afterSwap is enabled by the address permissions, so liquidity changes are not hooked. Storage slots for position ranges (int24 ticks, uint128 liquidity) and getPositions() suggest the contract tracks positions internally and can self-unlock the PoolManager to move currency via take/transfer.
- Fee behaviour
- No fee logic identified in decoded functions; the hook only runs after swaps and does not change the pool's fee.
- Owner & admin controls
- An owner (owner() selector present) can call initialization-style functions af8c72ad, d1aae7be, eb0b7605 and f243b5d0 that write to storage slots 0-4, which appear to set pool configuration (token pair, fee, tick spacing, hook address) and position data. No pause or upgrade mechanism identified.
Enabled Uniswap v4 callbacks
afterSwap
afterSwap is the only enabled callback; it is used to run custom logic after each swap, which in this bytecode appears to involve unlock callbacks that move currency.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: An owner key appears to control pool and position configuration through the nonpayable setup selectors, and could potentially redirect how position funds are managed.
Risk to user funds: The hook can hold and transfer tokens during the afterSwap flow through PoolManager unlock and take operations, so funds it custodies or is approved for could be moved by its logic; exact conditions are not determinable from bytecode alone.
Security findings
- [medium] Hook moves currency via self-unlock: The contract calls unlock and take on the PoolManager and uses transferFrom and transfer, so it can move token balances it holds or is approved for.
- [medium] Owner-driven reconfiguration of pool and positions: Several nonpayable functions write to the same low storage slots that hold pool key and position fields, indicating owner-driven reconfiguration after deployment.
- [info] Unverified source code: Without verified source, the exact logic of afterSwap and the unlockCallback flow cannot be confirmed.
Contract details
- Verified source
- No
- Bytecode size
- 15,451 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, self-unlock
Pools using Liquidity management hook
- MIM / USDC (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today