Custom pricing hook on Robinhood Chain

Uniswap v4 Hook Contract 0xba3857acb881cd14b821217b5ef0907c36288088 on Robinhood Chain · 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 swaps and can adjust swap amounts and move currency, without verified source to confirm the exact pricing behaviour.

How it works step by step

  • Runs custom logic in beforeSwap on each swap
  • Reads a mapping keyed by address in slot 0
  • Reads and writes a bool flag and uint256 counters in slots 1 to 3
  • Returns a delta to adjust swap amounts via beforeSwapReturnDelta
  • Calls take() to transfer currency to or from the pool manager
Swap behaviour
beforeSwap runs on every swap, can return a delta that changes amounts, and calls take() to move currency.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fees are not clearly set by this hook from the decoded selectors; beforeSwap returns a delta and may override pricing, so fee effect is unknown.
Owner & admin controls
Storage slot 2 (bool) and slot 1 (uint256) are read and written by beforeSwap, and slot 3 is written there as well; without source the exact admin gate cannot be confirmed, but the bool flag in slot 2 may act as a pause or mode switch. No owner-setter selector is visible in the dispatch table.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: runs before each swap and can compute custom amounts. beforeSwapReturnDelta: lets the hook return a delta that changes the swap's token amounts, so the hook can take or give currency.

Security & trust assessment

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

Who controls it: Unknown from bytecode; a privileged key, if present behind the bool flag in slot 2, could enable or disable the custom swap path.

Risk to user funds: The hook can take tokens from the pool via take() and alter swap amounts through return deltas, so user swap proceeds depend on the hook's logic, which cannot be fully verified without source.

Security findings

  • [medium] Hook moves currency during swaps: beforeSwapReturnDelta is enabled and the bytecode calls take(address,address,uint256), so the hook can move currency during swaps.
  • [medium] Swap behaviour gated by stored state: beforeSwap reads and writes a bool flag and several uint256 slots, which may gate swap execution.
  • [low] Possible revert paths on swaps: The bytecode contains a Panic(uint256) selector, indicating checked arithmetic or assert paths that may revert swaps.

Contract details

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

Pools using Custom pricing hook