Custom pricing hook on Robinhood Chain
Uniswap v4 Hook Contract 0x73ce58fd834869ba59fe477c7f7ceb885c10a0cc 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 a configurable toll in basis points on swaps through return deltas, so swaps through the pool pay the toll on top of the pool fee while liquidity providers are not affected by the hook.
How it works step by step
- Acts as the pool's custom token-accounting hook with beforeSwap and afterSwap return deltas, so it can take a cut of swap amounts (a toll) before and after each swap.
- Tracks a toll rate in basis points via tollBps, TOLL_MIN_BPS and TOLL_MAX_BPS bounds, with tollCollected and tollDrawn counters recording accrued amounts.
- Holds an ERC20-style token balance and ERC6909 claim balances (mint and burn via the pool manager), and can move currency through the pool manager take and unlock flow.
- Owns a set of tins (tin(uint8), tins(), bearerOf(uint8)) that appear to be claim slots, and allows the owner to draw from them with draw(uint8,uint256), gated by a bearer check.
- Initializes pool state in beforeInitialize and afterInitialize, storing band and rate parameters that control the toll calculation.
- Uses an unlockCallback for self-unlocking the pool manager to perform accounting operations.
- Swap behaviour
- beforeSwap and afterSwap are both enabled with return deltas, so the hook can adjust the amount a swap settles and take a toll from the swap; trades that move through the tolled path pay the toll, and the exact split between input and output depends on the decoded logic that could not be fully resolved.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are present as selectors, but the hook permissions do not enable them, so the pool manager will not call them; liquidity is not modified by the hook.
- Fee behaviour
- Charges a toll in basis points (tollBps) bounded between TOLL_MIN_BPS and TOLL_MAX_BPS, collected through return deltas rather than the pool's LP fee; the toll is accumulated in tollCollected.
- Owner & admin controls
- Ownable: the owner can transfer or renounce ownership. The owner also appears able to change tolls and draw from tins; exact parameter setters could not be fully confirmed from the decoded selectors. No upgradeability or pause was identified.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize sets up pool parameters at pool creation; beforeSwap applies the toll before a swap executes via return delta; afterSwap settles or finalizes the toll after the swap via return delta; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to alter the amounts exchanged.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A single owner key can renounce or transfer ownership and appears able to adjust toll parameters and draw from the tins, which could change swap costs or extract accrued balances.
Risk to user funds: The hook holds balances (ERC20 and ERC6909 claims) and moves currency through the pool manager via return deltas, so it can take user funds on swaps and hold the accrued toll until drawn.
Security findings
- [high] Return-delta toll on every swap: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take currency from every swap, so trades can be taxed by the hook rather than only by the pool fee.
- [medium] Owner-adjustable toll: The toll is stored in bps with min and max bounds; if the owner can set tollBps up to TOLL_MAX_BPS, swappers could face a high tax set by a single key.
- [medium] Owner-controlled draw from tins: draw(uint8,uint256) is callable and the bearer gate could not be fully verified from bytecode, so an owner or bearer path may withdraw accumulated balances.
- [info] Unverified source: No verified source is available, so the exact fee formula, bearer logic and any hidden owner paths are inferred from selectors and storage only.
Contract details
- Verified source
- No
- Bytecode size
- 9,472 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, erc6909-claims, moves-currency, ownable, return-delta, self-unlock, tax
Pools using Custom pricing hook
- ETH / PEAL (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today