Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xfa7feccfb9a08e69457f876c3bebccbb39bde8c4 on Robinhood Chain · Fee sharing
- Volume (24h)
- $0.24
- Value locked (TVL)
- $3.16
- All-time volume
- $0.24
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 1
What it does
This hook charges a dynamic tax on swaps in each pool and splits the collected amount between the platform, the pool creator and a banked balance, so swappers pay more than the base pool fee.
How it works step by step
- Hooks into beforeInitialize to register each new pool and record its creator and parameters in storage.
- Applies a dynamic tax on swaps via beforeSwap, with the current tax in basis points exposed through currentTaxBps(bytes32) and a starting tax exposed through taxStartBps().
- Uses afterSwap with return deltas to take a share of swap output, which is split between a platform share, a creator share and a banked remainder.
- Accrues creator fees per pool (creatorFees, claimCreatorFees) and tracks owed balances per address that can be pushed or claimed through pushOwed, owed and claim.
- Gates liquidity additions and removals through beforeAddLiquidity and beforeRemoveLiquidity, and runs an unlockCallback that lets the hook manage pool-manager accounting itself.
- Swap behaviour
- beforeSwap applies a tax to swaps based on the pool's current tax rate, and afterSwap takes a portion of the swap through return deltas, so swappers pay the tax and the hook's cut on top of the pool fee. The exact direction-dependence (buy vs sell) cannot be confirmed from the decoded bytecode alone.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity are gated by the hook. Additional after-liquidity callbacks exist but their logic cannot be fully determined without source.
- Fee behaviour
- A tax in basis points is computed per pool and taken on swaps (bounded by MAX_TAX_BPS and MAX_TOTAL_BPS), and the collected amount is split between platform (platformBps), creator (creatorBps) and banked balances. Pool-level fee is not otherwise changed.
- Owner & admin controls
- setInitializer(address) is a nonpayable setter that changes a stored address (slot 0) controlling who may initialize pools; platform and creator fee parameters are stored and read as constants or storage values. No explicit pause or upgrade function was identified, but the bytecode does not show whether owner-only checks guard the setters.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta
beforeInitialize registers new pools and their creator; beforeAddLiquidity and beforeRemoveLiquidity gate liquidity changes; beforeSwap sets the tax; afterSwap takes a share of output through afterSwapReturnDelta; afterInitialize, afterAddLiquidity, afterRemoveLiquidity and donate callbacks are present in the dispatch table but their use is not clear from the bytecode.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A privileged key with control over the initializer, platform or creator parameters could change which pools are accepted or alter fee splits affecting creators and LPs. Owner identity and whether these setters are restricted are not verified.
Risk to user funds: The hook can take tokens from swaps through return deltas and holds owed balances for platform, creator and banked amounts, so it does hold and move user-related funds during swaps and claims.
Security findings
- [medium] Hook takes a share of swap output via return deltas: afterSwapReturnDelta lets the hook take a portion of each swap's output, so swappers receive less than the pool price implies.
- [medium] Adjustable initializer address: setInitializer(address) writes to storage slot 0, which gates pool initialization; a privileged key controlling this could register or steer pools.
- [info] Tax parameters stored on-chain: Tax thresholds and split parameters are read from storage and constants (MAX_TAX_BPS, MAX_TOTAL_BPS, taxStartBps, platformBps, creatorBps); their mutability is not confirmed.
- [info] Reentrancy guard present: A Reentrancy error selector appears in the bytecode, suggesting a reentrancy guard is used around fund movements.
Contract details
- Verified source
- No
- Bytecode size
- 14,114 bytes
- Upgradeable proxy
- No
- Detected patterns
- fee-sharing, return-delta, self-unlock, tax
Pools using Fee sharing hook
- ETH / FAIRAL (0.30% fee) — 24h volume $0.24, TVL $3.16, 1 swaps today