Access control hook on Ethereum

Uniswap v4 Hook Contract 0xa098da8b734f00dd54169ea8986c8a95e3ec0fc0 on Ethereum · Access control

Volume (24h)
$16.90K
Value locked (TVL)
$10.70K
All-time volume
$30.75M
Pools using this hook
10
Swaps (24h)
264 (6 traders)
Total swaps
111,401

What it does

An owner-gated access-control hook that can restrict which addresses and routers may add, remove, or swap liquidity in a Uniswap v4 pool, with its logic upgradeable by the owner.

How it works step by step

  • Runs beforeSwap and afterSwap callbacks that appear to check access via whitelist and router mappings
  • Runs before and after add and remove liquidity callbacks that appear to gate liquidity actions
  • Exposes an owner-controlled enabled flag that can switch the hook on or off
  • Stores whitelist and router allowlists updatable by the owner
  • Implements a UUPS-style upgradeable proxy whose implementation can be replaced by the owner
Swap behaviour
beforeSwap and afterSwap run on swaps and appear to check the enabled flag and the whitelist and router mappings before allowing the swap.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are enabled; the decoded storage reads suggest they check the enabled flag and whitelist/router mappings, which may restrict who can add or remove liquidity. Exact behaviour cannot be confirmed without source.
Fee behaviour
Uses the pool's static fee. No fee logic identified in the decoded functions.
Owner & admin controls
Owner (Ownable, slot 0x9016...) can transferOwnership, renounceOwnership, enable or disable the hook via enable(bool), and manage whitelist via updateWhitelist(address,bool) and routers via updateRouters(address,bool). Upgradeable via upgradeToAndCall (UUPS-style, implementation slot 0x3608...). Initialization is guarded by an initializer-style uint64 version slot.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap

beforeAddLiquidity and afterAddLiquidity gate liquidity additions; beforeRemoveLiquidity and afterRemoveLiquidity gate liquidity removals; beforeSwap and afterSwap appear to gate swaps against the whitelist and router mappings and the enabled flag.

Security & trust assessment

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

Who controls it: The owner can enable or disable the hook, change the whitelist and router allowlists, and upgrade the implementation to arbitrary logic. This could block or restrict user liquidity and swaps, or change behaviour entirely after deployment.

Risk to user funds: The hook does not appear to take or hold tokens directly (no return-delta or fee-taking selectors identified), but it can revert liquidity and swap callbacks, which can lock user liquidity or block trades. Upgradeability means funds in the pool could be affected by future implementation changes.

Security findings

  • [high] Upgradeable proxy controlled by owner: The proxy's implementation can be replaced by the owner via upgradeToAndCall, so the hook logic is not fixed and can change at any time.
  • [medium] Owner-controlled access gating: The owner can toggle the enabled flag and edit the whitelist and router mappings, which appear to be consulted in swap and liquidity callbacks; this can block users or routers from interacting with the pool.
  • [medium] Single-key ownership: Owner is a single address with transferOwnership and renounceOwnership; no timelock or multisig is evident from the bytecode.
  • [info] Inferred logic only: Whitelist and router access checks are inferred from storage reads; no source confirms exact logic.

Contract details

Verified source
No
Bytecode size
176 bytes
Upgradeable proxy
Yes
Detected patterns
ownable, upgradeable

Pools using Access control hook