Fee sharing hook on Robinhood Chain

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

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$15.61M
Pools using this hook
25
Swaps (24h)
0 (0 traders)
Total swaps
11,278

What it does

A Uniswap v4 hook that takes a configurable fee on swaps and splits it between the protocol owner, a pool creator and a fee recipient, with owner-controlled pause and access lists.

How it works step by step

  • Hook takes a fee from swap output using afterSwapReturnDelta
  • Per-pool fee tiers and dynamic configuration are stored in packed slots
  • Fee is split between owner, creator and fee recipient by basis-point shares
  • Trusted router and trusted origin lists gate which callers can trade
  • Owner can pause the hook or enable whitelist-only trading
  • Owner can withdraw ERC20 balances the hook has accumulated
Swap behaviour
beforeSwap reads per-pool fee configuration and checks access rules; afterSwap computes a fee from the swap output and takes it via afterSwapReturnDelta, with the taken amount routed to owner, creator and recipient shares.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity are present as selectors but liquidity callbacks are not enabled in the hook permissions, so liquidity is not intercepted by the hook; afterAddLiquidity and afterRemoveLiquidity handlers exist in bytecode but are not active per permissions.
Fee behaviour
Hook takes a fee on swaps through afterSwap return delta and splits it between owner, creator and a fee recipient using configurable basis-point shares; per-pool dynamic fee configuration is stored in packed config slots and read in beforeSwap.
Owner & admin controls
Owner (set via owner() and transferOwnership) can pause the hook (setPaused), set owner and creator fee shares (setOwnerBps, setCreatorBps, setFeeRecipient), change fee tiers and gas threshold (setGasThreshold, fee-config setters), manage a trusted router and trusted origin list (setTrustedRouter, setTrustedRouterBatch, setTrustedOrigin), toggle whitelist-only mode (setWhitelistOnly), set per-address flags and fee overrides (setFlag, addrInfo mapping writes), and withdraw tokens held by the hook (withdraw).

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, afterSwapReturnDelta

beforeSwap is used to read per-pool fee configuration and whitelist/trusted-router checks; afterSwap is used to compute and take the fee via return delta; afterSwapReturnDelta allows the hook to take a portion of the swap output as its fee.

Security & trust assessment

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

Who controls it: The owner key can pause swaps, change fee splits (including setting shares that reroute most fees), change the fee recipient, toggle whitelist-only access that can block non-whitelisted traders, and withdraw tokens held by the hook.

Risk to user funds: The hook takes a fee from swap output and accumulates it in its own token balance, which the owner can withdraw; pausing or whitelist-only mode can block swaps but does not appear to custody LP principal.

Security findings

  • [medium] Owner can pause or restrict swaps: Owner can call setPaused to halt hook logic and setWhitelistOnly to restrict trading to whitelisted addresses.
  • [medium] Owner can change fee split and recipient: setOwnerBps, setCreatorBps and setFeeRecipient let the owner redirect the share of swap fees taken by the hook without a timelock visible in the bytecode.
  • [medium] Owner can withdraw hook-held tokens: withdraw(address,address,uint256) moves ERC20 balances out of the hook; access is restricted to owner per selector analysis but the ability to drain accumulated fees is central.
  • [info] Hook holds fee tokens: afterSwapReturnDelta is enabled, so the hook can take tokens from swap output and hold them in its own balance until withdrawn.
  • [info] Single owner key: Ownable access control via owner() and transferOwnership with no visible timelock or multisig requirement in the decoded selectors.

Contract details

Verified source
No
Bytecode size
19,173 bytes
Upgradeable proxy
No
Detected patterns
erc20, moves-currency, ownable, return-delta

Pools using Fee sharing hook