BagsV4Hook on Robinhood Chain

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

Volume (24h)
$0
Value locked (TVL)
$39.08K
All-time volume
$4.26M
Pools using this hook
10
Swaps (24h)
0 (0 traders)
Total swaps
39,443

What it does

A shared Bags launch hook that locks pool liquidity at full range forever and charges a 2% WETH fee on every swap, split between the Bags vault and the token creator's fee share.

How it works step by step

  • Accepts pool initialization only from the registered bonding curve for that pool, and only with tick spacing 60.
  • Permits a single full-range liquidity mint per pool and blocks all later additions and all removals.
  • Forces the LP fee to 0 and charges a flat 2% hook fee on the WETH side of each swap, accruing it per pool.
  • Sweeps accrued WETH permissionlessly, sending half to the Bags vault as native ETH and half as WETH to the pool's fee share contract.
  • Lets the owner set the factory that can register new pools, while registrations are one-time per pool.
Swap behaviour
Every swap is charged a 2% fee in WETH, taken from the WETH leg (the hook takes the fee on exact-input swaps when WETH is the specified currency, or via afterSwap when WETH is the output). Exact-output swaps where WETH is the specified currency revert. The LP fee is forced to 0.
Liquidity behaviour
Liquidity can be added only once per pool, at full range (MIN_TICK to MAX_TICK), enforced by a minted latch. All liquidity removals are blocked permanently, so the initial liquidity is locked forever.
Fee behaviour
LP fee is overridden to 0 on every swap via the override fee flag. A flat 2% hook fee (200 of 10000 bps) is charged on the WETH leg of each swap, taken to the hook as pending fees; sweep then splits accrued WETH 50/50 between the Bags vault (unwrapped to native ETH) and the pool's registered fee share contract.
Owner & admin controls
Owner (Ownable) can call setFactory to choose which factory may register pools, and can renounce or transfer ownership. Owner cannot change the 2% fee, the full-range ticks, or the vault address (immutable). No pause or upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: restricts pool initialization to the registered bonding curve and enforces tick spacing 60. beforeAddLiquidity and afterAddLiquidity: allow only the single full-range mint and set the minted latch. beforeRemoveLiquidity: always reverts, locking liquidity. beforeSwap: takes the 2% WETH fee when WETH is the specified currency on exact-input swaps and sets the zero LP fee override. afterSwap: takes the 2% WETH fee when WETH is the unspecified currency and returns it as a hook delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to claim fee amounts from the swap deltas.

Security & trust assessment

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

Who controls it: The owner can only choose the factory address, which controls which bonding curves can register pools. A malicious or compromised factory could register pools that route creator fee shares to attacker-controlled contracts. The owner cannot seize funds, change fees, or pause swaps directly.

Risk to user funds: The hook holds accrued WETH fees in its balance until sweep is called and can take a 2% cut of swap amounts. It cannot move or block the locked pool liquidity, which is released to no one. Users can always swap, but the 2% fee and inability to withdraw LP positions are inherent to the design.

Security findings

  • [info] Hook takes a fixed 2% fee on swaps: The hook takes 2% of every WETH-leg swap via take() and return deltas, and fee shares are paid to whichever fee share address was registered for the pool.
  • [info] Liquidity is permanently locked: Every removeLiquidity call reverts, so liquidity provided at launch cannot be withdrawn by anyone, including the owner.
  • [medium] Owner can change the registering factory: setFactory is owner-controlled and not timelocked; a malicious owner could point it at a factory that registers pools with attacker-chosen fee share addresses, redirecting future creator fees.
  • [low] Sweep depends on external fee share contract: sweep is permissionless and sends half of accrued fees to the immutable vault and half to the pool's fee share; if the fee share contract's notifyFee call fails the whole sweep reverts, so fees can be stuck until it is fixed.
  • [info] Exact-output WETH swaps unsupported: Exact-output swaps with WETH as the specified currency revert, so those trades are unavailable on pools that include WETH.

Contract details

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

Pools using BagsV4Hook