Custom pricing hook on Robinhood Chain

Uniswap v4 Hook Contract 0x8d0c0c46caf5a511deeffb1ef163a462bfaba844 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 takes a share of each swap's output after the trade and accrues it for the platform and rebates, with the exact split and which trade directions pay more not confirmed from the bytecode alone.

This read was written for the hook 0x69e7…e844 on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Hook is initialized on pool creation via beforeInitialize and reads per-pool config keyed by pool id
  • afterSwap takes a share of swap output using afterSwapReturnDelta, so the hook itself receives a portion of traded currency
  • Accrued amounts are tracked in storage slots (surplus, platform owed, rebates) and paid out later via payPlatform and payRebate
  • beforeAddLiquidity gates liquidity additions for the pool
  • Uses the pool manager unlock/take pattern (unlockCallback, self-unlock tag) to move currency out of the PoolManager
  • Contains an ERC20 transfer/approve surface and a USDG balance accessor, indicating it holds a token balance on behalf of the pool
Swap behaviour
afterSwap runs after each swap and, through return deltas, takes a fee-like amount in the output currency which is accrued to the hook; the exact split between trader, LP and platform cannot be fully determined without source, and it is not clear from the decoded input which trade directions pay more.
Liquidity behaviour
beforeAddLiquidity is enabled and can reject or condition additions; removals have no dedicated callback. Liquidity pool accounting appears to use per-pool storage keyed by pool id.
Fee behaviour
Hook-level fee is taken in afterSwap via return deltas and accrued to surplus/platform balances; a MAX_FEE_BPS constant bounds it, and the platform wallet can claim accrued platform funds via payPlatform.
Owner & admin controls
Storage and selectors indicate a keeper address, a platform wallet, and a permissions/config getter; payPlatform and payRebate move funds to the platform wallet and to rebate recipients. Owner or keeper ability to change config or fee parameters cannot be confirmed from bytecode alone.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize: reads and stores per-pool configuration when the pool is created. beforeAddLiquidity: checks or restricts liquidity additions. afterSwap: computes and takes the hook's share of swap output through return deltas. afterSwapReturnDelta: lets the hook modify the swap's unspecified-currency delta.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, low confidence).

Who controls it: A keeper or platform key can trigger payouts and may hold influence over per-pool configuration, so a privileged key could redirect accrued fees or rebates.

Risk to user funds: The hook holds accrued platform and surplus balances and can transfer them; swaps pass through afterSwap return deltas, so a fee or payout change affects trader outputs.

Security findings

  • [medium] Hook takes tokens via return deltas: afterSwapReturnDelta lets the hook claim a share of every swap's output, so the parameters controlling that share directly affect trader proceeds.
  • [medium] Privileged payout functions: payPlatform and payRebate transfer accrued balances to the platform wallet and rebate recipients; a compromised platform or keeper key could redirect accrued funds.
  • [low] Self-unlock and currency movement: The contract calls unlock and take on the pool manager and performs ERC20 transfers and approvals, so it can move currency held by the hook.
  • [info] Unverified source: Without verified source, exact fee caps, admin setters and upgrade paths could not be confirmed.

Contract details

Verified source
No
Bytecode size
16,023 bytes
Upgradeable proxy
No
Detected patterns
erc20, moves-currency, return-delta, self-unlock

Pools using Custom pricing hook