PoolInitializationGuard on Ethereum

Uniswap v4 Hook Contract 0x784ff9a3ac5d88a30bfff6f7f2a270161fbe6000 on Ethereum · Access control · Verified contract

Volume (24h)
$37.84K
Value locked (TVL)
$5.49K
All-time volume
$3.36M
Pools using this hook
224
Swaps (24h)
494 (217 traders)
Total swaps
15,151

What it does

Lets only the factory that created a project's pools initialize them, so no one else can open a pool that uses this hook; it does not touch swaps, fees, or liquidity.

How it works step by step

  • Enables only the beforeInitialize callback, which the pool manager calls when a pool using this hook is initialized.
  • Records the deployer as the immutable factory address in the constructor and the pool manager as the immutable poolManager address.
  • In beforeInitialize, reverts with NotFactoryInitialization unless msg.sender is the pool manager and the sender argument equals the factory address.
  • Returns the beforeInitialize selector on success, which allows the pool initialization to proceed.
  • Constructor reverts with InvalidHookAddress unless the deployed address carries exactly the BEFORE_INITIALIZE permission bit and no others.
Swap behaviour
No swap callbacks.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Uses the pool's static fee.
Owner & admin controls
No owner, pause, upgrade, or parameter-change functions found. The factory and pool manager addresses are fixed as immutables at construction.

Enabled Uniswap v4 callbacks

beforeInitialize

beforeInitialize is used to check that the initializing sender is the factory that deployed the hook and to block pool creation by anyone else.

Security & trust assessment

Risk level: low (verified source, high confidence).

Who controls it: No privileged key exists in this contract. The factory address is fixed at deployment, so its behaviour is the only point of control over which pools can be initialized.

Risk to user funds: The hook holds no tokens and does not move pool funds. It can only revert pool initialization; it cannot block swaps or liquidity actions on an already-initialized pool.

Security findings

  • [info] Pool creation restricted to one factory: beforeInitialize reverts unless sender equals the immutable factory address, so only pools initialized through that factory can use this hook. Pools for this hook cannot be opened by other callers.
  • [info] Hook address permission check: The constructor requires the address low 14 bits to equal exactly the BEFORE_INITIALIZE flag, so the pool manager will call only the implemented callback.
  • [low] Dependence on factory correctness: If the factory contract is buggy or cannot initialize pools, this hook blocks initialization for every pool that depends on it, since there is no override path.

Contract details

Verified source
Yes (PoolInitializationGuard)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
488 bytes
Upgradeable proxy
No

Pools using PoolInitializationGuard