Access control hook on Base
Uniswap v4 Hook Contract 0x2f405e8820cdffbe5f22a2cf663fd6b6cc950080 on Base · Access control
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook gates swaps so they only work on owner-enabled pools through one approved router, likely requiring signed buy passes; it adds no fee to any trade, and LPs can always withdraw freely.
How it works step by step
- Checks every swap before it runs and only allows swaps on pools the owner has enabled.
- Requires swaps to come through one specific router address; other callers are rejected.
- Uses signed buy passes from a designated signer, with nonces to stop a pass being reused, to gate who can buy the token.
- Does not take any fee and never touches liquidity adds or withdrawals.
- Swap behaviour
- Before each swap the hook checks that the pool is enabled and the swap comes from the approved router. It likely also checks a signed buy pass from the pass signer, so buys may be restricted to pass holders. Swaps that fail these checks revert, and no tokens are deducted.
- Liquidity behaviour
- No liquidity callbacks; LPs can add and withdraw freely.
- Fee behaviour
- Uses the pool's static fee; the hook charges no extra fee.
- Owner & admin controls
- The owner can change the pass signer and enable or disable pools, which can effectively block swaps on a pool. The router and token addresses appear fixed.
Enabled Uniswap v4 callbacks
beforeSwap
beforeSwap: validates the pool is enabled, the router is approved and, likely, the buy pass signature before allowing the swap.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner sets the pass signer and enables or disables pools. At worst they can block trading, but they cannot take funds.
Risk to user funds: The hook takes no fees and cannot move swap or LP tokens. LP principal cannot be locked or drained.
Security findings
- [medium] Owner can gate or halt swaps: The owner can disable a pool and controls the signer who issues buy passes, so trading can be restricted to approved users or stopped entirely.
- [low] Router-only swaps: Swaps from any router other than the configured one revert.
- [info] LP withdrawals unrestricted: Remove-liquidity callbacks and return deltas are disabled, so LPs can always withdraw and no swap funds can be taken.
Contract details
- Verified source
- No
- Bytecode size
- 3,658 bytes
- Upgradeable proxy
- No
- Detected patterns
- ownable
Pools using Access control hook
- BNKR / PERMA (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today