Access control hook on Base

Uniswap v4 Hook Contract 0x394b90e032662edbdddeae91800670e1bc550080 on Base · Access control

Volume (24h)
$2.02
Value locked (TVL)
$0.98
All-time volume
$2.02
Pools using this hook
1
Swaps (24h)
2 (1 traders)
Total swaps
2

What it does

A Uniswap v4 hook that restricts swaps in its pool to an owner-managed allowlist of addresses.

This read was written for the hook 0x5295…4080 on Robinhood Chain 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

  • Enables only the beforeSwap callback among the hook permissions
  • beforeSwap reads an address-to-bool allowlist stored in slot 1
  • Owner adds or removes allowed addresses via allow and disallow
  • Owner is stored in slot 0 and can transfer ownership
  • Hook exposes view functions for poolManager, owner and allowed status
  • Reverts with HookNotImplemented for unimplemented callbacks
Swap behaviour
beforeSwap checks the caller against the allowlist mapping and is expected to revert for addresses that are not permitted; no fee or delta changes were identified.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Uses the pool's static fee.
Owner & admin controls
Owner (slot 0) can transfer ownership and maintain an allowlist via allow(address) and disallow(address), which writes a mapping(address=>bool) in slot 1; the allowlist is read in beforeSwap, so the owner decides which addresses may swap.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap is enabled and is used to gate swaps against the owner-managed allowlist mapping.

Security & trust assessment

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

Who controls it: The owner can add or remove addresses from the allowlist, so it can effectively block any trader from swapping, or let only chosen addresses trade, and can transfer ownership to any address.

Risk to user funds: The hook does not take custody of tokens or modify balances, but it can block non-allowlisted addresses from swapping, which limits user access to the pool rather than directly moving funds.

Security findings

  • [medium] Swap gating by owner-controlled allowlist: beforeSwap reads the allowlist mapping in slot 1, indicating that swaps are restricted to permitted addresses.
  • [low] Single-key ownership: Ownership can be transferred via transferOwnership with no visible timelock or two-step acceptance, so a single key controls the allowlist.
  • [info] Liquidity not gated: Only beforeSwap is enabled; liquidity operations are not restricted by this hook, so LPs can still add or remove liquidity.

Contract details

Verified source
No
Bytecode size
1,839 bytes
Upgradeable proxy
No
Detected patterns
ownable

Pools using Access control hook