Oracle hook on Robinhood Chain

Uniswap v4 Hook Contract 0x0978ea011e28eec0db67ed6251a3b215ac979080 on Robinhood Chain · Oracle

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

What it does

This hook records a time-weighted price history for each pool so that anyone can read a TWAP, and it charges nothing extra: swaps pay the pool's normal static fee in both directions.

How it works step by step

  • Records a time-weighted observation of the pool price (tick accumulator style) when the pool is initialized, then updates it on every swap.
  • Maintains a ring buffer of observations keyed by an observation index, with a growable cardinality set by increaseObservationCardinalityNext.
  • Exposes observe(uint32[],bytes32) so external callers can read cumulative tick values at past timestamps to compute TWAPs.
  • Exposes observationsById and stateById so the stored observation and index state for a pool can be read directly.
  • Enables beforeSwap and afterInitialize hooks only; liquidity and donate callbacks are present in the dispatch table but the hook permissions flag only afterInitialize and beforeSwap.
Swap behaviour
beforeSwap is non-view and writes to the observation storage, recording the price/tick state for the pool; it does not return a fee override or a custom delta, so swap amounts and fees are unchanged by the hook.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Uses the pool's static fee.
Owner & admin controls
No admin controls found.

Enabled Uniswap v4 callbacks

afterInitialize, beforeSwap

afterInitialize seeds the first observation and cardinality when a pool is created; beforeSwap writes a new observation on each swap to keep the TWAP current.

Security & trust assessment

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

Who controls it: No privileged key was identified in the decoded functions; no owner, pause or upgrade selectors were observed.

Risk to user funds: The hook does not hold, move or block user or pool funds based on the decoded permissions and functions.

Security findings

  • [info] Observations written during swaps: beforeSwap writes to observation storage on every swap, adding gas cost to swappers but not altering swap amounts or fees.
  • [info] No return deltas or fee overrides: The enabled permissions do not include return-delta or dynamic-fee flags, so the hook cannot take or redirect user tokens or change fees.
  • [info] Observation cardinality growth is permissionless: increaseObservationCardinalityNext can be called by anyone, which only lets the caller pay gas to enlarge the ring buffer, with no effect on user funds.

Contract details

Verified source
No
Bytecode size
7,751 bytes
Upgradeable proxy
No
Detected patterns
oracle

Pools using Oracle hook