Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xec00b118d5c21ed35ac48506ce92e5e0351a00cc on Robinhood Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook skims a buy fee or sell fee from each swap and sends it to a fee recipient, so traders pay the fee on swaps while liquidity providers are not charged.
How it works step by step
- Hook exposes buy and sell fee constants (BUY_FEE_BPS and SELL_FEE_BPS) and a feeRecipient address, indicating a per-swap fee skim.
- beforeSwap and afterSwap are both implemented and can return deltas, so the hook can take a portion of swap amounts.
- Uses take(address,address,uint256) from the pool manager to move the skimmed currency to the fee recipient.
- Liquidity and donate callbacks are present in the dispatch table but appear to be pass-through with no custom accounting observed.
- Swap behaviour
- Swaps are gated in beforeSwap and settled in afterSwap; the hook takes a fee (BUY_FEE_BPS or SELL_FEE_BPS depending on swap direction, as inferred from the decoded bytecode) and routes it to feeRecipient via pool manager take calls.
- Liquidity behaviour
- No custom liquidity logic found; beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are dispatched but appear to only return their selectors.
- Fee behaviour
- A buy fee and a sell fee, both in basis points, are taken from swaps and sent to feeRecipient; the exact direction mapping and rates cannot be confirmed without source.
- Owner & admin controls
- feeRecipient and fee constants are exposed as view functions; no setter selectors were decoded, so no admin change path was identified, though this is not conclusive from bytecode alone.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap and beforeSwapReturnDelta are used to compute and reserve the fee delta on the way in; afterSwap and afterSwapReturnDelta are used to finalize and settle the fee amount after the swap.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: Without source it cannot be confirmed whether an owner can change feeRecipient or the fee rates; if they are mutable, a privileged key could redirect all fee flow.
Risk to user funds: The hook takes a share of swap amounts through return deltas and sends it to feeRecipient, so traders pay the fee on every swap and LPs are not directly exposed.
Security findings
- [medium] Hook takes currency via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled and the bytecode calls take, so the hook moves user swap proceeds to feeRecipient on every swap.
- [info] Fee recipient is a single address: feeRecipient() is a view getter; if it is immutable, funds flow to a fixed address, otherwise a setter may exist that was not decoded.
- [info] Fee rates not verified: BUY_FEE_BPS and SELL_FEE_BPS are exposed as constants; their magnitudes could not be read from decoded bytecode, so the maximum possible take is unknown.
Contract details
- Verified source
- No
- Bytecode size
- 2,926 bytes
- Upgradeable proxy
- No
- Detected patterns
- fee-sharing, moves-currency, return-delta