Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0x354ccbc7370f30ade061579ae0e7f3f9a26faacc on Robinhood Chain · Fee sharing
- Volume (24h)
- $1.94
- Value locked (TVL)
- $0
- All-time volume
- $1.94
- Pools using this hook
- 2
- Swaps (24h)
- 2 (1 traders)
- Total swaps
- 2
What it does
This hook charges a platform and creator fee on swaps, and during an early anti-sniper window it charges a higher fee to non-whitelisted addresses while whitelisted traders pay the normal fee.
How it works step by step
- Enables a per-pool creator fee and a platform fee, with creator fee accruals tracked per pool key and claimable by the creator
- Applies an anti-sniper fee (SNIPER_FEE_BPS) during a window of MAX_SNIPER_SECONDS after pool initialization, gated by a whitelist of addresses capped at MAX_WHITELIST
- Takes platform fees into hook accounting and lets a deployer-controlled path claim accrued platform fees per currency
- Uses before and after swap callbacks with return deltas, so the hook can take a cut of swap amounts directly
- Tracks liquidity callbacks (add and remove) and a donate callback, which the hook mainly observes rather than customises
- Swap behaviour
- beforeSwap and afterSwap run on every swap. During the sniper window, swaps from non-whitelisted addresses pay an elevated SNIPER_FEE_BPS, while later swaps pay the normal fee. afterSwap returns a delta that takes a platform and creator fee from the swap, so swappers pay the platform and creator fees on top of the pool fee.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are enabled and checked, with a whitelist consulted for sniper handling. No liquidity-amount changes are evident from the decoded callbacks.
- Fee behaviour
- Dynamic: the hook overrides the swap fee with a sniper fee during the early window for non-whitelisted addresses, and takes a platform fee plus a creator fee (capped by MAX_CREATOR_FEE_BPS) out of swap flows. Creator fees are set per pool through setFeeRecipient and claimed via claimCreatorFees.
- Owner & admin controls
- setFactory is callable and sets the factory address; setFeeRecipient(bytes32,address) lets the pool's fee recipient be changed; claimPlatformFees(address,address) and claimCreatorFees move accrued fees out. Access checks suggest a deployer-only path for platform fees. The decoded selectors do not reveal pausing or upgrade logic.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize and afterInitialize record pool setup, beforeAddLiquidity and beforeRemoveLiquidity check the whitelist and liquidity state, beforeSwap applies the sniper fee override, afterSwap accrues platform and creator fees, beforeSwapReturnDelta and afterSwapReturnDelta let the hook take fee amounts from swaps, afterAddLiquidity and afterRemoveLiquidity are present for accounting.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A deployer or privileged key can set the factory, change creator fee recipients, and claim platform fees, and manage the sniper whitelist, which can change who pays higher fees.
Risk to user funds: The hook can take a cut of swap amounts through return deltas and holds accrued platform and creator fees in its own accounting. Those accrued balances can be claimed by privileged paths.
Security findings
- [medium] Hook takes swap amounts via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled, so the hook can take a portion of every swap as platform and creator fees. Fee rates are bounded by constants but the trade-off to users is real.
- [low] Sniper fee gated by whitelist: The early-window fee depends on a mutable whitelist mapping written by the deployer-controlled path, so the set of who pays the sniper fee can be changed.
- [medium] Fee recipient can be reassigned: setFeeRecipient lets a privileged caller change where creator fees go for a pool, which could redirect accrued fees if access control is weak.
- [low] Factory address is settable: setFactory is an external setter on a state slot that other paths read, a standard admin risk if unguarded in the bytecode.
- [info] Decoded bytecode only: Without verified source, access-control checks and arithmetic bounds could not be confirmed from the bytecode alone.
Contract details
- Verified source
- No
- Bytecode size
- 7,842 bytes
- Upgradeable proxy
- No
- Detected patterns
- access-control, dynamic-fee, fee-sharing, mev-protection, moves-currency, return-delta, self-unlock
Pools using Fee sharing hook
- TSLA / AFGANCARLOS (0.00% fee) — 24h volume $1.94, TVL $0, 2 swaps today
- FISH / DELL (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today