RugbugHook on Monad

Uniswap v4 Hook Contract 0x02327e4f3c277347635155737ec96fc9687960cc on Monad · Launchpad · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
1
Swaps (24h)
4,564 (444 traders)
Total swaps
4,564

What it does

Buyers of the coin pay a trading fee in MON that goes to $DEADBUG, and as the price rises through each coin band the MON collected there is split 66% to the sweep recipient and 34% left in the pool, while sellers pay the same fee on the MON they receive.

How it works step by step

  • Creates the pool itself at the launch tick and seeds launch liquidity in coin-only bands below the launch price plus a MON-only floor band above it; beforeInitialize reverts for any other initializer.
  • Coin bands sell the coin to buyers as price rises; once the price fully crosses a band it holds only MON, and sweep() moves 66% of that MON to sweepRecipient while the remaining 34% stays in the pool as permanent liquidity.
  • Charges a configurable trading fee (max 5%) in MON on swaps via beforeSwap/afterSwap return deltas, minting the fee as ERC-6909 claims that are paid out to $DEADBUG.
  • Sweeps are triggered from afterSwap on buys (when pending MON reaches sweepThreshold or SWEEP_INTERVAL has elapsed) and can be forced by anyone calling sweep().
  • LP fees earned on the hook's own liquidity are collected during sweeps and credited to sweepRecipient, along with the recipient's owed MON.
  • sweepRecipient can only be changed by the current recipient, so the owner cannot redirect sweep proceeds.
Swap behaviour
On MON-in buys the price moves down through the coin bands; when the price fully crosses a band that band's MON share is swept, and a buy can trigger a sweep afterward. Each swap pays the trading fee in MON (fee applied to exact-in buys and exact-out sells via beforeSwap, and to the MON side of the other direction via afterSwap), minted as claims to the hook and paid to $DEADBUG at payout.
Liquidity behaviour
Liquidity is seeded once by the owner via seed(); the hook's own positions cannot be withdrawn by anyone, only partially reduced by sweeps (66% of a crossed band's liquidity). Third parties may add liquidity to the pool normally through the PoolManager. No external LP withdrawal path for the hook's positions was found.
Fee behaviour
The pool uses a static 1% LP fee (LP_FEE = 10000). On top of that the hook takes a trading fee in MON, set by the owner up to 500 bps (5%). Trading fees go to $DEADBUG; LP fees earned on the hook's liquidity go to sweepRecipient, along with owed sweep MON.
Owner & admin controls
Owner (Ownable2Step) can call seed() once, which initializes the pool and deposits liquidity, and can set the trading fee via setTradingFee up to 500 bps. The owner cannot change the sweep recipient, withdraw the hook's liquidity, pause swaps, or upgrade the contract (not a proxy). Ownership can be transferred or renounced.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: reverts any pool initialization not performed by the hook itself. beforeSwap: charges the MON-denominated trading fee on exact-in buys and exact-out sells via a return delta. afterSwap: charges the MON trading fee on the other swap direction via a return delta, and triggers band sweeps on buys. beforeSwapReturnDelta and afterSwapReturnDelta: enable the hook to take MON fee amounts through return deltas.

Security & trust assessment

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

Who controls it: The owner can raise the trading fee up to 5% on all swaps and renounce or transfer ownership, but cannot withdraw the hook's launch liquidity or redirect sweep proceeds.

Risk to user funds: The hook holds launch coins and MON in the pool and MON/coin claims transiently during swaps and payouts. User swaps pay the hook's fee and sweeps move MON out of bands to sweepRecipient; the hook cannot block swaps or freeze user balances.

Security findings

  • [medium] Owner-set trading fee up to 5%: setTradingFee lets the owner raise the MON trading fee to 500 bps at any time, applied to every swap via beforeSwap and afterSwap return deltas, so traders can be charged up to 5% more without a timelock.
  • [info] Hook takes tokens via return deltas: beforeSwap and afterSwap return deltas and mint ERC-6909 claims mean the hook takes a cut of every swap's MON output before users receive it, and claims are redeemed through payout to sweepRecipient and deadbug.
  • [info] Owner can seed and set fee but not drain: seed() is owner-only and runs once; the hook's liquidity has no withdrawal function, so owner cannot pull the launch liquidity. Sweeps are permissionless and bounded to crossed bands.
  • [info] Sweep recipient is a one-way role: setSweepRecipient can only be called by the current recipient, preventing owner redirection of sweep proceeds, but also means a lost recipient key cannot be recovered.

Contract details

Verified source
Yes (RugbugHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
15,559 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, launchpad, moves-currency, ownable, return-delta, self-unlock

Pools using RugbugHook