HookerHook on Ethereum
Uniswap v4 Hook Contract 0xd0b126b653b73bd4ed479a05bfaa643908e1aacc on Ethereum · Launchpad · Verified contract
- 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 opens one ETH pool for an already deployed coin, charges a 1% fee on qualifying buy-side exact-input swaps paid to the launcher, and lets only the launcher withdraw the liquidity.
How it works step by step
- Opens a single ETH/coin pool for a token that was already deployed and whose hook() points at this contract, via the open(address) function callable only by the genesis launcher.
- Seeds the pool with the hook's full coin supply as one concentrated liquidity position from TICK_LOWER up to openTick, owned by the hook itself with no position NFT.
- Charges a fixed 1% fee on exact-input swaps where the coin is currency1 by taking that fee in ETH/currency0 through beforeSwap return delta and sending it to the genesis launcher.
- Allows the genesis launcher to withdraw part or all of the liquidity position to a recipient via pull(uint128,address) or a fallback selector 0x046dd539 wrapping the same logic.
- Routes all pool interactions through unlockCallback with an action code: 1 to add liquidity at open, 2 to remove liquidity and take both tokens to the recipient.
- Restricts liquidity add and remove calls and pool initialization to the hook itself, so outside LPs cannot add or remove liquidity to this pool.
- Swap behaviour
- Swaps are gated by beforeSwap and afterSwap. For exact-input swaps where the coin is currency1 (buying the coin with ETH, or the zeroForOne direction under that ordering), the hook takes 1% of the input in currency0 and sends it to the genesis launcher, so the trader pays 1% more. Exact-output swaps and swaps where the coin is not currency1 return zero delta and pay no hook fee. afterSwap returns zero delta.
- Liquidity behaviour
- Liquidity can only be added in the hook's own open() call and removed through pull(). beforeAddLiquidity and beforeRemoveLiquidity revert with NotHook unless the sender is the hook itself, so third-party LPs cannot provide or withdraw liquidity.
- Fee behaviour
- The pool fee is static at 0 in the PoolKey, and the hook charges its own 1% (FEE_BPS = 100) on qualifying exact-input swaps via beforeSwap return delta, with the fee collected in currency0 and sent to genesis_launcher.
- Owner & admin controls
- No owner or pause function is present in the source. Privileged access is held by the immutable genesisLauncher address, which alone can call open() and pull() and receives all hook fees. The factory and launcher addresses are set once in the constructor and cannot be changed.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool initialization to the hook itself. beforeAddLiquidity and beforeRemoveLiquidity restrict liquidity changes to the hook itself. beforeSwap takes the 1% fee on qualifying exact-input swaps and returns it as a specified delta. afterSwap is implemented but returns zero delta. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to alter swap accounting by taking tokens.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The genesisLauncher can withdraw the entire pool position at will and collect all hook fees, so users depend on that address not acting maliciously.
Risk to user funds: The hook holds the pool's full position and can release the coin supply and ETH liquidity only through genesisLauncher-initiated pull calls; the hook itself takes a 1% fee on qualifying swaps through beforeSwap return delta.
Security findings
- [medium] Launcher can drain the hook's liquidity position: pull() lets genesisLauncher withdraw the full positionLiquidity to any recipient at any time after opening, so the pool's liquidity can be removed by a single privileged caller.
- [low] Hook fee is taken from every qualifying exact-input swap: beforeSwap takes input * 100 / 10000 of currency0 on exact-input swaps where currency1 is the coin and sends it to genesisLauncher, adding a 1% cost to those trades.
- [info] Return-delta permissions allow the hook to take tokens from swaps: beforeSwapReturnDelta is enabled, so the hook's returned delta changes what the swapper owes; the amount is capped by the input size and checked against exact-in/out direction.
- [info] Fallback selector bypasses normal function dispatch: A fallback handles selector 0x046dd539 with abi-decoded arguments, and _pull checks msg.sender against genesisLauncher, so access control remains intact but the surface is unusual.
Contract details
- Verified source
- Yes (HookerHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 9,430 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, launchpad, moves-currency, return-delta, self-unlock