LaunchHook on Base

Uniswap v4 Hook Contract 0xa068cf4c52abdd3479145c4b3cbd8e3d71542a44 on Base · Dynamic fee · Verified contract

Volume (24h)
$322
Value locked (TVL)
$10.28K
All-time volume
$7.84M
Pools using this hook
5,233
Swaps (24h)
30 (22 traders)
Total swaps
78,543

What it does

A Uniswap v4 hook that charges configurable dynamic fees on swaps, escrows fee revenue, and seeds ranged liquidity for pools it manages.

How it works step by step

  • Registers pools with per-pool fee and configuration parameters via registerPool, bounded by fee caps
  • Charges fees on swaps through afterSwap and afterSwapReturnDelta, routing fee amounts to a feeEscrow contract
  • Credits accrued fees to recipients using credit(address,address,uint256)
  • Seeds ranged liquidity positions through seedLiquidity using the pool manager unlock callback
  • Gates liquidity additions and removals with before and after liquidity hooks
Swap behaviour
afterSwap runs after each swap to record fee accounting, and afterSwapReturnDelta lets the hook take a portion of the swap output as its fee.
Liquidity behaviour
Before and after add and remove liquidity hooks are implemented, plus seedLiquidity which seeds positions in ranged tick bands (int24 ranges with uint128 amounts) through the pool manager unlock flow. Liquidity checks may enforce single-sided deposits (NotSingleSided error).
Fee behaviour
Fees appear to be per-pool configurable via registerPool, bounded by MAX_BASE_FEE_BPS and MAX_TOTAL_FEE_BPS, with fee amounts escrowed through a feeEscrow contract and credited via credit(address,address,uint256). Exact fee formula could not be determined from bytecode alone.
Owner & admin controls
Hook has a deployer and a wired flag set once via initialize(address,address) (guarded by an initializer slot, InvalidInitialization error); seedLiquidity and registerPool appear to be restricted to the deployer (NotDeployer error). Pool-level parameters such as base and total fee bounds are read from a per-pool config mapping written by registerPool. No upgrade or pause function was identified in the selectors.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize validates pool setup and records pool configuration; beforeAddLiquidity and beforeRemoveLiquidity gate liquidity changes; afterSwap performs post-swap accounting and fee handling; afterSwapReturnDelta lets the hook take a share of the swap output as a return delta, so it can take tokens from swaps.

Security & trust assessment

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

Who controls it: The deployer role can register pools and seed liquidity; a compromised deployer key could register malicious pool parameters or seed positions. Fee bounds limit maximum fee but the exact admin powers over fee parameters are not fully verifiable without source.

Risk to user funds: The hook can hold and move funds through the fee escrow and return-delta mechanism on swaps, and it seeds liquidity from the deployer-controlled path. Users depend on the escrow and accounting being correct; without verified source the exact exposure cannot be fully confirmed.

Security findings

  • [medium] Hook takes swap tokens via return delta: afterSwapReturnDelta is enabled, so the hook can take tokens out of swap flows and credits fees through an escrow contract.
  • [medium] Deployer-controlled per-pool fee configuration: Pool fee parameters are written by registerPool and bounded by MAX_BASE_FEE_BPS and MAX_TOTAL_FEE_BPS; a privileged deployer controls these per pool.
  • [low] Self-unlock pattern in liquidity seeding: The hook uses unlockCallback and calls unlock on the pool manager internally, a self-unlock pattern that should be reviewed for reentrancy and accounting correctness.
  • [info] One-time wiring at initialization: Initialization is guarded and sets wired and feeEscrow references; a misconfigured wiring could break fee accounting (BadWiring error exists).

Contract details

Verified source
Yes (LaunchHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
9,260 bytes
Upgradeable proxy
No
Detected patterns
launchpad, mev-protection, return-delta, self-unlock

Pools using LaunchHook