Likely custom pricing hook on Arbitrum

Uniswap v4 Hook Contract 0x8fd29ad6d5fd8d11505af8f8056301166886c088 on Arbitrum · Custom pricing

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

What it does

A Uniswap v4 hook that gates swaps on the pool with an owner-controlled pause switch and a per-pool fee setter, and can return a before-swap delta that changes the amounts a swap settles at.

This read was written for the hook 0x0f09…c088 on Ethereum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Implements beforeSwap, which is dispatched as a nonpayable call and reads the paused flag before proceeding
  • Has a boolean paused flag at storage slot 0 that the owner can toggle through setPaused(bool), which can halt swap processing
  • Enables beforeSwapReturnDelta, so the hook can return a delta that alters the swap's settled token amounts
  • Stores an owner-controlled per-pool fee via setPoolFee(bytes32,uint24), with the fee stored in the same slot as the owner address
  • Maintains a registry of pools (pool count, allPools array, isPoolRegistered mapping) and pool-related bookkeeping
  • Exposes an execute(address,uint256,bytes) function and a setOwner(address) function for owner-managed actions
Swap behaviour
beforeSwap is a nonpayable callback that checks the paused flag and may return a before-swap delta because the beforeSwapReturnDelta permission is enabled. afterSwap is also dispatched, but it is a view-style selector with no state changes found in the decoded writes.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are dispatched as view functions. The decoded storage writes do not show liquidity-related state changes, but these functions are not enabled as permissions in the address.
Fee behaviour
Fees are set by the owner through setPoolFee(bytes32,uint24), which writes a per-pool fee value. The exact way the fee is applied during swaps cannot be fully determined from the decoded bytecode.
Owner & admin controls
The owner (storage slot 0) can call setOwner to transfer ownership, setPaused to halt operations, setPoolFee to change per-pool fees, and execute to perform arbitrary calls with a given value and calldata. Upgrade mechanisms were not identified, but the presence of execute gives the owner broad power.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap is used to gate or adjust swaps, including the pause check. beforeSwapReturnDelta allows the hook to return a delta that changes the net amounts settled for a swap.

Security & trust assessment

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

Who controls it: A single owner key controls pausing, per-pool fees, ownership transfer and arbitrary execution through execute, so a compromised or malicious owner could halt trading, extract value via fees, or move funds the hook controls.

Risk to user funds: The hook can halt swaps through the pause flag and can alter swap amounts via the before-swap return delta. The execute function may allow the owner to move tokens or ETH the hook holds, though what the hook actually holds cannot be determined from the input.

Security findings

  • [medium] Owner can pause swaps: setPaused(bool) writes the paused flag that beforeSwap reads, so the owner can halt swaps on hooked pools.
  • [medium] Owner can set arbitrary per-pool fees: setPoolFee(bytes32,uint24) lets the owner set a fee on any pool, with no visible bound in the decoded logic, which could be used to extract value from traders.
  • [high] Generic execute function: execute(address,uint256,bytes) appears to let the owner make arbitrary external calls with value, which could move tokens or ETH held by the hook or affect pool state.
  • [medium] Return delta can alter swap settlement: beforeSwapReturnDelta is enabled, so the hook can return a delta that changes swap settlement amounts; the bounds and conditions of that delta are not visible in the decoded bytecode.
  • [info] Unverified source: No verified source is available, so function behaviour is inferred from selectors and storage access only.

Contract details

Verified source
No
Bytecode size
17,742 bytes
Upgradeable proxy
No
Detected patterns
pausable, return-delta

Pools using Likely custom pricing hook