Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xcf7583e06eaf53a38a521ecd1c46aacced1b8044 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
A Uniswap v4 hook that charges an owner-configurable buy or sell fee on swaps and routes the fee to a designated recipient address.
How it works step by step
- Charges a separate buy fee and sell fee in basis points on swaps
- Caps fee levels with MAX_FEE_BIPS and reverts with FeeTooHigh above the cap
- Takes the fee in afterSwap using a return delta
- Transfers collected fee proceeds to feeRecipient
- Allows the owner to update fees and the fee recipient
- Swap behaviour
- After each swap, the hook calculates a buy or sell fee in basis points and takes it from the swap output through a return delta, forwarding it to feeRecipient.
- Liquidity behaviour
- No liquidity callbacks are enabled; beforeAddLiquidity, beforeRemoveLiquidity, afterAddLiquidity and afterRemoveLiquidity are present in the dispatch table but permissions do not enable them.
- Fee behaviour
- Swaps are charged a buy fee (buyFeeBips) or sell fee (sellFeeBips) in basis points, configurable by the owner up to MAX_FEE_BIPS. The afterSwap callback takes a fee from the swap output via a return delta and sends it to feeRecipient. Total denominator is TOTAL_BIPS.
- Owner & admin controls
- Owner (Ownable) can call setFees to set buy and sell fee bips (capped by MAX_FEE_BIPS, FeeTooHigh error), setFeeRecipient to redirect fee proceeds, transferOwnership and renounceOwnership. The selectors 0x4e2da3d0 and 0xe69f5749 (uint256 arguments, nonpayable) appear to be additional admin setters but are unnamed; they write to storage slots 2 and 1 and are likely fee or config setters. No pause or upgrade mechanism was found.
Enabled Uniswap v4 callbacks
afterSwap, afterSwapReturnDelta
afterSwap: computes and takes the fee from each swap after execution. afterSwapReturnDelta: lets the hook return a delta that adjusts the swap's unspecified-currency amount so the fee is collected by the hook.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: The owner can raise fees up to the cap, change the fee recipient to any address, or renounce ownership. A malicious owner could redirect all collected fees to an address of their choosing instantly.
Risk to user funds: The hook can take a fee from swap output in the unspecified currency via return delta and transfer it to feeRecipient. It does not appear to hold a custodial balance of user funds or block swaps, but the owner controls where fee revenue goes and at what rate.
Security findings
- [info] Hook moves currency on swaps: The afterSwap hook takes tokens via return delta and forwards them to feeRecipient, so the hook holds or routes pool output on every swap.
- [medium] Owner can redirect fee proceeds: setFeeRecipient is callable by the owner with no timelock, so fee proceeds can be redirected immediately.
- [low] Owner can change fees instantly: setFees is owner-only and bounded by MAX_FEE_BIPS; fee level changes take effect immediately for all traders.
- [low] Unnamed admin selectors: Source is unverified; the purpose of the uint256-argument selectors 0x4e2da3d0 and 0xe69f5749 could not be confirmed from bytecode alone.
Contract details
- Verified source
- No
- Bytecode size
- 3,663 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta
Pools using Fee sharing hook
- IMD / SIMD (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today