Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xcc71726bb12b498f2882da2a01fbfa708c24a0cc on Robinhood Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $2.43
- 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 a configurable fee on swaps in launched pools and splits the collected value among up to three recipients.
How it works step by step
- Records a launch record per pool at initialization (beforeInitialize), gated by an allowlist of tokens (tokenAllowed).
- Computes a dynamic hook fee on each swap bounded by MIN_FEE_BPS and MAX_FEE_BPS and an owner-set fee.
- Takes its share of swap amounts via beforeSwapReturnDelta and afterSwapReturnDelta.
- Accumulates pending claims and distributes them by flush according to a three-way split.
- Exposes owner-controlled setters for the fee and the split recipients and weights.
- Swap behaviour
- beforeSwap and afterSwap run on every swap, computing a dynamic fee and taking a share of the swap amounts through return deltas, with accounting tracked per pool.
- Liquidity behaviour
- Liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are present as selectors but are not among the enabled permissions, so they are not invoked by the PoolManager.
- Fee behaviour
- Hook takes a fee (feeBps, currentFeeBps, bounded by MIN_FEE_BPS and MAX_FEE_BPS and an owner-set value) on swaps via return deltas, then routes the collected amounts through a three-way split configured by setSplit. Exact fee formula and token-selection logic could not be fully determined without source.
- Owner & admin controls
- Owner (slot 7) can call setFee(uint16) to change the hook fee, setSplit(address[3],uint16[3]) to change the fee split recipients and weights, transferOwnership and renounceOwnership. Owner can also call 848210ac which writes the tokenAllowed mapping (slot 2) and per-address uint16 mapping (slot 0). No pausing or upgrade mechanism identified.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: records launch metadata and checks tokenAllowed for the pool. beforeSwap: computes the dynamic hook fee and may take currency via return delta. afterSwap: settles fee accounting after the swap and may adjust the delta via return delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take a share of the swap amounts.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: The owner can raise the hook fee up to the MAX bound, change where fees are split, and transfer or renounce ownership. A malicious or compromised owner could redirect the fee split to its own addresses.
Risk to user funds: The hook can take a share of swap amounts through return deltas and can hold pending claims (pendingClaims, pending, flush). Funds held by the hook are at risk if the owner or a bug drains or misroutes pending claims. Exact custody and withdrawal logic cannot be confirmed without source.
Security findings
- [medium] Hook takes tokens during swaps: Hook uses beforeSwapReturnDelta and afterSwapReturnDelta and moves currency via take and unlock, so it can extract value from swaps.
- [medium] Owner can change fee and split parameters: setFee and setSplit are owner-only and can change the extraction rate and recipients at any time without a timelock visible in bytecode.
- [low] Fee parameters can change under traders: Swap-time pricing depends on owner-set fee parameters and on current fee computation, so parameter changes affect execution cost for traders immediately.
- [info] Self-unlock flow: Contract uses a self-unlock pattern via unlock and unlockCallback, which is a common Uniswap v4 pattern but increases the surface for reentrancy-style mistakes if not carefully guarded.
Contract details
- Verified source
- No
- Bytecode size
- 7,959 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, self-unlock
Pools using Fee sharing hook
- ETH / CHCPT (0.00% fee) — 24h volume $0, TVL $2.43, 0 swaps today