Access control hook on Base

Uniswap v4 Hook Contract 0x327f2148f7522d5e8cecb3b710bc05abe2f78080 on Base · Access control

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

What it does

A swap-gating hook that lets an admin block specific addresses from trading in pools that use it.

How it works step by step

  • Stores a mapping of blocked addresses in storage slot 0.
  • An admin-controlled function mark(address,bool) sets or clears entries in that mapping.
  • beforeSwap reads the mapping for the swap caller and gates execution on the result.
  • blocked(address) exposes the mapping for public read.
  • Exposes manager(), quoter(), router() and admin() getters for configuration reference.
Swap behaviour
beforeSwap checks whether the sender is marked in the blocked mapping and rejects the swap if so; otherwise the swap proceeds normally.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Uses the pool's static fee.
Owner & admin controls
An admin address (exposed via admin()) can call mark(address,bool) to flag or unflag addresses in the blocked mapping; no pause or upgrade functions were found.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap is enabled and is used to check whether the swapping sender is on the blocked list before the swap executes.

Security & trust assessment

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

Who controls it: The admin key can block any address from swapping in pools using this hook by calling mark(address,true), and can also manage the router, quoter and manager references exposed by the contract.

Risk to user funds: The hook does not take or hold tokens and does not alter balances or fees; its only effect is to revert swaps from blocked addresses, so user funds are not directly moved but swaps can be blocked.

Security findings

  • [medium] Admin-controlled swap blocklist: Storage slot 0 is a mapping(address => bool) written by mark() and read by beforeSwap() and blocked(), so a privileged caller can censor specific addresses from swapping.
  • [low] Blocklist keyed on the caller, not necessarily the end user: The beforeSwap selector reads the blocklist and the bytecode calls msgSender(), suggesting the check is applied to the swap initiator, which may be a router rather than the end user.
  • [info] Access control logic not verified: No pause, upgrade proxy or owner transfer functions were identified in the dispatched selectors, though the access control logic itself could not be read from source.

Contract details

Verified source
No
Bytecode size
1,628 bytes
Upgradeable proxy
No

Pools using Access control hook