HookFunHook on Ethereum
Uniswap v4 Hook Contract 0x8216b4f50ced26bc1a8c38d55f3aea88b06ca8cc on Ethereum · Launchpad · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $373
- All-time volume
- $1.81K
- Pools using this hook
- 7
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 149
What it does
HookFun's hook charges a per-launch fee on the pair-asset side of every trade, routes the fee to the launch vault (with optional rule-defined account shares), and runs allowlisted rule modules that can add fees or block swaps for a launched coin's pool.
This read was written for the hook 0xc746…28cc on Base and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Charges the launch's quote-side fee (up to 10%) on buys and sells, with the pool's own LP fee set to zero
- Runs up to six allowlisted rule modules per pool that can add extra fee rates or revert a swap
- Mints fees as ERC-6909 claims: the launch share to the vault ledger, rule-designated account shares to the hook for claim
- Restricts liquidity provision to the vault so third-party range positions cannot bypass the rules
- Disables all rules permanently once a pool reaches its graduation price tick
- Blocks direct pool initialization so pools can only be opened through the vault's launchpad
- Swap behaviour
- On each swap (except vault buybacks), the hook determines the trader, runs the pool's beforeSwap rules to compute an extra fee rate (total capped at 50%), and charges the fee on the quote leg as ERC-6909 claims. Fees are split between the vault ledger and any rule-designated account. After the swap, afterSwap charges the fee on the unspecified quote leg when applicable, updates the price peak, runs rule afterSwap checks, and graduates the pool if the target tick is reached.
- Liquidity behaviour
- Only the vault may add liquidity; beforeAddLiquidity reverts for any other sender, so third parties cannot place range positions that trade without the rules. No remove-liquidity or donate callbacks.
- Fee behaviour
- Each pool has a fixed launch fee (up to 10%) set at initializePool, plus extra rates returned by allowlisted rules per swap; total capped at 50%. The pool's own LP fee is zero and the fee is charged on the pair-asset (quote) leg only, minted as ERC-6909 claims. The launch's share goes to the vault ledger; any rule-designated account share is credited for claim. Fees are not applied to vault buyback swaps.
- Owner & admin controls
- Owner (two-step Ownable) can allowlist or remove rule modules via setRule (affects only future launches, since rules are fixed per pool at initializePool) and set trusted routers via setTrustedRouter (changes whose address is credited as trader in hookData). Owner cannot change any existing pool's fee, rules, or graduation settings, cannot pause swaps, and the hook is not upgradeable. Vault address is immutable; the launchpad is read from the vault.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: reverts for all callers, forcing pool creation through initializePool by the launchpad. beforeAddLiquidity: restricts liquidity provision to the vault. beforeSwap: sets per-swap fee rate by running rule modules and charges the quote-side fee via claim minting, with transient storage carrying the rate into afterSwap. afterSwap: charges the fee on the unspecified quote leg, updates price peak, runs rule afterSwap checks, and triggers graduation when the target tick is reached. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to return the fee amount as a hook delta, offsetting the swapper's settlement.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner cannot touch existing pools' fees or rules and cannot pause trading. The owner can allowlist a malicious rule for future launches (a rule can revert swaps or take extra fees up to the cap) and can designate trusted routers that influence which address is recorded as trader. The vault and launchpad control which pools are created.
Risk to user funds: The hook holds no user tokens directly. Swap-side fees are minted as ERC-6909 claims to the vault and to the hook (for account payees), redeemable by the vault and by accounts via claim. Users' swap value is exposed to the fee rate and to any allowlisted rule that can revert or tax the swap. The hook does not custody user principal outside the PoolManager accounting.
Security findings
- [medium] High aggregate swap fee possible: Each pool's launch fee is up to 10% and rules can add more, capped at 50% of the quote leg per swap. Traders may pay a large portion of the swap in fees, and the rate is set per pool at launch and by rules at swap time.
- [medium] Rule modules can refuse swaps or tax trades: Rules are allowlisted by the owner and can revert swaps in beforeSwap or add extra fees, and a rule may send fees to a designated account. A malicious or buggy allowlisted rule could block or tax trades on pools that use it.
- [low] Trader identity is spoofable via owner-trusted routers and tx.origin fallback: Whether a hookData address is honored as trader depends on owner-trusted routers and the launchpad. Trader attribution otherwise falls back to tx.origin, which can be manipulated by smart contract wallets or relayers and affects per-trader rule logic.
- [info] Fee accounting uses PoolManager claims rather than token transfers: Fee is minted as ERC-6909 claims inside the swap and the hook never transfers coin or quote tokens mid-swap, so a misbehaving quote token cannot block swaps through hook calls. Accrued launch fees sit in vault ledgers, and account claims depend on the hook's ERC-6909 balance and PoolManager accounting.
- [info] Pool rules are immutable after launch: Only the owner-controlled allowlist gates which rule contracts launches can use, and rule-to-pool state is written once at initialization, so existing pool rules cannot be swapped out after launch.
Contract details
- Verified source
- Yes (HookFunHook)
- Compiler
- solc 0.8.30+commit.73712a01
- Bytecode size
- 15,681 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, launchpad, liquidity-management, moves-currency, ownable, return-delta, self-unlock
Pools using HookFunHook
- STONK / SPYon (0.00% fee) — 24h volume $0, TVL $373, 0 swaps today
- ETH / DCAKE (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / WINDOWS (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- CC / NVDAon (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- TEST / UNI (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- TEST2 / TSLAon (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / DCAKE (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today