Access control hook on Base

Uniswap v4 Hook Contract 0xea3dfa4369bfce981224ac1f7194e6491ccafae0 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

An upgradeable, permissioned pool hook where admins set the dynamic swap fee and can gate or pause swaps, deposits and even LP withdrawals, so all traders pay whatever fee the admin's policy sets and access depends on approved credentials.

How it works step by step

  • Gates pool activity (swaps, adding liquidity, removing liquidity, donations) behind a policy system with issuers, executors, credentials, nonces and expiry checks.
  • Restricts the hook to a single approved pool and validates the pool key and initializer at creation.
  • Sets a dynamic LP fee for the pool from an admin-configured policy table, and refuses a zero fee.
  • Lets an emergency or admin role pause specific actions (swap, add, remove, donate) by action type.
  • Runs behind an upgradeable proxy with a timelock, policy admin and emergency roles, plus a seal function.
Swap behaviour
Before each swap the hook checks pause status, policy readiness and possibly caller credentials, and can revert the swap. It cannot take tokens from swaps because swap return deltas are disabled.
Liquidity behaviour
Adding and removing liquidity are checked against pause flags and policy or credential rules, and can be blocked (for example with a LiquidityNotAllowed or Paused error). Because the remove-liquidity check is enabled, LP withdrawals can be blocked when the action is paused or credentials fail.
Fee behaviour
Uses a dynamic LP fee that the hook pushes to the pool based on a configured policy, with zero fees disallowed. The exact fee range and any cap cannot be confirmed from the bytecode, and fees go to LPs as normal pool fees.
Owner & admin controls
A timelock or admin can set issuers, executors, donors and fee policies, activate policies and seal configuration, while an emergency role can pause swaps, deposits, withdrawals or donations by action type. The proxy implementation can also be upgraded, and fee caps are not visible in the bytecode.

Enabled Uniswap v4 callbacks

beforeInitialize, afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeDonate

beforeInitialize: validates the pool key and initializer; afterInitialize: records the approved pool and sets the initial fee; beforeAddLiquidity: gates deposits; beforeRemoveLiquidity: gates withdrawals and can revert them; beforeSwap: gates swaps and checks policy; afterSwap: post-swap policy checks; beforeDonate: gates donations to allowed donors.

Security & trust assessment

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

Who controls it: Timelock, policy admin and emergency addresses control credentials, fees, pauses and proxy upgrades. At worst they can block trading and LP withdrawals or set high fees.

Risk to user funds: The hook does not hold funds or take tokens via deltas, but it sets the LP fee with no verifiable cap. LP principal can be temporarily locked in the pool by pausing or gating withdrawals.

Security findings

  • [high] Withdrawals can be paused: beforeRemoveLiquidity checks pause flags and credentials and can revert, so an admin or emergency role can stop LPs from withdrawing their principal.
  • [high] Upgradeable proxy with withdrawal hook: The implementation can be swapped, and because beforeRemoveLiquidity is enabled, a new implementation could block LP withdrawals. It still cannot take swap tokens through return deltas.
  • [medium] Permissioned trading: Swaps and deposits can require issuer-signed credentials with nonces and expiry, so only approved users may be able to trade.
  • [medium] Admin-set dynamic fee: The admin sets fee policies and the hook pushes them to the pool, but no fee cap is visible in the bytecode.

Contract details

Verified source
No
Bytecode size
1,018 bytes
Upgradeable proxy
Yes
Detected patterns
dynamic-fee, upgradeable

Pools using Access control hook