Access control hook on Base

Uniswap v4 Hook Contract 0x7eee5ae49efb772b54593e8872583b12422c00c0 on Base · Access control

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$35.66M
Pools using this hook
520
Swaps (24h)
0 (0 traders)
Total swaps
176,987

What it does

A Uniswap v4 hook that gates swaps with an owner-managed signer and sell-enable flag, tracking per-address nonces and recent users, without taking fees or custody of liquidity.

How it works step by step

  • beforeSwap checks swap eligibility before the pool executes the trade
  • sellEnabled flag is stored in slot 0 and can be toggled by a privileged setter
  • A signer address (slot 5) is used to verify signed data submitted with calls
  • Per-address nonces are tracked in a mapping to prevent replay of signed approvals
  • afterSwap records state changes such as the lastUser list after each swap
  • No liquidity or fee-taking callbacks are enabled
Swap behaviour
beforeSwap can revert swaps based on a sell-enabled flag and signed verification; afterSwap updates internal bookkeeping such as nonces and the user list.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
No fee logic identified in the decoded functions; the hook does not appear to set or take fees.
Owner & admin controls
Owner (owner() 0x8da5cb5b) can call setSigner(address) (0x6c19e783) to change the signer address stored in slot 5; the bytecode suggests a signature-verification gate (verify(bytes), getNonces, nonces mapping) keyed to that signer. Owner-controlled toggle of sellEnabled via a bool at slot 0 offset 20 written by selector 0x7f68651a, which also writes an int128 at slot 1, is likely an admin setter but cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap

beforeSwap: gates or inspects swaps before execution (likely checks sellEnabled and/or a signed authorization). afterSwap: runs post-swap bookkeeping, updating state such as the lastUser list and per-address nonces.

Security & trust assessment

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

Who controls it: The owner can replace the signer and possibly toggle sell permissions. A malicious or compromised owner or signer could block sells or authorize selected addresses, affecting which traders can swap.

Risk to user funds: The hook takes no direct custody of funds per the decoded permissions (no return-delta or fee-taking callbacks). The main exposure is that swaps can be reverted, blocking user trades, rather than loss of tokens.

Security findings

  • [medium] Owner-controlled signer: Owner can call setSigner to change the verification key used by the hook's signature checks.
  • [medium] Sell toggle can block swaps: A bool flag (sellEnabled, written via 0x7f68651a) appears to be admin-toggleable and is read in swap logic, so sells may be blocked.
  • [info] Swap-blocking capability: Hook declares beforeSwap and afterSwap; beforeSwap can revert swaps, so the hook can block trading in the pool.
  • [info] Per-user state tracking: Address-keyed nonce mapping and a list of recent users are maintained, suggesting per-user state tracking. Exact semantics unverified.

Contract details

Verified source
No
Bytecode size
11,939 bytes
Upgradeable proxy
No

Pools using Access control hook