CircusFeeHook on Robinhood Chain
Uniswap v4 Hook Contract 0x1c909636cfb551e257603062806da4929d44a8cc on Robinhood Chain · Fee sharing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $17.41K
- All-time volume
- $122.91K
- Pools using this hook
- 13
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 14,254
What it does
A Uniswap v4 hook for graduated launchpad tokens that charges a fixed 1% fee on the quote asset for every user swap, compounds part of those fees into a hook-owned full-range position, and escrows the rest for the token creator and protocol.
How it works step by step
- Charges a fixed 1% (FEE_BPS 100) fee in the quote asset on each user swap, taking it in beforeSwap for specified-quote swaps and in afterSwap for unspecified-quote swaps.
- Splits each accrued fee into a compound share (compoundBps) and a distribution share (the remainder), tracked in pendingCompound and pendingFees.
- Owns a permanently locked full-range liquidity position per pool, seeded at registration by the launchpad and enlarged by harvest compounding.
- A permissionless harvest credits the creator (splitBps share) and protocol balances in owed, and attempts a compound swap plus liquidity add within a 1% price band of a per-block reference price.
- Users withdraw their owed quote balance via withdraw or harvestAndWithdraw, which pays out from the PoolManager through ERC-6909 burn and take.
- Restricts pool initialization to this hook and requires all third-party liquidity to be full range (MIN_TICK to MAX_TICK); other liquidity callbacks revert.
- Swap behaviour
- In beforeSwap, for swaps where the quote asset is the specified leg, the hook computes a 1% fee, mints it as ERC-6909 claims to itself, accrues it, and returns a positive specified delta so the fee is transferred to the hook. In afterSwap, for swaps where the quote asset is the unspecified leg, it computes a 1% fee on the realized quote amount and returns it as the unspecified delta. Swaps the hook initiates for compounding skip these callbacks.
- Liquidity behaviour
- beforeAddLiquidity reverts unless the position spans MIN_TICK to MAX_TICK. afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeDonate and afterDonate all revert with HookNotImplemented. Liquidity is added only by the hook itself during registerAndSeed and compoundStep.
- Fee behaviour
- The pool's LP fee is set to zero. The hook charges a fixed 1% of the quote amount on every user swap through return deltas. Of each fee, compoundBps is reserved for compounding into the locked position and the remainder is credited to the creator (splitBps of distributed fees) and the protocol recipient returned by the launchpad.
- Owner & admin controls
- The constructor and registerAndSeed are restricted to the immutable launchpad address. The source shows no owner, pause, upgrade or fee-change functions. Fee rate, tick spacing and percentage splits are constants or set per pool at registration. The protocol recipient is read from the launchpad at harvest time, so its controller can redirect future protocol payouts. Full admin surface of the launchpad was not provided.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool creation to the hook itself. beforeAddLiquidity enforces full-range positions. beforeSwap takes the fee on specified quote amounts and returns a specified-leg delta. afterSwap takes the fee on unspecified quote amounts and returns an unspecified-leg delta. beforeSwapReturnDelta and afterSwapReturnDelta are required so the hook can take fees via these deltas.
Security & trust assessment
Risk level: medium (verified source, medium confidence).
Who controls it: No owner key is visible in the source. The launchpad address is immutable and gates pool registration. Its controller can redirect protocol fee payouts by changing protocol() and can drive graduation of new pools through registerAndSeed. The hook's logic does not allow a privileged party to change the fee rate or pause swaps.
Risk to user funds: The hook holds the locked full-range liquidity position, pendingCompound and pendingFees balances as ERC-6909 claims on the PoolManager, and per-user owed balances. Swaps pass through the 1% fee taken by return deltas, so the hook can take up to 1% of quote on each swap by design. The hook cannot block swaps directly, but a reverting compound path is isolated from swaps. Users recover owed balances via withdraw or harvestAndWithdraw.
Security findings
- [medium] Protocol recipient read from external launchpad: _flush calls launchpad.protocol() at every harvest and credits all protocol share to that address. Whoever controls the launchpad can redirect future protocol fees without changing this hook's code.
- [low] Compound swap and price reference dependencies: Compounding swaps use a per-block observed price (obs) with a 1% tolerance and sizes the swap from spot price. Price can be moved within the block to influence the amount compounded into the locked position, a value-leakage vector limited by the tolerance band.
- [low] Compounding failures are isolated but may stall: compoundStep runs via try/catch and failures only emit CompoundFailed, leaving pendingCompound and pendingMeme in place. Repeated failures (for example a price band that is never reachable) leave reserved quote and launch tokens unswapped, though users can still withdraw distributed balances.
- [info] Full-range-only liquidity and locked position: The hook owns a permanent full-range position and rejects all third-party liquidity, so LPs cannot provide concentrated liquidity or exit through the hook. The locked position is controlled only by the hook's own logic.
- [info] Launch token creator lookup is trusted: Fee distribution calls creator() on the launch token. If the call fails, fees stay in pendingFees and emit EscrowDeferred. The creator address returned is trusted without validation.
Contract details
- Verified source
- Yes (CircusFeeHook)
- Compiler
- solc 0.8.35+commit.47b9dedd
- Bytecode size
- 16,229 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, liquidity-management, moves-currency, return-delta, self-unlock
Pools using CircusFeeHook
- ROBINCAT / pHOOD3x (0.00% fee) — 24h volume $0, TVL $1.68K, 1 swaps today
- IQ / pHOOD3x (0.00% fee) — 24h volume $0, TVL $1.08K, 0 swaps today
- WHO / pHOOD3x (0.00% fee) — 24h volume $0, TVL $1.13K, 0 swaps today
- pBTC3x / 3X (0.00% fee) — 24h volume $0, TVL $3.40K, 0 swaps today
- pHOOD3x / ARCINUS (0.00% fee) — 24h volume $0, TVL $880, 0 swaps today
- ETH / HONK (0.00% fee) — 24h volume $0, TVL $2.11K, 0 swaps today
- IQ / pHOOD3x (0.00% fee) — 24h volume $0, TVL $886, 0 swaps today
- ETH / BEPE (0.00% fee) — 24h volume $0, TVL $2.07K, 0 swaps today
- KNIGHT / pHOOD3x (0.00% fee) — 24h volume $0, TVL $865, 0 swaps today
- AI / pHOOD3x (0.00% fee) — 24h volume $0, TVL $844, 0 swaps today
- pHOOD3x / CINEMA (0.00% fee) — 24h volume $0, TVL $807, 0 swaps today
- BRAIN / pHOOD3x (0.00% fee) — 24h volume $0, TVL $828, 0 swaps today
- BROTHER / pHOOD3x (0.00% fee) — 24h volume $0, TVL $820, 0 swaps today