Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xf3a4d8ba4e181b4301b805e7d37eb1711106e0cc 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 takes a configurable fee on swaps, splits it toward a team wallet, and lets the owner adjust fee rates and enable or pause trading.
How it works step by step
- beforeInitialize records pool parameters including pool id and tick spacing at initialization
- beforeSwap checks trading status and computes the team fee from stored bps values
- afterSwap settles the fee through afterSwapReturnDelta and accumulates the amount
- collectFees and distribute move accumulated balances toward the team wallet and vault
- setFees, setTeamWallet, setVault and setBatchThreshold let the owner adjust parameters
- emergencyWithdraw lets the owner extract tokens held by the hook
- Swap behaviour
- On swaps the hook runs beforeSwap and afterSwap, uses return deltas to take a team fee from the swap amounts, and records accumulated amounts for later collection and distribution; trading can be disabled by the owner.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors are present in the dispatch table but the hook permissions do not enable them; liquidity is not intentionally managed by the hook.
- Fee behaviour
- Fees are set by the owner via setFees with four uint16 parameters (likely team buy/sell and other bps values); swap-side fees are applied through beforeSwap/afterSwap with return deltas and split to a team wallet, with collectFees and distribute moving accumulated amounts.
- Owner & admin controls
- Owner (Ownable) can set team wallet, fees (setFees with uint16 values), trading enabled flag (setTrading), batch threshold (setBatchThreshold), vault address (setVault), emergency withdraw of tokens (emergencyWithdraw), and transfer or renounce ownership. Ownership and renounce functions exist.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize sets up pool state at initialization; beforeSwap and afterSwap run on each swap and can adjust amounts via return deltas (beforeSwapReturnDelta and afterSwapReturnDelta) to take a fee; no liquidity callbacks are enabled.
Security & trust assessment
Risk level: high (decoded bytecode, low confidence).
Who controls it: The owner can change fee rates, toggle trading on or off (blocking swaps), change the team wallet and vault, and withdraw tokens via emergencyWithdraw, so a compromised owner key could redirect fees or drain hook-held funds.
Risk to user funds: The hook receives tokens through return deltas on swaps and holds collected fees; the owner can withdraw those balances via emergencyWithdraw, redirect them via setTeamWallet or setVault, and block swaps via setTrading, so user swaps and pool liquidity routed through the hook depend on the owner key.
Security findings
- [high] Owner can halt trading: The owner can call setTrading to disable swaps, which reverts swaps through the hook (TradingDisabled error present).
- [high] Owner emergency withdrawal of hook balances: emergencyWithdraw(address,address,uint256) lets the owner move tokens held by the hook to an arbitrary destination.
- [medium] Fee parameters controlled by owner: setFees accepts uint16 values without visible range checks in the decoded dispatch; a FeeOutOfRange error exists, suggesting bounds are enforced, but the exact limits cannot be confirmed without source.
- [medium] Hook takes tokens during swaps: Hook takes a share of swaps via beforeSwapReturnDelta and afterSwapReturnDelta and holds accumulated fees until collectFees or distribute is called.
- [medium] Recipient addresses are changeable: setTeamWallet and setVault can redirect where collected fees and vault funds flow.
Contract details
- Verified source
- No
- Bytecode size
- 14,417 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, self-unlock
Pools using Fee sharing hook
- ETH / FORTEX (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today