Oracle hook on Robinhood Chain

Uniswap v4 Hook Contract 0x20f8b7ec9cc3bb5c739dedb15a8b4275f84b00c8 on Robinhood Chain · Oracle

Volume (24h)
$14.99K
Value locked (TVL)
$33.77K
All-time volume
$806.67K
Pools using this hook
4
Swaps (24h)
303 (64 traders)
Total swaps
17,976

What it does

An oracle-style hook with pausable governance that runs on swaps and can adjust swap settlement through a return delta, though its exact behaviour cannot be confirmed without source.

How it works step by step

  • Runs custom logic in beforeSwap before each swap executes
  • Updates stored state or observation data in afterSwap
  • Can return a delta from beforeSwap that changes swap amounts or takes tokens
  • Exposes view functions for pool state and oracle-style observations
  • Includes a pause flag and governance role that can gate or reconfigure the hook
  • Stores a fee recipient address that may receive hook-taken value
Swap behaviour
beforeSwap and afterSwap run on every swap, and beforeSwapReturnDelta lets the hook alter the swap delta, likely to take a fee or adjust amounts; exact math is not confirmed.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors exist as views in the dispatch table but no liquidity permission is enabled on the address, so these callbacks are not invoked by the PoolManager.
Fee behaviour
Not determinable from decoded bytecode alone; the hook has a fee recipient address and return-delta permission, so it may take or redirect a portion of swap amounts via beforeSwapReturnDelta, but the exact fee logic is unclear.
Owner & admin controls
Governance address (slot 8 offset 1, set via transferGovernance) and a pause flag (slot 8 offset 0, read by paused()) appear to control the hook; selectors 0x71fec922 and 0x9a0b92df write the bool flag, 0xd38bfff4 transfers governance, 0x9fd57e80 writes the fee recipient address, and 0xf0bc4596 writes a mapping(address=>bool) allowlist. Exact authorization logic cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta

beforeSwap: runs before each swap and is the entry point for custom logic, likely reading oracle-style state (poolState, observation storage). afterSwap: runs after each swap and likely updates stored state or accounting. beforeSwapReturnDelta: lets the hook return a delta that alters the swap amounts, so the hook can take or give tokens during a swap.

Security & trust assessment

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

Who controls it: A governance or owner key can pause the hook (if the pause flag blocks swaps), transfer governance, change the fee recipient, and manage an allowlist, which together could redirect swap-derived value or halt swaps for all users.

Risk to user funds: The hook can hold or move swap-related token amounts through its return delta, and an owner-controlled fee recipient plus pause flag could redirect or block flows for users; the exact amount of exposure cannot be determined from bytecode alone.

Security findings

  • [medium] Return-delta permission allows the hook to take swap funds: Permissions include beforeSwapReturnDelta, so the hook can return a delta that adjusts the amounts a swap settles, meaning it can take a share of swap funds.
  • [medium] Pausable hook can block swaps: A pause flag and paused() selector exist, and the pause setter is reachable through a function writing the bool at slot 8, so a privileged key may be able to halt swaps.
  • [medium] Centralized governance and fee recipient control: Governance can be transferred via transferGovernance (0xd38bfff4) and a fee recipient address is writable (0x9fd57e80), so a single key controls where value flows.
  • [info] Source not verified: Without verified source, the authorization checks on admin setters cannot be confirmed; the findings above are inferred from storage writes and selectors only.

Contract details

Verified source
No
Bytecode size
18,991 bytes
Upgradeable proxy
No
Detected patterns
oracle, pausable, return-delta

Pools using Oracle hook