Custom pricing hook on Robinhood Chain
Uniswap v4 Hook Contract 0x6fa3c5583305f805d58dbc96afd9a412ba734088 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
- 40,984
What it does
A custom-accounting hook that intercepts swaps with return-delta permissions and prices them through an external price engine, allowing it to take over swap settlement for traders and LPs.
How it works step by step
- Intercepts every swap in beforeSwap and can return a balance delta so the hook, not the pool curve alone, determines the amounts exchanged.
- Obtains swap quotes from an external price engine contract whose address is stored in slot 0 and replaceable via setPriceEngine.
- Settles and claims currency with the Uniswap v4 pool manager using take, settle, sync, mint and burn, holding ERC6909 claim balances.
- Provides deposit and withdraw functions that move funds between the caller and the pool manager on behalf of the hook.
- Exposes liquidity and donate callbacks as selectors, but their logic is not confirmed from decoded bytecode.
- Swap behaviour
- beforeSwap is invoked on every swap and can return a delta that replaces normal settlement; pricing is obtained from the external price engine via getQuote, though exact math is not determinable from the bytecode.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are present as selectors but their logic cannot be confirmed; the hook has no liquidity permissions enabled, so pool liquidity is not directly altered by the hook's callbacks.
- Fee behaviour
- Swap pricing and any fee adjustments are delegated to an external price engine via getQuote(address,uint256,bool,address); the exact fee or return delta computed cannot be determined from the decoded bytecode.
- Owner & admin controls
- A single stored address (storage slot 0) can be replaced via setPriceEngine(address), with no visible owner check confirmed from decoding alone; the price engine is an external contract the hook consults when computing swap pricing, so whoever controls that address controls swap pricing behaviour.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is used to route swaps through custom pricing via the price engine; beforeSwapReturnDelta lets the hook take over part of the swap accounting, so it can settle or claim currency amounts on the pool's behalf.
Security & trust assessment
Risk level: high (decoded bytecode, low confidence).
Who controls it: The price engine address is settable by whichever account is authorised to call setPriceEngine; a compromised or malicious key could point pricing at a contract that misprices swaps and drains pool or hook-held balances.
Risk to user funds: The hook can take and settle currency and hold ERC6909 claims during swaps, and its pricing depends on an externally settable price engine, so user and pool funds are exposed to whatever pricing and accounting the unverified code performs.
Security findings
- [high] Hook can move currency during swaps: beforeSwapReturnDelta is enabled, so the hook can alter the amounts exchanged in swaps and take or settle currency via the pool manager (take, settle, sync, mint, burn selectors are present).
- [high] Swap pricing is replaceable by an unverified admin path: setPriceEngine(address) changes an external dependency that determines swap pricing; no access control check is confirmed from decoded bytecode.
- [medium] Hook holds ERC6909 claim balances: The hook uses ERC6909 claims and an unlockCallback, meaning it holds balances and interacts with the pool manager's accounting outside plain user transfers.
- [medium] Deposit and withdraw paths move funds into and out of the pool manager: depositToUniv4 and withdrawFromUniv4 let funds be moved between the hook and the pool manager; exact authorisation is not confirmed without source.
- [info] Unverified source code: Source is unverified, so logic, access control and pricing math could not be reviewed directly; conclusions rely on selectors and permissions only.
Contract details
- Verified source
- No
- Bytecode size
- 13,337 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, moves-currency, return-delta, self-unlock
Pools using Custom pricing hook
- ETH / USDe (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today