Fee sharing hook on Robinhood Chain

Uniswap v4 Hook Contract 0x2c668601193e4a081dd82604785e436aff6a2acc on Robinhood Chain · Fee sharing

Volume (24h)
$314.04K
Value locked (TVL)
$33.63K
All-time volume
$462.17K
Pools using this hook
1,315
Swaps (24h)
1,901 (240 traders)
Total swaps
5,348

What it does

A Uniswap v4 hook that charges a configurable base fee with a snipe-protection window on swaps and splits the accrued fees among a creator, a distributor and a protocol treasury.

How it works step by step

  • Charges a base fee in basis points, bounded by a constant maximum.
  • Applies an early-block snipe surcharge within a configurable window after launch.
  • Accrues creator, distributor and protocol fees per pool id.
  • Lets the creator be transferred and accepted through a two-step process.
  • Settles or withdraws accrued balances using take, settle and withdraw paths via the pool manager.
  • Self-unlocks the pool manager to move currency during callbacks.
Swap behaviour
beforeSwap computes a fee that can include a base fee and an early-snipe surcharge; afterSwap records the accrued amount. Return-delta permissions let the hook settle part of the swap amounts itself, so it takes a share of the traded flow.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity callbacks are enabled. The add path appears to record a per-pool flag and the remove path is a view-level check, suggesting liquidity changes are gated or observed by the hook; the precise gating logic cannot be confirmed from bytecode.
Fee behaviour
Decoded selectors indicate a base fee in basis points (baseFeeBps, bounded by MAX_BASE_FEE_BPS), a snipe-protection window (snipeStartBps, MAX_SNIPE_START_BPS, windowBlocks, MAX_WINDOW_BLOCKS), a creator tax (maxCreatorTaxBps, pendingCreator, pendingOf, grossOf) and a protocol fee (protocolFeeBps, treasury). Fees appear to be accrued per pool and split between creator, distributor and protocol, with pending balances claimable via settle, withdraw and acceptCreator; exact formulas cannot be verified.
Owner & admin controls
Storage slot 0 holds an address with a setter (setFactory, selector 0x5bb47808) that is the only privileged-looking write; the owner/admin identity cannot be confirmed without source. Selectors such as transferCreator, acceptCreator, authorizeMint and withdraw suggest creator-scoped permissions keyed by pool id rather than a global owner. Parameters such as baseFeeBps, MAX_BASE_FEE_BPS, snipeStartBps, windowBlocks and maxCreatorTaxBps are present as configurable or constant values, but whether they are mutable cannot be confirmed from decoded bytecode.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: validates or records pool setup at initialization. beforeAddLiquidity: gates or records liquidity additions. beforeRemoveLiquidity: checks liquidity removals. beforeSwap: computes the swap-time fee and snipe logic and may use trusted-router checks. afterSwap: updates accrued fee and distribution accounting after the swap. beforeSwapReturnDelta: the hook can return a delta that alters the swap amounts it settles, indicating it takes or redirects part of the swap flow. afterSwapReturnDelta: the hook can return a post-swap delta, indicating it can take a share of output tokens.

Security & trust assessment

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

Who controls it: The factory setter and any creator or owner keys can redirect creator and protocol fee destinations via transferCreator, acceptCreator and treasury-related settings. Governance of baseFeeBps and snipeStartBps (if mutable) could change trader costs, and maxCreatorTaxBps sets the ceiling on what a creator may take.

Risk to user funds: The hook takes currency through return deltas and take/settle calls and holds pending creator, distributor and protocol balances keyed by pool id, so swap proceeds and fee accruals pass through the hook. A bug in accounting or a privileged key could misdirect those balances; blocking of swaps is possible only if a pause or gating path exists, which is not confirmed.

Security findings

  • [medium] Return-delta fee capture on swaps: The hook enables both beforeSwapReturnDelta and afterSwapReturnDelta, so it can alter the amounts settled on each swap and take a share of the flow.
  • [medium] Hook moves currency via self-unlock: Decoded bytecode contains take, settle, sync and unlock calls, and the hook self-unlocks the pool manager (unlockCallback), so it moves currency during callbacks.
  • [medium] Fee recipient reassignment: Creator and fee-recipient reassignment selectors (transferCreator, acceptCreator, setFactory) are present, so a privileged key could redirect accrued fees.
  • [info] Unverified source: No verified source is available, so function semantics, access control and upgrade paths are inferred from selectors and storage only.

Contract details

Verified source
No
Bytecode size
23,315 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta, self-unlock

Pools using Fee sharing hook