Likely access control hook on Ethereum

Uniswap v4 Hook Contract 0xe3574c8bb8d0b9b9e6b76ef9a871681f3d034880 on Ethereum · Access control

Volume (24h)
$0
Value locked (TVL)
$9.60K
All-time volume
$0
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
0

What it does

A Uniswap v4 hook whose owner can pause swaps, block buy-side trades, and restrict liquidity provision to the owner, acting as an access-control gate over the pool.

How it works step by step

  • beforeSwap checks the paused flag and reverts swaps while paused
  • beforeSwap checks buysAllowed to restrict buy-direction swaps
  • beforeAddLiquidity reverts non-owner liquidity additions when ownerOnlyLiquidity is enabled
  • Owner setters control paused, buysAllowed, ownerOnlyLiquidity and ownership
  • A slot-1 mapping of addresses is written by an owner-restricted function, likely for token or pool registration
  • Unused callbacks (initialize, donate, remove liquidity, after-hooks) are stubs
Swap behaviour
beforeSwap is a view check that reverts when the hook is paused or when buys are disabled for the swap direction. Otherwise swaps pass through unchanged with no fee or delta changes.
Liquidity behaviour
beforeAddLiquidity is a view function that can revert when ownerOnlyLiquidity is enabled and the caller is not the owner, restricting who can add liquidity. beforeRemoveLiquidity and the after-liquidity callbacks are pure stubs with no logic. No liquidity callbacks mutate state beyond the gate.
Fee behaviour
Uses the pool's static fee. No fee override or fee-taking logic was decoded.
Owner & admin controls
Owner (storage slot 0) can transfer ownership via setOwner, pause or unpause the hook via setPaused (paused() is checked in beforeSwap), toggle buysAllowed via setBuysAllowed, and toggle ownerOnlyLiquidity via an unnamed nonpayable setter (0xc60057ed) that gates beforeAddLiquidity. Function 0xb67aa425 writes a mapping(uint256 => address) in slot 1, likely registering token or pool addresses, and is owner-restricted by its NotOwner-style checks.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeSwap

beforeAddLiquidity is used to gate liquidity provision to the owner when ownerOnlyLiquidity is set. beforeSwap is used to enforce the pause switch and the buysAllowed restriction on swaps.

Security & trust assessment

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

Who controls it: The owner can pause all swaps through the hook, block buys entirely through buysAllowed, and restrict liquidity provision to itself. The owner can also reassign ownership, so a compromised key gives full control over trading availability.

Risk to user funds: The hook does not take or hold user tokens, and it returns no deltas or fee adjustments, so it cannot directly move funds. However, the owner can halt swaps, block buys, and gate liquidity addition, which can trap or restrict user positions in practice.

Security findings

  • [medium] Owner-controlled pause on swaps: setPaused lets the owner halt swaps in beforeSwap; users cannot exit through the hook while paused, though liquidity removal is not gated.
  • [high] Owner can disable buys selectively: setBuysAllowed toggles a flag read in beforeSwap, which can be used to block buy-direction swaps while leaving sells open, creating one-way trading.
  • [medium] Owner-only liquidity provision: ownerOnlyLiquidity read in beforeAddLiquidity restricts new liquidity to the owner, which can prevent third-party LPs from joining.
  • [low] Single-key ownership without timelock: Ownership is a single address in slot 0 with setOwner and no two-step transfer or timelock was decoded.
  • [info] Non-upgradeable bytecode: No proxy or upgrade pattern was decoded; the contract appears non-upgradeable.

Contract details

Verified source
No
Bytecode size
4,790 bytes
Upgradeable proxy
No
Detected patterns
pausable

Pools using Likely access control hook