Likely custom pricing hook on Ethereum

Uniswap v4 Hook Contract 0x3b16d99d23a30d82210355c47af44cf60aef8088 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

This hook runs custom logic on each swap and can take currency or adjust the swap amounts through a return delta, but without verified source the exact fee and direction effects for traders and LPs cannot be confirmed.

How it works step by step

  • Implements beforeSwap, which is called by the PoolManager before each swap in pools using this hook
  • Sets a per-address balance in storage slot 0, a mapping from address to uint128, which is read and written during swaps
  • Uses beforeSwapReturnDelta to return a delta that the PoolManager applies to the swap, so the hook can take or give currency
  • Calls take(address,address,uint256) on the PoolManager to withdraw tokens from the pool on behalf of the hook
  • Exposes a view function taking an address and returning a value, which reads the same mapping
  • Reverts with Panic(uint256) on certain failing conditions, likely arithmetic checks
Swap behaviour
On each swap, beforeSwap reads and updates an address-keyed uint128 balance, may call take on the PoolManager to move currency, and returns a before-swap delta that changes the amounts the swapper receives or pays. Exact amounts and which trades pay more or less cannot be determined from bytecode alone.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Uses the pool's static fee. Any extra cost or rebate is applied through the returned before-swap delta rather than a dynamic fee, but the exact formula cannot be determined from bytecode.
Owner & admin controls
No admin controls found.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap is used to run custom logic and take or credit currency before each swap; beforeSwapReturnDelta lets the hook's returned delta alter the swap amounts.

Security & trust assessment

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

Who controls it: No owner or admin selectors were identified, so no privileged key was found; the exact limits of the mapping writes are unknown.

Risk to user funds: The hook can take currency from the pool via take and change swap deltas, so it can affect the tokens traders and LPs exchange; the magnitude depends on logic not visible without source.

Security findings

  • [high] Hook takes currency via return delta: beforeSwapReturnDelta is enabled and the bytecode calls take on the PoolManager, so the hook can move pool tokens and change swap amounts before execution.
  • [medium] Address-keyed balance storage: Storage slot 0 maps addresses to uint128 balances that are read and written during swaps, so the accounting logic determines how much each address can withdraw or be charged.
  • [medium] Unverified source: No verified source is available, so the exact accounting, access checks and any owner controls cannot be confirmed from the bytecode.

Contract details

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

Pools using Likely custom pricing hook