Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xf5fdbe87887fda4358f572b1d560501b33d0c0cc on Robinhood Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 189 (83 traders)
- Total swaps
- 189
What it does
This hook takes a fixed fee from every swap, so traders pay a little extra on each trade while the fee is paid out to a designated recipient.
How it works step by step
- Hooks into beforeSwap and afterSwap and uses return deltas, so it can take a share of swap amounts as hook-owned currency
- Exposes feeRecipient() and FEE_PIPS(), indicating a fixed fee in pips that is routed to a recipient
- Calls poolManager unlock, take, mint and burn, so it settles currency with the pool manager and holds ERC-6909 claim balances
- Accumulates fees as pending balances, with pending() to read them and collect() to pay them out
- unlockCallback handles the settlement that the hook performs inside a PoolManager unlock
- Swap behaviour
- beforeSwap and afterSwap both run on swaps and can adjust the swap delta via return deltas, so a fixed share of swap amounts is diverted to the hook and then to the fee recipient; the exact direction-dependence cannot be confirmed from bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Takes a fixed fee in pips (FEE_PIPS) on swaps, accrues it as pending claims, and forwards it to feeRecipient via collect().
- Owner & admin controls
- feeRecipient() is exposed and may be set or fixed at deployment; no owner, pause or upgrade functions were identified in the decoded selectors, but the setter logic cannot be confirmed without source.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap is used to compute and take the fee before the swap, afterSwap settles the fee on the post-swap amounts, beforeSwapReturnDelta and afterSwapReturnDelta let the hook alter the swap amounts it receives.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: If feeRecipient or the fee rate can be changed, a privileged key could redirect future fees or raise the fee taken from swaps.
Risk to user funds: The hook takes a share of each swap through return deltas and holds pending claims until collect() pays them out, so it does hold value that belongs to traders and LPs during settlement.
Security findings
- [medium] Return-delta fee capture: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take currency from every swap, so the fee rate and recipient determine how much user value leaves each trade.
- [medium] Unverified fee and recipient logic: No source is available, so it is unknown whether feeRecipient or FEE_PIPS can be changed by an admin, which would let the fee be raised after deployment.
- [info] Holds ERC-6909 claims: The hook mints and burns ERC-6909 claims through the pool manager and keeps pending balances until collect() is called, so it holds value on behalf of the recipient.
- [info] Self-unlock callback: unlockCallback is reachable and the hook calls unlock on the pool manager; correct access gating on this callback could not be verified.
Contract details
- Verified source
- No
- Bytecode size
- 3,054 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, fee-sharing, moves-currency, return-delta, self-unlock