StockLaunchHook on Ethereum

Uniswap v4 Hook Contract 0xd0848f29059103d5643e20f5cfe9ae217989e0cc on Ethereum · Fee sharing · Verified contract

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

What it does

A shared fee-collecting hook for launched stock pools that takes a flat 1% swap fee in the pair asset (0.5% to the platform treasury and 0.5% to the pool creator) and lets recipients claim accrued balances.

How it works step by step

  • Takes a 0.5% platform fee on every swap in the pair asset and credits it to the treasury balance.
  • Takes a per-pool creator fee (0.5% for eth.fun launches, capped by maxCreatorFeeBps) and credits it to the pool fee recipient.
  • Charges buys in beforeSwap and sells in afterSwap, depending on which side is the pair asset.
  • Holds fees as claimable balances so a transfer restriction on the stock token cannot revert swaps.
  • Restricts pool initialization to the factory and only for pools registered with the hook.
  • Allows owner to rescue token balances exceeding accounted fees.
Swap behaviour
On each swap where the pair asset is the specified currency (exact-in buy or exact-out sell), beforeSwap takes the combined fee from the input side. Where the pair asset is the unspecified currency (exact-in sell or exact-out buy), afterSwap takes the fee from the output. The launched token is never charged.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Charges a flat platform fee of 0.5% (PLATFORM_FEE_BPS=50) plus a per-pool creatorFeeBps (set by the factory, capped by maxCreatorFeeBps which starts at 0.5% and can be raised by owner up to 50%) on the pair asset only. Fees are taken via poolManager.take and credited as claimable balances to treasury and the pool fee recipient; the launched token is never taken.
Owner & admin controls
Owner (Ownable2Step, two-step transfer) can set factory address, set treasury address, change maxCreatorFeeBps up to a hard cap of 5000 bps (50%), and call rescueExcess to withdraw any token balance above totalPending (non-fee-owed balances). Owner cannot touch accrued pending fee balances. No pause or upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool initialization to the factory and requires a registered pool. beforeSwap (with beforeSwapReturnDelta) takes the platform and creator fee from the pair asset on exact-in buys or exact-out sells and returns the fee as a specified delta. afterSwap (with afterSwapReturnDelta) takes the fee from the unspecified currency on exact-in sells or exact-out buys when that side is the pair asset.

Security & trust assessment

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

Who controls it: The owner can raise the creator fee cap up to 50% of swap volume for future registrations, redirect treasury and factory addresses, and rescue any excess token balance. The factory can register pools and set creator fees within the cap. Fee recipients can transfer their own pool fee recipient role.

Risk to user funds: The hook holds only fee balances in the pair asset (ETH or stock) between swap and claim. It does not custody LP principal. Swaps route fee amounts through the hook; user swap outcomes are altered by the fee delta, and a reverting token transfer on the pair asset during take could block swaps. Owner rescue cannot touch accounted pending fees.

Security findings

  • [medium] Owner-adjustable creator fee ceiling: Owner can raise maxCreatorFeeBps up to 5000 bps, which would let the factory register pools charging creators up to 50% of swap value in the pair asset.
  • [low] Owner rescue of non-accounted balances: Owner can call rescueExcess to transfer any token balance exceeding totalPending to an arbitrary address; a mistaken or malicious owner could drain surplus balances held by the hook, though accrued fees are protected by accounting.
  • [info] Pull-based fee accounting: Fees are held as claimable balances rather than pushed, so transfer restrictions on the stock token cannot revert swaps; swaps depend on poolManager.take succeeding for the pair asset.
  • [info] Two-step ownership and recipient transfer: Ownership is transferred via Ownable2Step, and the pool fee recipient can be reassigned by the current recipient.

Contract details

Verified source
Yes (StockLaunchHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
6,102 bytes
Upgradeable proxy
No
Detected patterns
launchpad, moves-currency, ownable, return-delta

Pools using StockLaunchHook