BagsV4Hook on Robinhood Chain

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

Volume (24h)
$257
Value locked (TVL)
$77.66K
All-time volume
$19.04M
Pools using this hook
28
Swaps (24h)
5 (5 traders)
Total swaps
184,468

What it does

A shared Uniswap v4 hook for Bags launch pools that locks liquidity permanently after a single full-range mint, forces the LP fee to zero, and charges a 2% fee on the WETH side of swaps that is split between the Bags vault and the pool's creator fee share.

How it works step by step

  • Accepts only one full-range liquidity mint per pool (MIN_TICK to MAX_TICK, tick spacing 60) and then latches the pool as minted
  • Blocks all liquidity removals, permanently locking pool liquidity
  • Forces the LP fee to 0 on every swap via the fee override flag
  • Takes a hardcoded 2% fee on the WETH leg of each swap using return deltas and poolManager.take
  • Accrues fees per pool and sweeps them permissionlessly: protocol half as native ETH to the vault, creator half and any partner cut as WETH to the fee share
  • Restricts pool initialization to the bonding curve registered for that pool by the factory
Swap behaviour
On every swap the LP fee is overridden to 0. A 2% fee is charged on the WETH leg: for exact-input swaps where WETH is specified it is taken in beforeSwap, and where WETH is unspecified it is taken in afterSwap. Exact-output swaps where WETH is the specified currency revert. Fees accrue to the pool's pendingFees.
Liquidity behaviour
Liquidity can only be added once per pool, as a single full-range mint (MIN_TICK to MAX_TICK). After that mint the pool is latched as minted and further adds revert. All liquidity removals are blocked by beforeRemoveLiquidity, which always reverts, so the liquidity is permanently locked.
Fee behaviour
Every swap on a Bags pool sets the LP fee to 0 via the override flag. A hardcoded 2% hook fee is charged on the WETH leg of each swap (both buys and sells), taken with poolManager.take and accrued per pool in pendingFees. Accrued fees are split 50/50 between the protocol side (sent as native ETH to the vault, minus any snapshotted partner cut) and the creator side (sent as WETH to the pool's fee share contract, which is notified).
Owner & admin controls
Owner (Ownable) can set the factory address via setFactory and can renounce or transfer ownership. The owner cannot change fee rates (2% hook fee and LP fee override are hardcoded constants), cannot pause, and cannot upgrade the contract (immutable deployment). The factory, which the owner can repoint, is the only caller allowed to register pools.

Enabled Uniswap v4 callbacks

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

beforeInitialize: enforces tick spacing 60 and restricts initialization to the registered bonding curve for that pool. beforeAddLiquidity: allows only the single full-range mint. afterAddLiquidity: sets the minted latch and emits PoolMinted. beforeRemoveLiquidity: always reverts to lock liquidity. beforeSwap: forces LP fee override to 0 and, on exact-input swaps where WETH is the specified currency, takes the 2% fee as a specified-currency delta. afterSwap: takes the 2% fee on the WETH leg as an unspecified-currency delta when WETH is unspecified. beforeSwapReturnDelta and afterSwapReturnDelta: enable the hook to return the fee deltas that are settled against the caller.

Security & trust assessment

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

Who controls it: The owner cannot touch user funds, fees, or liquidity. The only privileged action is repointing the factory, which controls which new pools can be registered. A malicious factory could register pools pointing to a malicious bonding curve, but registration is one-time per pool and existing pools are unaffected by factory changes. The owner could also renounce ownership, leaving the factory fixed forever.

Risk to user funds: The hook holds accrued WETH fees in pendingFees and transfers them to the vault or the fee share contract during sweep, which is permissionless. It does not hold or move LP principal, since liquidity is locked in the pool and removals are blocked. Traders pay the 2% fee on the WETH leg; LPs cannot withdraw. Users are exposed to the trust placed in the vault and fee share contract addresses set at deployment and registration.

Security findings

  • [info] Liquidity permanently locked: beforeRemoveLiquidity always reverts, so no LP can ever withdraw. This is intentional per the source comments but means any liquidity placed is irrecoverable.
  • [info] External fee recipient dependency: The hook takes 2% of the WETH leg on every swap and accrues it in pendingFees. Fees are permissionlessly swept to the vault and fee share, and creator and partner accounting depends on the fee share contract's notifyFee and notifyPartnerFee implementations, which are outside this source.
  • [low] Sweep can be blocked by fee share contract: Sweep sends the creator half to the fee share with a low-level call to notifyFee and reverts if that call fails, so a broken or malicious fee share contract could block sweeps for its pool. Accrued fees would remain pending until the fee share is fixed, since the owner cannot change a pool's feeShare after registration.
  • [info] Exact-output WETH swaps unsupported: Exact-output swaps where WETH is the specified currency revert, so such trades cannot be executed against these pools.

Contract details

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

Pools using BagsV4Hook