Custom pricing hook on Ethereum

Uniswap v4 Hook Contract 0x6985e0a7f8039f6a6ad4671a64380ae82c318088 on Ethereum · Custom pricing

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

What it does

A custom hook that runs logic before every swap and can adjust swap amounts through a return delta, but its exact behaviour cannot be confirmed without source.

How it works step by step

  • Runs custom logic in beforeSwap on every pool swap
  • Can return a balance delta that changes the amounts exchanged in the swap
  • Reads and writes storage slots 0 through 3 during swap and setter calls
  • Exposes a state-writing function (0xa5533573) that updates a mapping and a counter
  • Logic for the delta and state updates cannot be confirmed without verified source
Swap behaviour
beforeSwap runs on every swap, reads and updates contract storage, and can return a delta that changes the swap amounts.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Unknown from decoded bytecode; beforeSwap has return-delta permission and may adjust swap amounts or fees, but the exact logic cannot be determined without source.
Owner & admin controls
No admin controls found. Selector 0xa5533573 (uint256,uint256) writes to a mapping keyed by uint256 and to the slot 3 counter, but no owner or access-check pattern is visible in the decoded input, so it is unclear who may call it.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: the hook runs logic before each swap and reads and writes its storage during swaps. beforeSwapReturnDelta: the hook can return a delta that alters the amounts exchanged in the swap, meaning it can take or give tokens relative to the pool.

Security & trust assessment

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

Who controls it: Cannot be determined precisely. The writer selector 0xa5533573 may be a privileged setter; if it is callable by a single key, that key could change stored state that influences swap outcomes.

Risk to user funds: The hook can alter swap amounts through return deltas, so it can take or pay out tokens during swaps. Whether it can block swaps or hold funds cannot be confirmed from the bytecode alone.

Security findings

  • [high] Return-delta permission can alter swap settlement: The hook has beforeSwapReturnDelta, so its return value can change the swap amounts and move value between the pool and the hook.
  • [medium] Unverified state-writing function: Selector 0xa5533573 writes to storage (mapping and slot 3) with no visible access check in the decoded input.
  • [medium] Swap behaviour depends on mutable storage: beforeSwap reads and writes storage, so swap results may depend on mutable state that changes over time.
  • [info] Source not verified: No verified source is available, so the logic and privileges cannot be fully confirmed.

Contract details

Verified source
No
Bytecode size
1,993 bytes
Upgradeable proxy
No
Detected patterns
return-delta

Pools using Custom pricing hook