StonkHookV3 on Robinhood Chain

Uniswap v4 Hook Contract 0x9265a95731ce3324d3560573f642ed7006789acc on Robinhood Chain · Launchpad · Verified contract

Volume (24h)
$253
Value locked (TVL)
$4.99K
All-time volume
$388.38K
Pools using this hook
5
Swaps (24h)
1 (1 traders)
Total swaps
2,709

What it does

Launch-protected token pool hook that charges a decaying fee on early swaps and permanently locks a share of every fee as one-way liquidity.

How it works step by step

  • Withholds a fee on the asset side of each swap, charged as an ERC-6909 claim via beforeSwap or afterSwap return deltas.
  • Applies an exponentially decaying launch surcharge from launchFee down to the steady fee over launchFeeWindow seconds from launchTime.
  • Splits every withheld fee: liquidityBps becomes a permanent liquidity bucket, the rest accrues to beneficiary fees.
  • Places the liquidity bucket as asset-only positions below spot using a high-water tick anchor, opening new rungs up to maxRungs.
  • Blocks liquidity removal for all senders and restricts liquidity adds to the factory and the hook itself.
  • Records a truncated TWAP for opt-in pools, consultable by the buyback.
Swap behaviour
beforeSwap and afterSwap withhold a fee on the asset leg, so trades pay a rate that decays from launchFee to the steady-state fee during the launch window; the factory is exempt from the surcharge. The hook also enforces the token's trading window and a per-swap output cap, and can emit referral events.
Liquidity behaviour
addLiquidity is restricted to the factory and the hook itself; third parties revert with LiquidityLocked. Any removal with a negative liquidityDelta reverts for every sender, so liquidity can only increase. The liquidity bucket is placed as asset-only, below-spot positions via deepen/afterSwap, and can also be topped up by donateLiquidity from any caller.
Fee behaviour
Withholds a fee in the asset leg via beforeSwap (specified asset) or afterSwap (unspecified asset) as an ERC-6909 claim. Rate starts at launchFee and decays exponentially to the steady-state fee across launchFeeWindow seconds from launchTime, with the factory exempt. liquidityBps of each fee is routed to pendingLiquidity (permanent liquidity bucket); the remainder goes to pendingFees for beneficiaries. The pool itself uses an override fee flag, so the LP fee is set dynamically by the hook.
Owner & admin controls
No owner or admin role in StonkHookV3. The hook is not upgradeable and has no delegatecall. Pool parameters (fee, launch fee, liquidityBps, bands) are set once at registration and cannot be changed. Only the factory can call registerPool, enableObservations, consumePendingFees, sweepFees and increaseObservationCardinality-style setup paths; there is no pause function on the hook itself, though token trading is gated by the token's isTradingOpen.

Enabled Uniswap v4 callbacks

afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

afterInitialize: seeds the high-water tick and optionally starts the TWAP ring. beforeAddLiquidity: restricts adds to factory and hook. beforeRemoveLiquidity: blocks all withdrawals. beforeSwap: enforces the trading window, emits referral events, withholds launch/steady-state fee on the specified asset leg and sets the dynamic LP fee override. afterSwap: withholds fee on the unspecified asset leg, enforces the per-swap output cap, writes TWAP observations, ratchets the high-water mark and attempts automatic placement via try/catch. beforeSwapReturnDelta and afterSwapReturnDelta: enable the hook to take fee amounts through deltas.

Security & trust assessment

Risk level: medium (verified source, medium confidence).

Who controls it: Little privileged control: the factory can register pools, sweep beneficiary fees to the immutable fee locker, and enable observations. No owner key can alter fees, pause swaps on the hook, or extract the liquidity bucket. The factory address itself is immutable at deploy, so the trust reduces to the factory's correctness and the token's isTradingOpen logic.

Risk to user funds: The hook holds ERC-6909 claims for withheld fees and the liquidity bucket, not raw token balances. Withheld asset fees are split between permanent liquidity and beneficiary claims, and swaps are settled through the pool manager. Trader funds are exposed to the fee schedule and launch surcharge, and the hook cannot block swaps except during the trading window and the per-swap output cap.

Security findings

  • [info] Liquidity is designed to be irreversible: Withdrawals of liquidity are blocked for every sender via beforeRemoveLiquidity, and the liquidity bucket has only one exit into positions the hook cannot withdraw. Users cannot pull permanently added liquidity.
  • [medium] Launch-window fee can reach 99%: The launch surcharge can reach 99% of the swap amount in the launch second and charges through the return delta. Traders who do not race the open pay the steady-state fee, but early buyers can lose almost all of their input.
  • [low] Per-swap output cap can block trades: afterSwap reverts with SwapExceedsWalletCap when a single swap output exceeds maxSwapOut, which can block large trades. The name suggests a wallet balance check but it bounds the trade size only.
  • [low] Observation ring sizing dependency: The TWAP guards on consult revert when the ring is not reached back far enough, and the buyback depends on the ring size. An undersized observation ring silently stops the buyback under high trade volume.
  • [medium] Return-delta fee capture on every swap: The hook takes fees through beforeSwap and afterSwap return deltas, so every swap in the pool is subject to its accounting. Any bug in the delta or fee logic would directly affect swap outcomes.

Contract details

Verified source
Yes (StonkHookV3)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
19,018 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, launchpad, return-delta, rewards, tax

Pools using StonkHookV3