Access control hook on Base

Uniswap v4 Hook Contract 0x0bceb885440f376502585172e650440065c2c080 on Base · Access control

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

What it does

A swap gate that only allows trades through an approved router and, likely, buys backed by a signed pass from an owner-set signer, charging no extra fee and leaving LP withdrawals free.

This read was written for the hook 0xb70c…4080 on Base 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

  • Checks every swap in enabled pools before it runs and can reject it.
  • Requires swaps to come through one specific router; swaps from other routers are rejected.
  • Appears to gate buys of a 'gated token' behind a signed 'buy pass' issued by an off-chain signer, with one-time nonces.
  • The owner can turn individual pools on or off for the hook and change the pass signer.
  • Takes no fees and never touches liquidity; LPs can add and withdraw freely.
Swap behaviour
Before each swap the hook checks that the pool is enabled and the swap came from the approved router, and likely that buys of the gated token carry a valid signed pass; otherwise the swap reverts. It does not change swap amounts or charge fees.
Liquidity behaviour
No liquidity callbacks; LPs can add and withdraw freely.
Fee behaviour
Uses the pool's static fee.
Owner & admin controls
The owner can replace the pass signer address and enable or disable pools; the signer decides who receives buy passes. The router and gated token appear fixed at deployment.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap: validates router, pool enablement and likely a signed buy pass, reverting unauthorized swaps.

Security & trust assessment

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

Who controls it: An owner controls the pass signer and pool enablement. The worst they can do is stop or restrict who can swap; they cannot take funds.

Risk to user funds: The hook touches no user or LP funds and charges no fee (0%). LP principal cannot be locked or drained by this hook.

Security findings

  • [medium] Swaps gated by signer and router: Trades must go through a fixed router and, for gated buys, carry a signature from the owner-set pass signer, so the signer effectively controls who can buy.
  • [low] Owner can disable pools: Disabling a pool makes its swaps revert, effectively pausing trading in that pool.
  • [info] LP withdrawals unrestricted: Remove-liquidity callbacks and all return deltas are disabled, so the hook cannot block withdrawals or take tokens.

Contract details

Verified source
No
Bytecode size
3,936 bytes
Upgradeable proxy
No
Detected patterns
ownable

Pools using Access control hook