RhMosFeeHook on Robinhood Chain

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

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

What it does

A fixed 2% fee hook for the single official rhMOS/USDG Uniswap v4 pool, where every swap pays the fee in USDG to an immutable fee recipient.

How it works step by step

  • Admits only the exact official PoolKey (currencies, LP fee, tick spacing, and this hook) for initialization and swaps.
  • Charges a fixed 2% quote-currency fee on both swap directions, ceiling-rounded, via PoolManager.take to the immutable feeSink.
  • Rejects exact-output swaps and any trade where the fee would consume the entire quote amount.
  • Opens a transient rhMOS transfer allowance equal to the swap amount so PoolManager settlement passes the token's transfer firewall for that transaction only.
  • Leaves all liquidity callbacks unflagged and defensively reverting, so liquidity actions bypass the hook.
  • Holds no funds and has no admin, pause or upgrade functions.
Swap behaviour
On each exact-input swap, 2% of the quote (USDG) amount is taken and sent to feeSink: on buys in beforeSwap from the input, and on sells in afterSwap from the output. Exact-output swaps revert. afterSwap also opens a transient rhMOS transfer allowance for the amount moved so settlement succeeds.
Liquidity behaviour
No liquidity callbacks. Liquidity add/remove callbacks are not flagged and always revert if invoked, so the PoolManager never calls the hook for liquidity changes.
Fee behaviour
Charges a fixed 2% (200 bps) fee in the quote currency (USDG), ceiling-rounded. On buys (quote in, exact-input) the fee is taken in beforeSwap from the specified input; on sells (rhMOS in) the fee is taken in afterSwap from the quote output. Fees are sent via PoolManager.take directly to the immutable feeSink; the hook never custodies funds. Trades whose fee would consume the entire quote amount revert. The pool's native LP fee is pinned to the value fixed at deployment (spec: 0).
Owner & admin controls
No admin controls found. The hook is fully immutable with no owner, pause, upgrade or parameter-setting functions; fee rate (FEE_BPS), pool key fields, feeSink, rhMos and quote are all fixed at construction or as constants.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool initialization to the exact official PoolKey. beforeSwap rejects exact-output swaps, charges the 2% quote fee on buys and takes it to feeSink, returning the fee as a specified-currency delta. afterSwap opens a transient rhMOS transfer allowance equal to the rhMOS amount moved so settlement passes the token's transfer firewall for that transaction, and on sells charges the 2% quote fee on the output as an unspecified-currency delta. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can take fees from swap deltas.

Security & trust assessment

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

Who controls it: There is no privileged key: no owner, admin or upgrade path exists in the hook. Centralization risk sits with the rhMOS token, which is granted transient transfer allowances by this hook, and with the feeSink address which receives all fees, but neither is changeable through the hook itself.

Risk to user funds: The hook never holds user or pool funds: fees are pushed to feeSink via PoolManager.take in the same transaction. It can take a fixed 2% of the quote leg of each swap and can revert swaps that are exact-output or that would be fully consumed by the fee, but it cannot pause, redirect or seize funds. Exposure depends mainly on the correctness of the rhMOS token's transfer-allowance handling.

Security findings

  • [medium] Reliance on rhMOS transfer allowance mechanism: The hook calls increaseTransferAllowance on the rhMOS token in afterSwap, granting a transient transfer allowance equal to the swap amount. Safety depends on the token only honoring this transiently and only for PoolManager settlement; this is an external trust dependency.
  • [low] Hook alters swap settlement via return deltas: Both fee legs are taken via return deltas (beforeSwapReturnDelta and afterSwapReturnDelta), so the hook alters the swapper's settled amounts. The fee is fixed and capped by the revert on full consumption, limiting exposure.
  • [medium] Unaudited draft contract: The code is unaudited and labelled as a draft not for deployment in its header comments, although the chain deployment is verified on Sourcify.
  • [info] Single pool restriction: Pool admission is restricted to a single immutable PoolKey, meaning no other pools can use this hook and liquidity can only be added through the official pool.

Contract details

Verified source
Yes (RhMosFeeHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
4,252 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using RhMosFeeHook