Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xcaad18619962277433c82cfe7b173b880e94e044 on Robinhood Chain · Fee sharing
- Volume (24h)
- $8.81
- Value locked (TVL)
- $2.25
- All-time volume
- $8.81
- Pools using this hook
- 1
- Swaps (24h)
- 10 (3 traders)
- Total swaps
- 10
What it does
This hook takes a configurable fee from swap output, so traders pay that fee on every swap while the pool's liquidity providers see it accrue to creator, buyback and protocol accounts.
How it works step by step
- Registers pools in beforeInitialize and records a launch and creator recipient per pool id
- Takes a hook fee on swaps in afterSwap via afterSwapReturnDelta and accrues it into per-pool balances for creators, buyback and protocol recipients
- Splits accrued fees by configurable protocol fee share and buyback burn basis points
- Tracks pending creator tax, buyback and per-recipient fee balances in nested mappings that can be swept or rescued
- Routes fees through a fee escrow and a buyback vault, and uses unlockCallback with the pool manager to move currency
- Enforces a maximum internal price impact limit configured by the owner
- Swap behaviour
- In afterSwap a hook fee (hookFeeBps, applied by the fee policy) is taken from the swap output via return delta and credited to fee accounting; the swapper pays the fee as a reduced output. A maximum internal price impact check is configured but the precise gating in beforeSwap is not confirmed from decoded bytecode.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are exposed as view-level dispatch entries; they appear to only observe or gate liquidity changes and do not clearly alter balances, though this cannot be fully confirmed.
- Fee behaviour
- Hook fee is set by hookFeeBps and split by protocolFeeShareBps between protocol recipient and per-pool creator, buyback and fee sweep accounts; the pool's static fee is not replaced by a dynamic fee schedule in the visible selectors beyond the currentFeePolicy getter.
- Owner & admin controls
- Owner (Ownable with two-step transfer and renounce) can set the factory, buyback vault, fee sweep operator, protocol fee recipient, hook fee bps, protocol fee share bps, buyback burn bps and max internal price impact bps; the owner can also sweep or rescue accrued fees via the operator and rescue functions.
Enabled Uniswap v4 callbacks
beforeInitialize, afterSwap, afterSwapReturnDelta
beforeInitialize registers the pool and its launch parameters; afterSwap takes the hook fee and accrues it via afterSwapReturnDelta; the liquidity callbacks are present for observation or gating; beforeSwap is present for swap validation.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner key can change the hook fee, fee split, buyback burn, recipients, factory, vault and price impact cap, and can sweep or rescue accrued fees, which could redirect or extract fee value.
Risk to user funds: The hook takes a portion of swap output through return deltas and holds accrued fee balances in its own accounting; those balances can be swept or redirected by privileged roles, so swappers and LPs are exposed to fee changes and fund movements.
Security findings
- [high] Owner can raise hook fee: setHookFeeBps is an owner-only nonpayable function that changes the fee taken from every swap, so the owner can increase the fee on existing pools.
- [medium] Return delta takes user output: afterSwapReturnDelta lets the hook reduce swap output by the hook fee, moving currency out of the trader's proceeds into hook-controlled accounting.
- [high] Privileged sweep and rescue of fees: sweepPoolFees and rescuePoolFees are reachable by the fee sweep operator or owner and can move accrued pool fee balances to other recipients.
- [medium] Owner-controlled recipients and vault: setProtocolFeeRecipient, setBuybackVault, setCreatorFeeRecipient and setFeeSweepOperator let privileged keys redirect where fees are sent.
- [info] Possible upgradeable or external dependency: Factory and fee escrow addresses are settable by the owner, so behavior depends on external contracts that can be changed.
Contract details
- Verified source
- No
- Bytecode size
- 14,871 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc20, fee-sharing, launchpad, liquidity-management, moves-currency, ownable, return-delta, self-unlock, tax
Pools using Fee sharing hook
- ETH / TSSMOKE (0.00% fee) — 24h volume $8.81, TVL $2.25, 10 swaps today