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
- USDT / PHOTON (0.30% fee) — 24h volume $98.26K, TVL $277.39K, 59 swaps today
- USDT / BUILDOUT (0.30% fee) — 24h volume $89.47K, TVL $636.33K, 43 swaps today
- USDT / NEOCLOUD (0.30% fee) — 24h volume $27.71K, TVL $0, 38 swaps today
- POWER / USDT (0.30% fee) — 24h volume $16.96K, TVL $0, 17 swaps today
- USDT / ROBOTS (0.30% fee) — 24h volume $9.31K, TVL $152.05K, 17 swaps today
- BNB / RFT (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- BNB / 大肥鱼 (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- bibi / U (0.1998% fee) — 24h volume $0, TVL $0, 0 swaps today
- bibi / U (0.0801% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / SIREN (0.90% fee) — 24h volume $0, TVL $0, 0 swaps today
- BAS / BNBTiger (94.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- BNB / USDT (0.05% fee) — 24h volume $0, TVL $0, 0 swaps today