StockRipTokenHook on Robinhood Chain

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

Volume (24h)
$292
Value locked (TVL)
$23.48K
All-time volume
$4.85M
Pools using this hook
1
Swaps (24h)
7 (4 traders)
Total swaps
69,280

What it does

A single-token launchpad hook for the ETH/StockRipToken pool that charges a flat 1% fee on both buys and sells, routes the fee to an owner-set wallet, and restricts pool creation and seed liquidity to the token's one-shot launch.

How it works step by step

  • Restricts pool initialization to an ETH/StockRipToken pool bound to the configured token, only while the token's launching() flag is set, and only once.
  • Allows seed liquidity to be added only during the token's launch, by granting the token transfer allowance for the deposited amount.
  • Charges a flat 1% fee on buys by taking StockRipToken output, swapping it to ETH through the pool, and forwarding the ETH to feeAddress.
  • Charges a flat 1% fee on sells by taking ETH from the swap proceeds and forwarding it to feeAddress.
  • Gates buys while externalBuysEnabled is false so only whitelisted protocol buyer contracts can purchase during bootstrap.
  • Rejects exact-output swaps and emits a Trade event with the post-swap price and amounts for indexing.
Swap behaviour
Sells are always allowed. Buys are blocked for non-registered addresses until externalBuysEnabled is set to true, after which only registered protocol buyer contracts that report isBuying() may buy. On each non-internal swap, a 1% fee is taken from the output (token on buys, ETH on sells). Exact-output swaps revert with ExactOutputNotAllowed. A Trade event is emitted with the post-swap price and deltas.
Liquidity behaviour
afterAddLiquidity requires the token's launching() flag to be true, otherwise it reverts with NotLaunching. When it is true, it grants the token a transfer allowance for the deposited StockRipToken amount so the pool can pull the tokens. Liquidity can therefore only be seeded during the token's one-shot launch. Remove-liquidity has no hook logic.
Fee behaviour
Flat 1% fee in both directions (FEE_BIPS = 100 of 10,000). On buys, 1% of the StockRipToken output is taken by the hook, swapped to ETH through the pool and forwarded to feeAddress. On sells, 1% of the ETH proceeds is taken and forwarded to feeAddress in ETH. Fee is not owner-adjustable; only the recipient is.
Owner & admin controls
Owner (Solady Ownable, two-step handover) can: set the one-shot token binding via setToken before launch, set the fee recipient feeAddress (fee is fixed at 1% in code, not owner-adjustable), toggle externalBuysEnabled to open or close buys to non-registered addresses, and register or deregister protocol buyer contracts via setPool. Owner can renounce or transfer ownership. No upgradeability or pause function found.

Enabled Uniswap v4 callbacks

beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize: restricts pool creation to ETH/StockRipToken pools bound to the configured token, only while the token is launching, and only once, recording deploymentBlock. afterAddLiquidity: grants the transfer allowance for seed liquidity during launch. afterSwap: applies the 1% fee in both directions, gates buys, grants transfer allowances for the swap and internal buyback, and emits a Trade event. afterSwapReturnDelta: lets the hook return a fee delta that is taken from the swap output.

Security & trust assessment

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

Who controls it: The owner can open or close external buying, which lets them control who can buy the token during bootstrap. The owner can also redirect all fee revenue by changing feeAddress and can whitelist arbitrary buyer contracts through setPool, which can then buy while external buys are disabled. The owner cannot change the 1% fee rate or pause sells. A compromised owner key could redirect fee streams and selectively grant buy access.

Risk to user funds: The hook takes a 1% fee from swap flows and forwards it to feeAddress, so it can move pool and user-derived value on every swap. It can also block buys from non-whitelisted addresses while externalBuysEnabled is false. It does not hold user principal beyond transient swap settlement, and the fee rate is hardcoded at 1%.

Security findings

  • [medium] Owner-controlled buy gate: afterSwap gates buys with externalBuysEnabled. While false, only addresses where isPool is true and that report isBuying() can buy. The owner controls this flag and the isPool mapping, so the owner can block or allow buyers at will.
  • [low] Fee recipient is owner-mutable: The owner can change feeAddress at any time to redirect all hook fees (both ETH and token-derived proceeds) to a new address.
  • [info] Hook takes and moves funds on swaps: The hook returns a fee delta from afterSwap and takes tokens and ETH from the pool via poolManager.take, so it holds and moves value on every swap. It also internally swaps fee tokens to ETH through the pool and forwards ETH to feeAddress with forceSafeTransferETH.
  • [info] Relies on token transfer-allowance mechanism: Transfer allowances are granted to the pool and the hook through increaseTransferAllowance, gated on the token's launching() flag. Correctness depends on the token's transfer guard enforcing these allowances properly.

Contract details

Verified source
Yes (StockRipTokenHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
7,279 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, launchpad, moves-currency, ownable, return-delta

Pools using StockRipTokenHook