Custom pricing hook on Robinhood Chain

Uniswap v4 Hook Contract 0x048f2dc8a71a0321b5e119cd577c56d0190920cc on Robinhood Chain · Custom pricing

Volume (24h)
$773.06K
Value locked (TVL)
$169.52K
All-time volume
$5.70M
Pools using this hook
21
Swaps (24h)
17,612 (1,918 traders)
Total swaps
93,464

What it does

A Uniswap v4 hook that gates pool initialization against an owner-managed allowlist of factories and curves and applies custom swap accounting through return deltas, apparently for a stock-token pool.

How it works step by step

  • Checks in beforeInitialize that the initializing factory and curve are allowlisted before a pool is accepted
  • Stores pool records in a pools mapping keyed by pool id
  • Runs custom pricing logic in beforeSwap, possibly using fee terms and a token/stock interface
  • Settles accounting in afterSwap via take/credit calls
  • Owner manages allowlists via setFactoryAllowed and authorizeCurve
Swap behaviour
beforeSwap and afterSwap run custom logic and return deltas that can adjust the amounts exchanged and move currency through the hook.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Reads fee terms via an external feeTerms() call and returns a beforeSwap return delta; the exact fee formula could not be determined from decoded bytecode alone, so the fee source is not confirmed.
Owner & admin controls
Owner (Ownable2Step: transferOwnership then acceptOwnership) can renounce ownership, transfer ownership, and call setFactoryAllowed(address,bool) and authorizeCurve(address) to whitelist factories and curves that are allowed to initialize pools through this hook. Owner-only changes are inferred from selectors and storage writes; no parameter-change functions beyond these were identified.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: validates pool initialization against an allowlist of factories and curves (storage mappings) and records the pool in a pools mapping. beforeSwap: computes custom swap logic and may return a delta that replaces part of the swap amounts. afterSwap: updates or settles accounting after the swap and may return a delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take or give currency on swaps, which is reflected by the take/credit and moves-currency selectors.

Security & trust assessment

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

Who controls it: The owner controls which factories and curves may initialize pools using this hook, and can transfer or renounce ownership. Compromise of the owner key could allow adding malicious curves or factories that initialize pools backed by this hook.

Risk to user funds: The hook can take and credit currency during swaps through return deltas, so pool and swapper funds flow through hook accounting. Whether funds can be held or blocked by the hook could not be fully determined from bytecode; no pause function was identified.

Security findings

  • [high] Return-delta swap accounting: Hook returns deltas from beforeSwap and afterSwap and calls take/credit, so it can alter the amounts exchanged and move currency between the pool and the hook.
  • [medium] Owner-controlled pool initialization allowlist: Owner can add factories and curves to allowlists via setFactoryAllowed and authorizeCurve, controlling which pools may be initialized through the hook.
  • [medium] Single owner key: Ownable2Step ownership pattern with renounceOwnership present; owner key compromise would grant control over the allowlists.
  • [info] Unverified pricing logic: Selectors for a stock() and token() interface and PartialFillUnsupported suggest the hook interacts with a stock token and a curve-based pricing model; full behaviour could not be confirmed without source.

Contract details

Verified source
No
Bytecode size
6,474 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, return-delta

Pools using Custom pricing hook