Access control hook on Base

Uniswap v4 Hook Contract 0x919f56985316340036e76d8db241c0d82f45ca80 on Base · Access control

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
3
Swaps (24h)
0 (0 traders)
Total swaps
0

What it does

An allowlist hook that restricts which addresses can add liquidity, remove liquidity or swap in each Uniswap v4 pool it is bound to, controlled by an admin.

This read was written for the hook 0xc568…0a80 on Base and reused here: the two run the same code.

How it works step by step

  • Binds a Uniswap v4 pool to the hook via bindPool, computing the pool id with toId and recording it once.
  • Maintains a per-pool, per-address allowlist in a nested mapping (slot 2) updated through setAllowed.
  • Checks the allowlist in beforeAddLiquidity and beforeRemoveLiquidity to gate LP actions.
  • Checks the allowlist in beforeSwap to gate trading in the pool.
  • Provides admin transfer and renounce functions to manage who controls the allowlist.
Swap behaviour
beforeSwap checks the pool's allowlist before a swap, so swaps are restricted to permitted addresses for bound pools.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity are implemented and read the per-pool allowlist mapping (slot 2) before allowing liquidity changes. Liquidity can only be modified by addresses that are allowed for the pool; the exact check and revert conditions cannot be confirmed without source.
Fee behaviour
Uses the pool's static fee. No fee logic is visible in the decoded functions.
Owner & admin controls
A single admin address (slot 0) can grant or revoke per-pool allowlist entries via setAllowed(poolId, address, bool) and can transfer admin via transferAdmin or renounce it via renounceAdmin. Admin-gated functions revert with NotAdmin; once renounced, the renounced flag is set and no further admin actions are possible.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap

beforeAddLiquidity: gates liquidity additions against an allowlist. beforeRemoveLiquidity: gates liquidity removals against the same allowlist. beforeSwap: checks allowlist state for the pool before a swap executes, likely restricting swaps to permitted addresses.

Security & trust assessment

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

Who controls it: The admin key controls which addresses may add, remove or swap in each pool through setAllowed, and can transfer or renounce the admin role. A malicious or compromised admin could block all users except chosen addresses from a pool, or freeze a pool's liquidity.

Risk to user funds: The hook does not appear to take or hold tokens through return deltas. It can block users from adding liquidity, removing liquidity or swapping in a bound pool, which could lock user positions if the admin revokes access or renounces with restrictive settings.

Security findings

  • [high] Single-key admin gates pool access: A single admin address can grant or revoke allowlist access for any pool, including blocking swaps and liquidity changes for others.
  • [medium] Admin transfer appears immediate: transferAdmin allows an immediate handover of the admin role with no visible timelock or two-step acceptance in the decoded selectors.
  • [info] Admin can renounce control: renounceAdmin permanently sets the renounced flag, after which allowlist controls can no longer change.
  • [info] One-time pool binding: Pool binding (bindPool) can only occur once per pool, reverting with PoolAlreadyBound, which is a neutral integrity check.

Contract details

Verified source
No
Bytecode size
3,389 bytes
Upgradeable proxy
No

Pools using Access control hook