Custom pricing hook on Robinhood Chain
Uniswap v4 Hook Contract 0x2e24565dbd125adcc2b96a86010bc2cade0c6888 on Robinhood Chain · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 72
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook manages a basket of tokens for a pool and takes a configurable fee from swaps through a return delta, with the owner able to adjust fee and rebalance parameters.
How it works step by step
- Hook permissions enable beforeInitialize, beforeAddLiquidity, beforeSwap and beforeSwapReturnDelta, so the hook can inject its own accounting into swaps via a return delta.
- Dispatches a set of token-related functions (tokens, tokenCount, valueOf, circulatingSupply, poolKeyOf, pool, usdg, feeRouter, engine), indicating it manages a basket of ERC20 tokens tied to a pool.
- Stores a per-address uint64 mapping and an address array, consistent with tracking registered tokens and their values.
- Includes a rebalance(address) function and rebalance band parameters (rebalanceBandBps, BUFFER, hookFeeBps, MAX_HOOK_FEE_BPS) that adjust reserves toward target weights.
- Uses an unlock/unlockCallback flow (self-unlock tag) to settle currency movements with the pool manager during rebalancing.
- Owner-controlled setParams(uint16,uint16,uint256) updates fee and band parameters.
- Swap behaviour
- beforeSwap is implemented and can return a delta, so the hook may take or supply tokens on swaps, with a hook fee in basis points (hookFeeBps, capped by MAX_HOOK_FEE_BPS). The exact trade direction that pays more or less cannot be determined from decoded bytecode alone.
- Liquidity behaviour
- beforeAddLiquidity is implemented and gated; beforeRemoveLiquidity and after-liquidity callbacks are dispatched but not enabled in the hook permissions. Liquidity handling is combined with the custom token basket accounting.
- Fee behaviour
- A hook fee is taken from swap flow via a return delta, configured by hookFeeBps bounded by MAX_HOOK_FEE_BPS; the owner can change it through setParams.
- Owner & admin controls
- Owner (Ownable) can call setParams, transferOwnership and renounceOwnership; rebalance is callable by external parties and parameter bounds are enforced in-contract. No pausing or upgrade mechanism was identified from the selectors.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeInitialize validates pool setup; beforeAddLiquidity gates liquidity additions; beforeSwap applies the hook fee and rebalancing accounting; beforeSwapReturnDelta lets the hook take or give currency during swaps.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner can change fee and band parameters via setParams and can transfer or renounce ownership, which affects how much of each swap the hook takes.
Risk to user funds: The hook takes and settles currency via return deltas and unlock-based rebalancing, so it can hold and move pool funds; a flawed rebalance or fee setting could extract value from swaps.
Security findings
- [medium] Return-delta fee and rebalancing: beforeSwapReturnDelta lets the hook take currency from every swap, so trade size and fee rate directly determine user cost. The hook fee is capped by MAX_HOOK_FEE_BPS, which limits but does not remove the risk.
- [medium] Owner-tunable parameters: setParams lets the owner change the fee and band parameters after deployment; the exact bounds are not verifiable without source.
- [low] Unlock-based settlement: unlockCallback and self-unlock logic move currency through the pool manager during rebalance, which depends on correct access checks on the callback.
- [info] Ownership transfer: transferOwnership and renounceOwnership are present, so control of fee and rebalancing parameters can change hands.
Contract details
- Verified source
- No
- Bytecode size
- 14,443 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, liquidity-management, moves-currency, ownable, return-delta, self-unlock
Pools using Custom pricing hook
- USDG / lBTC-3S (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lBTC-3L (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lBTC-2S (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- lBTC-2L / USDG (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- lBTC-1S / USDG (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lBTC-1L (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lETH-3S (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lETH-3L (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- lETH-2S / USDG (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lETH-2L (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lETH-1S (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lETH-1L (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lCOIN-3S (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lCOIN-3L (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lCOIN-2S (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lCOIN-2L (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lCOIN-1S (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- lCOIN-1L / USDG (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lMETA-3S (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / lMETA-3L (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today