Custom pricing hook on Ethereum

Uniswap v4 Hook Contract 0x627fe5f49e9d453e6f3f47034265d8cefc938088 on Ethereum · Custom pricing

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

A Uniswap v4 hook that runs custom logic before each swap and takes a currency adjustment from the swap, though the exact economic purpose cannot be confirmed without source.

How it works step by step

  • Runs custom logic in beforeSwap on every swap in pools using this hook
  • Reads and writes storage slots 0 and 1 during swaps
  • Calls take to withdraw a currency from the pool manager
  • Returns a before-swap delta that adjusts the trader's amounts
  • Uses storage slots 2 through 4 as read-only parameters during swaps
Swap behaviour
beforeSwap runs on every swap, reads and updates internal state, can call take to move currency, and returns a delta that changes the swap amounts.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fee handling is not clearly determined from decoded bytecode; the hook takes currency via a take call during beforeSwap, which may represent a swap-time fee or rebate, but the exact fee rule cannot be confirmed.
Owner & admin controls
No admin controls found. No owner, pause, upgrade or setter selectors were decoded; storage slots 0-4 are written only within beforeSwap, so parameters appear to be set via swap-time logic rather than admin calls.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: runs custom logic before each swap and can call take to move currency. beforeSwapReturnDelta: lets the hook return a delta that alters the swap amounts, so the hook can take a share of the swap.

Security & trust assessment

Risk level: medium (decoded bytecode, low confidence).

Who controls it: No privileged role was identified, so centralization risk appears limited to whatever parameters the bytecode reads from storage, which cannot be determined without source.

Risk to user funds: The hook can take currency from the pool during swaps through take and return deltas, so it can alter the amounts users receive; it is not clear whether it can block swaps or hold user funds long term.

Security findings

  • [medium] Hook takes currency via return delta: beforeSwapReturnDelta is enabled and the bytecode calls take(address,address,uint256), so the hook can withdraw tokens from the pool manager during swaps and alter the amounts a trader receives.
  • [info] Unlabelled mutable state: Storage slots 0 through 4 are read and written in beforeSwap, which suggests swap-time state that could be manipulated or depleted, but their meaning cannot be decoded without source.
  • [info] Revert paths present: The bytecode includes a Panic(uint256) selector, indicating checked arithmetic or assertion failures that would revert swaps under unexpected inputs.

Contract details

Verified source
No
Bytecode size
1,503 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Custom pricing hook