Access control hook on BNB Chain

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

Volume (24h)
$241.71K
Value locked (TVL)
$1.07M
All-time volume
$42.00M
Pools using this hook
12
Swaps (24h)
174 (4 traders)
Total swaps
62,151

What it does

A swap-gating hook that only lets whitelisted addresses trade in the pool it is attached to, managed by the contract owner.

How it works step by step

  • beforeSwap checks the caller against an on-chain whitelist (mapping at slot 1)
  • Owner adds approved senders with addAllowedSender and removes them with removeAllowedSender
  • Owner is set in slot 0 and controls the whitelist through Ownable functions
  • Ownership can be transferred or renounced
  • Other callbacks are declared in the interface but appear to be unimplemented and revert
Swap behaviour
beforeSwap checks the sender against the allowedSenders whitelist and is expected to revert for addresses that are not approved.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Uses the pool's static fee; the hook does not set or take fees.
Owner & admin controls
Owner (slot 0) can add or remove addresses from the allowedSenders whitelist (slot 1) and can transfer or renounce ownership. No pause or upgrade functions were found.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap is the only enabled callback; it is used to check whether the swapper is on the allowedSenders whitelist.

Security & trust assessment

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

Who controls it: The owner controls which addresses may swap through the pool by editing the whitelist, so a compromised owner key could allow or block specific swappers. Ownership can also be renounced or transferred.

Risk to user funds: The hook does not appear to hold or move user tokens or take return deltas. Its main effect is to block non-whitelisted swappers from trading in the pool, which can affect access to pool liquidity but not custody of funds.

Security findings

  • [medium] Swap gating by owner-managed whitelist: beforeSwap reads the allowedSenders mapping (slot 1) and the owner key controls additions and removals, so swaps by non-whitelisted addresses are likely reverted.
  • [info] Standard Ownable controls: The owner can transfer or renounce ownership through transferOwnership and renounceOwnership, which are standard Ownable functions.
  • [info] Unimplemented callbacks revert: The contract contains a HookNotImplemented error selector, which indicates unimplemented callbacks revert rather than silently passing.

Contract details

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

Pools using Access control hook