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
- SPCX / BANKERS (0.00% fee) — 24h volume $409.53K, TVL $33.88K, 2,894 swaps today
- SPCX / PAYLOAD (0.00% fee) — 24h volume $260.16K, TVL $7.12K, 2,285 swaps today
- SPCX / SCAT (0.00% fee) — 24h volume $26.82K, TVL $10.34K, 730 swaps today
- SPCX / BALLS (0.00% fee) — 24h volume $25.69K, TVL $4.52K, 775 swaps today
- BABA / BLACKSHEEP (0.00% fee) — 24h volume $22.83K, TVL $13.17K, 89 swaps today
- SPCX / SPACEDEX (0.00% fee) — 24h volume $8.43K, TVL $4.15K, 452 swaps today
- SKHY / KIMCHI (0.00% fee) — 24h volume $8.29K, TVL $10.24K, 95 swaps today
- SPCX / NASDANQ (0.00% fee) — 24h volume $2.17K, TVL $2.99K, 355 swaps today
- SPCX / SHOUSE (0.00% fee) — 24h volume $2.10K, TVL $4.04K, 20 swaps today
- SPCX / GLITCH (0.00% fee) — 24h volume $1.89K, TVL $2.42K, 319 swaps today
- SPCX / WIN (0.00% fee) — 24h volume $1.85K, TVL $2.43K, 313 swaps today
- SPCX / MIGUEL (0.00% fee) — 24h volume $1.73K, TVL $2.44K, 314 swaps today
- SPCX / NEGR (0.00% fee) — 24h volume $1.56K, TVL $2.40K, 288 swaps today
- AGEM / SKHY (0.00% fee) — 24h volume $0, TVL $39.01K, 7,017 swaps today
- BEANS / BABA (0.00% fee) — 24h volume $0, TVL $13.58K, 532 swaps today
- SI / SPCX (0.00% fee) — 24h volume $0, TVL $3.64K, 419 swaps today
- KING / SPCX (0.00% fee) — 24h volume $0, TVL $2.51K, 360 swaps today
- SAM / SPCX (0.00% fee) — 24h volume $0, TVL $2.87K, 350 swaps today
- DUMPL / BABA (0.00% fee) — 24h volume $0, TVL $2.70K, 3 swaps today
- PARAENGI / SKHY (0.00% fee) — 24h volume $0, TVL $2.59K, 2 swaps today