Custom pricing hook on BNB Chain

Uniswap v4 Hook Contract 0x328f0eb99fda14d66f3bfd2988e439d431150088 on BNB Chain · Custom pricing

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

What it does

A custom accounting hook that runs before each swap on a BSC pool and can adjust swap amounts and move currency, with its exact purpose not determinable from bytecode alone.

How it works step by step

  • Runs logic in beforeSwap on every swap in its pool
  • Reads and writes three storage slots during swaps
  • Returns a before-swap delta that changes the amounts settled with the pool
  • Calls take to transfer currency from the pool manager
  • Reverts on arithmetic or assertion failures (Panic path present)
Swap behaviour
beforeSwap is invoked on each swap, reads and updates stored state, and returns a delta that the hook settles by calling take.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Unclear from decoded bytecode; the hook uses beforeSwap return delta and may take a fee or amount adjustment, but the exact rate source is not determinable.
Owner & admin controls
No admin controls found.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: runs before each swap and computes a custom delta; beforeSwapReturnDelta: lets the hook return a delta that changes the amounts settled with the pool, and it calls take to move currency.

Security & trust assessment

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

Who controls it: No owner or privileged role was identified in the decoded functions, so no centralized key was found; this cannot be fully ruled out without source.

Risk to user funds: The hook can take currency from the pool during swaps through take and return deltas, so pool and swapper funds are affected by its logic, although no owner withdrawal path was found.

Security findings

  • [medium] Hook can alter swap settlement and move currency: The hook has beforeSwapReturnDelta enabled and calls take(address,address,uint256), so it can move pool currency and alter swap settlement amounts on every swap.
  • [info] Mutable state updated on each swap: Storage slots 0, 1 and 2 are both read and written during beforeSwap, indicating state that changes with every swap, but the meaning of these values cannot be determined without source.
  • [info] Possible revert paths: Panic(uint256) appears in the bytecode, indicating checked arithmetic or assertion failures that would revert swaps under certain inputs.

Contract details

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

Pools using Custom pricing hook