Access control hook on BNB Chain

Uniswap v4 Hook Contract 0x228cff8ad110b3374e858218487f1caf51654880 on BNB Chain · Access control

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$182.81K
Pools using this hook
48
Swaps (24h)
0 (0 traders)
Total swaps
638

What it does

A Uniswap v4 hook that restricts which addresses can add liquidity to its registered pools and counts swaps per pool, with admin-controlled configuration.

How it works step by step

  • Registers pools and stores a per-pool configuration (address and fee-tier values) in storage.
  • Gates beforeAddLiquidity against a per-pool, per-address allowlist mapping.
  • Increments a per-pool swap counter in beforeSwap.
  • Exposes views for pool keys, registration status, config version and swap count.
  • Stores ADMIN, positionManager and poolManager references and an initializer flag.
Swap behaviour
beforeSwap increments a per-pool swap counter and reads pool configuration; it does not change fees or swap amounts based on the decoded functions.
Liquidity behaviour
beforeAddLiquidity reads a per-pool, per-address permission mapping (slot 3) and can revert liquidity additions for addresses not permitted; it also reads pool config values stored in slots 1 and 2 (address and uint24 per pool id).
Fee behaviour
Uses the pool's static fee. No fee-setting function or return delta was identified in the decoded selectors.
Owner & admin controls
Selector 0xc4452e52 (uint256,address,bool) writes a per-pool, per-address boolean mapping at slot 3 (likely an allowlist), gated by an owner or admin role that is not named in the decoded functions; ADMIN() and initializer() views exist, so an admin address is stored and an initializer flag (slot 5, uint8) is set in beforeAddLiquidity. Exact role checks cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeSwap

beforeAddLiquidity: gates which addresses may add liquidity to a registered pool. beforeSwap: updates a per-pool swap counter (slot 4) and reads pool configuration to run its swap-time logic.

Security & trust assessment

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

Who controls it: A privileged admin key can register pools, change the pool configuration and allowlist addresses through selectors 0xa8b1f5a7, 0x4d909a45 and 0xc4452e52, which can effectively decide who may provide liquidity.

Risk to user funds: The hook does not appear to hold or move tokens (no return-delta permissions and no transfer selectors identified). Its main effect on user funds is blocking liquidity additions for non-allowlisted addresses and any admin-driven reconfiguration of pools, not direct custody.

Security findings

  • [medium] Permissioned liquidity provision: Liquidity additions are checked against a per-pool, per-address mapping; non-allowlisted addresses are likely to be blocked from adding liquidity.
  • [medium] Admin-controlled pool configuration: Pool registration and configuration are writable by selectors 0xa8b1f5a7 and 0x4d909a45, and a boolean initializer flag exists, so a single admin key controls pool setup.
  • [info] Swap callback only observes and counts: beforeSwap writes a swap counter per pool; the swap path has no return delta, so the hook does not take or redirect swap tokens based on the decoded functions.
  • [info] Possible upgradeability not verified: Bytecode size is 8243 bytes and ADMIN, initializer and positionManager views suggest a possibly upgradeable or proxy-style deployment, but no proxy implementation slot was decoded.

Contract details

Verified source
No
Bytecode size
8,243 bytes
Upgradeable proxy
No

Pools using Access control hook