FeeHook on Robinhood Chain

Uniswap v4 Hook Contract 0xaf3b8c28d6ee47ef48fbe36d3a5981dfddda6840 on Robinhood Chain · Fee sharing · Verified contract

Volume (24h)
$0
Value locked (TVL)
$7.06K
All-time volume
$0
Pools using this hook
1
Swaps (24h)
4 (2 traders)
Total swaps
6,250

What it does

A Uniswap v4 hook for a single meme/quote pool that lets only a designated locker add liquidity and harvests the pool's LP fees into a stash in quote token after each swap.

This read was written for the hook 0x45f8…a840 on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Pins the pool to one meme/quote pair with a fixed LP fee and tick spacing in beforeInitialize
  • Restricts liquidity additions to the immutable LOCKER address in beforeAddLiquidity
  • Calls LOCKER.harvest() after non-locker swaps in afterSwap to realise accrued fees
  • Skips the harvest when the locker itself is the swap sender to prevent recursion
  • Leaves liquidity removal and donation hooks unimplemented, so they revert
Swap behaviour
After every swap not initiated by the locker, afterSwap calls the locker's harvest() in the same transaction; the locker's own inner swaps are skipped to avoid recursion. beforeSwap is not implemented and reverts with NotImplemented if invoked, but it is not enabled in the permissions.
Liquidity behaviour
Only the LOCKER address may add liquidity (beforeAddLiquidity reverts with OnlyLocker otherwise). Removal hooks are unimplemented and revert, so liquidity cannot be removed through the hook's callbacks.
Fee behaviour
Takes no fee itself. The pool's static LP fee (immutable LP_FEE, 1% in the stated config) accrues to the locked seed position; afterSwap then has the locker harvest that fee into the stash in quote token within the same transaction. No dynamic fee.
Owner & admin controls
No admin controls found. All configuration (POOL_MANAGER, MEME, QUOTE, TICK_SPACING, LP_FEE, LOCKER) is immutable and set in the constructor; there is no owner, pause, upgrade proxy or parameter setter.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, afterSwap

beforeInitialize: restricts pool initialisation to the single meme/quote pair with the configured fee and tick spacing. beforeAddLiquidity: allows liquidity additions only from the locker. afterSwap: triggers the locker's harvest() after each non-locker swap to realise and move the accrued fee.

Security & trust assessment

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

Who controls it: No privileged key exists. The main trust point is the LOCKER contract, which the hook calls harvest() on after every swap; a malicious or buggy locker could sell or misroute harvested funds, and the locker is the only party that can add liquidity.

Risk to user funds: The hook itself holds no tokens and cannot move pool funds; it cannot take a fee via return deltas. User funds are exposed indirectly through the LOCKER contract, which holds the seed position and receives harvested fees, and through the possibility that a failing harvest blocks swaps.

Security findings

  • [medium] Swaps depend on the locker's harvest succeeding: afterSwap makes an external call to the immutable LOCKER address on every swap not initiated by the locker. If harvest() reverts, the swap reverts too, so a failing locker can block trading in this pool.
  • [low] Reentrant harvest path relies on locker logic: The hook calls the locker's harvest(), which sells meme-side fees into the same pool; that inner swap is excluded by the sender check, but the outcome depends entirely on the locker's implementation, which is not part of this source.
  • [info] No direct token capture by the hook: afterSwap's returned int128 is 0 and the hook has no returns-delta permission, so the hook cannot take or redirect swap tokens directly.
  • [info] Pool and liquidity are tightly restricted: Pool key is pinned to one meme/quote pair, fee and tick spacing, and liquidity is restricted to the locker, preventing rogue pools using this hook.

Contract details

Verified source
Yes (FeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
3,528 bytes
Upgradeable proxy
No

Pools using FeeHook