Custom pricing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xb5f28198750864e199477a6898bad44ae4d1e0cc 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
This hook charges an opening fee on swaps during an initial window after the pool opens and then falls back to the pool's normal fee, so swaps in that window pay more while later trades pay the standard rate.
How it works step by step
- Pool is initialized through beforeInitialize, which sets a one-time initialized flag and records the opening time.
- beforeSwap runs during an opening window (OPENING_SECONDS) and, when active, can take a fee via return deltas.
- afterSwap updates a stored counter and accumulated collected amount, and can settle currency through the pool manager.
- unlockCallback is reached through a self-initiated unlock, letting the hook move currency during swap settlement.
- sweep is an externally callable function that moves accumulated balances out of the hook.
- Exposes views for the opening fee, current fee, pending amount, LP fee and tick spacing.
- Swap behaviour
- During the opening window beforeSwap computes a fee (OPENING_FEE, reported by feeNow) and applies it through return deltas, so swaps in that window pay the opening fee; after the window the hook adds no charge. Exact direction-specific effects cannot be confirmed from the decoded bytecode.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses an opening fee (OPENING_FEE) for swaps during OPENING_SECONDS after the pool opens, tracked via feeNow and openedAt; after that the pool's LP fee (LP_FEE) applies. Collected amounts accumulate in storage and can be swept out.
- Owner & admin controls
- No owner or pause control was identified in the decoded selectors; sweep is callable and its access restriction could not be confirmed from bytecode.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize records the pool open state and starts the opening timer; beforeSwap computes and returns the opening fee delta; afterSwap updates collected accounting and may return a settlement delta; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take currency from swaps.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: If sweep has no access restriction any caller can extract accumulated fees; otherwise a privileged key could sweep collected balances. No upgrade or parameter-change path was found.
Risk to user funds: The hook holds accumulated fee balances in its own storage and can take currency from swaps via return deltas; funds held by the hook depend on sweep access control.
Security findings
- [medium] Hook takes currency via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled, so the hook can divert part of each swap's amounts to itself as a fee.
- [medium] Sweep function callable: sweep (0x35faa416) is nonpayable and writes to storage slot 2; if it lacks access control it could move accumulated balances, and this could not be confirmed without source.
- [low] Self-initiated unlock callback: The hook calls unlock on the pool manager and handles unlockCallback, which moves currency during settlement; correctness depends on the callback validating the caller.
- [info] Time-window gating: Behaviour changes based on openedAt and OPENING_SECONDS, so the fee schedule is time-dependent.
Contract details
- Verified source
- No
- Bytecode size
- 10,864 bytes
- Upgradeable proxy
- No
- Detected patterns
- liquidity-management, moves-currency, return-delta, self-unlock
Pools using Custom pricing hook
- IMD / KEPT (1.25% fee) — 24h volume $0, TVL $0, 0 swaps today