Likely custom pricing hook on Arbitrum

Uniswap v4 Hook Contract 0x5d4af6fccc3ded291725418065b6dff1e36b4088 on Arbitrum · Custom pricing

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

What it does

A Uniswap v4 hook that gates swaps with a pausable switch and a per-pool fee setting, and can return a custom balance delta from beforeSwap, letting it take over part of a swap's accounting.

How it works step by step

  • Implements beforeSwap, which runs before each swap and can return a delta that changes how the swap settles
  • Exposes setPaused(bool) so the owner can halt swap handling through a stored paused flag
  • Stores a per-pool fee via setPoolFee(bytes32,uint24), with a mapping keyed by pool id
  • Keeps an owner address that gates setOwner, setPoolFee, setPaused and the execute(address,uint256,bytes) call forwarder
  • Includes an unlockCallback and an execute entry point, indicating it can interact with the PoolManager during an unlock
  • Has a sizeable (about 22.5 KB) bytecode body with many view functions for pool and registry lookups; exact purpose of these lookups is not confirmed without source
Swap behaviour
beforeSwap is nonpayable and is the only swap callback enabled, with beforeSwapReturnDelta also set, so the hook can return a delta that alters swap accounting. The function reads the paused flag, so swaps may be blocked while paused. Exact pricing logic cannot be confirmed from the decoded bytecode.
Liquidity behaviour
No liquidity callbacks are enabled. The add and remove liquidity selectors are present as view functions, but they are not permissioned hooks for this address.
Fee behaviour
The owner can set a per-pool fee with setPoolFee(bytes32,uint24). The mechanism by which this fee is applied during swaps cannot be fully confirmed without source.
Owner & admin controls
An owner address (storage slot 0) controls setOwner, setPaused, setPoolFee, and the execute forwarder. The owner can pause the hook, change per-pool fees, and transfer ownership. Upgradeability was not detected.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap is used to run custom logic and potentially pause or adjust swaps. beforeSwapReturnDelta lets the hook return a balance delta that changes what the swapper and pool settle.

Security & trust assessment

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

Who controls it: A single owner key can pause swaps, set pool fees, transfer ownership, and call arbitrary external contracts through execute.

Risk to user funds: The hook can alter swap settlement through its return delta and can hold or move assets through execute, so user and pool funds are exposed to the owner key and to the hook's accounting logic.

Security findings

  • [medium] Owner can pause swaps: setPaused(bool) writes a flag read by beforeSwap, so a single owner key can halt swaps for affected pools.
  • [medium] Owner-settable pool fee: setPoolFee(bytes32,uint24) lets the owner set a fee per pool; the fee's upper bound was not confirmed, so an extreme fee could harm traders.
  • [high] Return delta can alter settlement: beforeSwapReturnDelta is enabled, so the hook can take or give tokens during swaps. Without source, the amount and conditions cannot be verified.
  • [high] Generic execute forwarder: execute(address,uint256,bytes) is callable by the owner and forwards arbitrary calldata with value, which could move any asset the hook holds or controls.
  • [info] Unverified source: No verified source is available, so behaviour is inferred from selectors and storage only.

Contract details

Verified source
No
Bytecode size
22,574 bytes
Upgradeable proxy
No
Detected patterns
pausable, return-delta

Pools using Likely custom pricing hook