Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xc035dc35566f8dc36331f30d5ec4108a2eded0cc on Robinhood Chain · Fee sharing
- Volume (24h)
- $1.80K
- Value locked (TVL)
- $11.68K
- All-time volume
- $267.17K
- Pools using this hook
- 1
- Swaps (24h)
- 11 (10 traders)
- Total swaps
- 2,068
What it does
A hook that takes a share of swap flows, accrues it per pool and distributes the proceeds to designated recipients through owed balances and handleHookFees.
How it works step by step
- Records pool state on initialization and maintains a price observation history (cardinality and interval constants present).
- Uses beforeSwap and afterSwap with return-delta permissions to skim a share of swap flows into the hook.
- Accrues fees per pool in an accrued mapping and per recipient in owed balances.
- Lets users withdraw owed balances (withdrawOwed) and lets registrars pay out or retry owed amounts.
- Distributes hook fees to a list of addresses via handleHookFees and settles with the PoolManager through an unlock callback.
- Swap behaviour
- beforeSwap and afterSwap run on every swap; the hook records observations and accruals and can return deltas so it takes a portion of the swap amounts.
- Liquidity behaviour
- Liquidity add/remove callbacks are present in the selector set (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) but the hook permissions do not enable them, so they are not invoked by the PoolManager.
- Fee behaviour
- Hook takes return deltas on swaps and accrues amounts keyed by bytes32 in an accrued mapping, then distributes via handleHookFees to addresses; exact fee rate cannot be determined without source.
- Owner & admin controls
- Owner (Ownable2Step: transferOwnership, acceptOwnership, renounceOwnership) can set registrars via setRegistrar, which gate the payOut and withdrawOwed style flows; the initializer slot can be set once via 0x67ad3572. No pausing or upgrade mechanism identified from the decoded selectors.
Enabled Uniswap v4 callbacks
afterInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterInitialize: records pool initialization and per-pool state. beforeSwap: runs before each swap and can return a delta. afterSwap: updates observation and accrual state after each swap and can return a delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take or give currency on swaps, which is how it extracts its share.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: The owner controls registrar assignment and ownership transfer; a malicious or compromised owner could add registrars who can withdraw or redirect owed balances.
Risk to user funds: The hook can take currency via return deltas on swaps and hold owed balances that users withdraw; registrars can trigger payouts. Funds sit in the hook while accrued or owed.
Security findings
- [medium] Hook holds and moves currency: Hook has return-delta permissions and performs currency movements through take/settle and payOut, so it can hold and move pool-derived funds.
- [medium] Registrar-controlled payouts: Owed balances are tracked per user and token and can be withdrawn through withdrawOwed, retried via retryOwed and paid out by registrars via payOut.
- [medium] Privileged owner and registrar keys: Ownable with registrar role; owner key compromise would let an attacker grant registrar roles and drain accrued balances.
- [info] Self-unlock pattern: Uses an unlock callback with self-unlock to move currency; reentrancy guard error present in the bytecode, suggesting protection is implemented.
Contract details
- Verified source
- No
- Bytecode size
- 11,134 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, self-unlock
Pools using Fee sharing hook
- ETH / TORO (0.30% fee) — 24h volume $1.80K, TVL $11.68K, 11 swaps today