Likely custom pricing hook on Robinhood Chain

Uniswap v4 Hook Contract 0xc31f451548f9d76acfb5fddd4eb58949390a4088 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 runs custom logic before each swap that can adjust swap amounts and withdraw currency from the pool, but the exact effect on which trades pay more or less cannot be determined from the decoded bytecode.

How it works step by step

  • Implements only a beforeSwap callback, which runs before each swap in the pool it is attached to.
  • Packs and updates several uint64 and uint256 values in storage slots 0, 1 and 2 during beforeSwap, indicating per-pool state tracking.
  • Uses beforeSwapReturnDelta, so it can return a delta that changes the amounts the swap settles for.
  • Calls take(address,address,uint256) on the PoolManager to withdraw a currency amount, meaning it can move tokens out of the pool's accounts.
  • Reverts with a Panic(uint256) on arithmetic or bounds failures, which can block the swap in those cases.
  • Decoding alone does not show the exact pricing formula, so the precise economic effect is uncertain.
Swap behaviour
Runs logic in beforeSwap that updates stored state, may return a specific-amount delta, and may take currency from the pool manager during the swap.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Uses the pool's static fee, as no fee override or afterSwap fee logic is decoded. Any economic adjustment would come through the return delta.
Owner & admin controls
No admin controls found in the decoded functions. No owner getter, pause or upgrade selector was identified, but this cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap is used to read and update state and to return a delta that changes swap settlement; beforeSwapReturnDelta allows that delta to alter the swap amounts; take is called to move currency.

Security & trust assessment

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

Who controls it: No privileged role was identified in the decoded bytecode, so centralization cannot be assessed beyond what the state-updating logic does.

Risk to user funds: The hook can hold or move pool currency through take and can change swap amounts via return deltas, so user swap outcomes depend on the hook's logic.

Security findings

  • [high] Return delta can alter swap settlement: beforeSwapReturnDelta is enabled and beforeSwap returns a delta, so the hook can change the amounts traders receive or pay on each swap.
  • [medium] Hook withdraws currency from PoolManager: The bytecode calls take(address,address,uint256), so the hook can move tokens out of the pool's accounts during swaps.
  • [medium] No verified source: Without verified source, the pricing and delta logic cannot be fully audited, which raises the risk of hidden behaviour.
  • [low] Swaps can revert on panic conditions: Panic(uint256) is referenced, so arithmetic or bounds errors in the hook would revert and block affected swaps.

Contract details

Verified source
No
Bytecode size
1,535 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Likely custom pricing hook