MemestonkFeeHook on Robinhood Chain

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

Volume (24h)
$30
Value locked (TVL)
$9.16K
All-time volume
$1.96M
Pools using this hook
1
Swaps (24h)
2 (2 traders)
Total swaps
17,160

What it does

A shared Uniswap v4 hook for memestonk/ETH pools that charges a launch-decaying 10%-to-3% fee on the ETH side of every swap, blocks trading until the launch seeds, and maintains an on-chain TWAP oracle.

How it works step by step

  • Charges a fee in native ETH only, on both buys and sells, never on the memestonk token.
  • Starts the fee at 10% at launch and decays it linearly to 3% over 600 seconds, then holds 3% permanently.
  • Blocks all swaps until the pool's own LPSeeder calls openTrading during seeding.
  • Gates pool initialization of the deterministic meme/ETH key so only the registered seeder can create the pool at its reserves-derived price.
  • Accrues fees per pool and lets anyone call sweep() to push them to the launch's FeeCollector.
  • Maintains a spot price, cumulative price accumulator and 8-slot checkpoint ring to serve on-chain windowed TWAP reads.
Swap behaviour
Swaps revert until trading is opened. On exact-in buys and exact-out sells, beforeSwap takes a tax-exclusive fee on the pool-side ETH and returns it as a positive specified delta. On exact-in sells and exact-out buys, afterSwap takes the fee on the actual ETH delta and returns it as hookDeltaUnspecified. Every swap updates the price oracle and emits HookFeeTaken.
Liquidity behaviour
No liquidity callbacks. The hook does not run on addLiquidity or removeLiquidity. Its only liquidity-related role is beforeInitialize, which restricts pool creation for the deterministic meme/ETH key to the registered LPSeeder.
Fee behaviour
Charges a fee on the native ETH side of every swap in both directions, never on the memestonk token. Steady-state fee is 3% (300 bps); for 600 seconds after trading opens it decays linearly from 10% to 3%. Fees accrue per pool and are pushed to the launch's FeeCollector via the permissionless sweep(). beforeSwap takes tax-exclusive fees on the specified ETH leg and afterSwap takes fees on the actual ETH delta for the unspecified leg, so exact-in and exact-out pay the same effective rate.
Owner & admin controls
No admin controls found. The contract has no owner, no pausing, no upgrade path and no setters; registerPool is callable only by the immutable registrar (the factory) once per pool, and openTrading only by each pool's registered seeder once.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: gates pool initialization so only the pool's registered LPSeeder can initialize the deterministic PoolKey, preventing squatting at hostile prices. beforeSwap: enforces the trading gate (reverts until openTrading) and takes the ETH-specified fee, returning a positive specified-side delta. afterSwap: takes the ETH-unspecified fee, returns it as hookDeltaUnspecified, and updates the TWAP-lite oracle on every swap.

Security & trust assessment

Risk level: low (verified source, high confidence).

Who controls it: No privileged key or admin role exists after deployment. The only privileged actors are the immutable registrar, which registers each pool once, and each pool's seeder, which opens trading once. Neither can change fees, pause swaps, or redirect funds. Fee recipient and seeder are write-once.

Risk to user funds: The hook can hold native ETH fees accrued per pool until sweep is called, but it never custodies or computes fees on the token side. Its sweep path is outside the swap path, and no privileged actor can move, freeze or block user funds. A mis-set recipient cannot occur because it is written once at registration.

Security findings

  • [info] Fee routing is fixed and CEI-ordered: Fee recipient for each pool is set once in registerPool and cannot be changed. sweep() sends accrued ETH to that recipient after zeroing the balance first (checks-effects-interactions), and a failing recipient only reverts the sweep call, not swaps.
  • [info] Anti-squat and trading gate: Swaps revert with TradingNotOpen until the pool's seeder calls openTrading, and beforeInitialize blocks any other party from initializing the deterministic pool key, which removes the pre-initialization griefing vector.
  • [low] Oracle is manipulable over short windows: The hook uses the TWAP-lite accumulator and a gridded ring of 8 checkpoints updated on swaps. Price is derived from the pool's own slot0 spot price, so a sufficiently large trade can move the reported TWAP over short windows; the ring only covers roughly 35 minutes of history once warm.
  • [info] Hook holds accrued ETH fees until sweep: The hook's afterSwap and beforeSwap rely on the PoolManager for accounting, and fee takes are netted within the swap via positive return deltas. Since the hook never holds token1 and only accrues native ETH, the exposure is limited to the ETH fee balance it accumulates before sweep.

Contract details

Verified source
Yes (MemestonkFeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
7,013 bytes
Upgradeable proxy
No
Detected patterns
launchpad, moves-currency, oracle, return-delta

Pools using MemestonkFeeHook