SPRMFeeHook on Robinhood Chain

Uniswap v4 Hook Contract 0xc16d9de27b1579e47255348bf7166a032e19e5cc on Robinhood Chain · Dynamic fee · Verified contract

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

What it does

Every trade against the $SPRM pool pays a flat 3% fee in SPCX on top of the pool's LP fee, with buys and sells charged at the same rate, and the fee revenue flows to a recipient the owner can set until it is locked.

How it works step by step

  • Charges a constant 3% (FEE_BPS 300) on every trade against the $SPRM pool, always taken in the pool's other currency (SPCX), never in $SPRM.
  • On exact-input buys and exact-output sells the fee is taken in beforeSwap by claiming a positive specified delta and calling poolManager.take to the hook.
  • On exact-output buys and exact-input sells the fee is taken in afterSwap via an unspecified-currency return delta and poolManager.take to the hook.
  • Collected SPCX fees accumulate in the hook and are pushed to feeRecipient by a permissionless flush() function.
  • Calls authorizePoolTransfer on the $SPRM token for the raw $SPRM swap and liquidity deltas, gating settlement of the gated token through the hook.
  • Trading is blocked until feeRecipient is set; the owner can re-point the recipient until lockFeeRecipient freezes it and renounces ownership in the same call.
Swap behaviour
Every swap pays a 3% fee in SPCX on the total SPCX crossing, grossed up on exact-output trades. Fees are taken in beforeSwap for exact-input buys and exact-output sells, and in afterSwap for exact-output buys and exact-input sells. The $SPRM leg is never charged by the hook, and swaps revert with RecipientNotSet while feeRecipient is zero.
Liquidity behaviour
afterAddLiquidity and afterRemoveLiquidity do not charge anything; they call authorizePoolTransfer on the $SPRM token for the $SPRM component of the caller's net delta and return a zero delta. No liquidity callbacks are gated beyond that authorization.
Fee behaviour
The hook adds a fixed 3% fee on top of the pool's own LP fee tier, which is paid to LPs. The fee is taken in SPCX and held by the hook until flush() transfers it to feeRecipient. The rate is an immutable constant and cannot be changed by the owner.
Owner & admin controls
The owner (Ownable2Step) can set or change feeRecipient until lockFeeRecipient is called, which sets recipientLocked, renounces ownership to address(0), and permanently freezes the recipient. renounceOwnership reverts. The fee rate and pool are immutable. flush() is callable by anyone. There is no pause and no upgrade mechanism visible in the source.

Enabled Uniswap v4 callbacks

beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts the hook to the single configured pool key. beforeSwap takes the SPCX fee and returns a positive specified delta when SPCX is the specified currency. afterSwap takes the SPCX fee when SPCX is the unspecified currency and calls authorizePoolTransfer on the $SPRM delta. afterAddLiquidity and afterRemoveLiquidity call authorizePoolTransfer on the $SPRM delta. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take fees through returned deltas.

Security & trust assessment

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

Who controls it: Before lockFeeRecipient the owner alone decides where all fee revenue goes and can block trading by leaving the recipient unset. After locking, no privileged key remains and the recipient is fixed.

Risk to user funds: The hook takes SPCX from trades via return deltas and holds it until flush(); it does not hold $SPRM from user swaps beyond the normal pool settlement. Users' $SPRM settlement is gated by authorizePoolTransfer on the token, so the hook can effectively block $SPRM movement if that token's gate reverts.

Security findings

  • [medium] Owner can redirect all fees before lock: Until lockFeeRecipient is called, the owner can call setFeeRecipient to point flush() at any address, so accumulated and future SPCX fees can be redirected by the owner.
  • [low] Trading halts without a recipient: beforeSwap reverts with RecipientNotSet while feeRecipient is zero, so swaps are blocked until the owner sets a recipient; the lock path also requires a recipient to be set first.
  • [low] Hook holds SPCX fee balances: Fees taken via poolManager.take accumulate in the hook contract as SPCX balances until flush() is called, so the hook custodies these tokens in the interim.
  • [info] Authorization gates $SPRM settlement through the hook: Every swap and liquidity change calls authorizePoolTransfer on the $SPRM token with the raw delta, meaning the token's transfer logic depends on this hook for settlement.

Contract details

Verified source
Yes (SPRMFeeHook)
Compiler
solc 0.8.24+commit.e11b9ed9
Bytecode size
6,260 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, ownable, return-delta

Pools using SPRMFeeHook