Access control hook on Base
Uniswap v4 Hook Contract 0x2cc18ffd4d21d457ab493e8223f140aa84080fc0 on Base · Access control
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 18
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A permissioned, owner-managed hook that gates swaps and liquidity operations in Uniswap v4 pools through enabled flags and a trader whitelist.
How it works step by step
- Checks a global enabled flag and per-pool enabled flags before allowing liquidity changes and swaps
- Maintains a whitelist of trader addresses that may interact with the pools
- Maintains per-pool whitelist mappings keyed by pool id and address
- Allows an owner and an approver to manage whitelist and enable/disable state
- Is an upgradeable UUPS proxy whose logic can be replaced by the owner
- Swap behaviour
- beforeSwap and afterSwap check the global and per-pool enabled flags and the caller's whitelist status, allowing or blocking the swap accordingly.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity callbacks read the enabled flags and whitelist mappings and may revert if liquidity operations are not permitted for the caller or pool; no token movement is evident.
- Fee behaviour
- No fee logic identified in decoded selectors; hook does not appear to set or take fees beyond the pool's static fee.
- Owner & admin controls
- Owner (ERC-173 style, slot 0x9016...) can renounce or transfer ownership, set the approver, toggle the global enabled flag, toggle per-pool enabled flags, whitelist traders, set per-pool whitelist entries, and upgrade the implementation via upgradeToAndCall (UUPS, slot 0x3608...). Approver address can also drive whitelist-related writes.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap
beforeAddLiquidity and afterAddLiquidity gate liquidity additions by checking enabled, poolEnabled and whitelist storage; beforeRemoveLiquidity and afterRemoveLiquidity gate removals the same way; beforeSwap and afterSwap check the same enabled and whitelist state to permit or block swaps.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: The owner and approver can toggle the global and per-pool enabled flags and manage the trader whitelist, which can block any user from adding, removing or swapping liquidity. The owner can also upgrade the implementation and change behaviour arbitrarily.
Risk to user funds: The hook does not appear to custody tokens or alter balances directly, but it can block swaps and liquidity operations and, through upgrades, could be changed to do so or worse. Funds may be frozen if the owner disables the hook, and the proxy implementation is not verified.
Security findings
- [high] Upgradeable implementation controlled by owner: The hook is an upgradeable UUPS proxy; the owner can replace the implementation via upgradeToAndCall and change all logic.
- [medium] Owner can pause swaps and liquidity: setEnabled and setPoolEnabled are owner-controlled gates on beforeSwap and liquidity callbacks, so a privileged key can halt trading or liquidity for all pools or specific pools.
- [medium] Whitelist-restricted access: Whitelist and approver roles can restrict which addresses may trade or provide liquidity, meaning non-whitelisted users may be blocked.
- [info] No token custody via return deltas: Hook declares beforeSwap and afterSwap but no return-delta permissions are present in the address flags, so it should not take user tokens directly.
Contract details
- Verified source
- No
- Bytecode size
- 176 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- access-control, ownable, upgradeable
Pools using Access control hook
- ETH / GREEN (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / WIN (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / SWITCH (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / RALLY (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GULD (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GROW (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GIVE (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / ELMT (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / CDXR (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / WIN (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / SWITCH (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- RALLY / USDC (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- GULD / USDC (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- GROW / USDC (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / GREEN (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / GIVE (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ELMT / USDC (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- CDXR / USDC (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today