TibbirHook on Robinhood Chain

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

Volume (24h)
$838.48K
Value locked (TVL)
$276.66K
All-time volume
$7.82M
Pools using this hook
1
Swaps (24h)
583 (215 traders)
Total swaps
9,173

What it does

A fee-taking hook that charges owner-configurable buy and sell fees on swaps in a pair of currencies, accrues those fees, and lets the owner route them to a fee recipient.

How it works step by step

  • Charges a buy fee and a sell fee in basis points on swaps, bounded by an absolute maximum.
  • Takes fee currency through the pool manager via return deltas and accrues it as a deferred fee.
  • Lets the owner sweep accrued deferred fees to a configurable fee recipient.
  • Changes fee rates through a delayed set, apply and cancel process with a minimum rate-increase delay.
  • Validates pool initialization price against an owner-approved price within a tolerance.
  • Gates trading behind an owner-controlled enableTrading switch.
Swap behaviour
beforeSwap and afterSwap run on every swap, requiring trading to be enabled, and apply the buy or sell fee through return deltas, with the fee amount accrued as a deferred fee balance.
Liquidity behaviour
Calls afterAddLiquidity and afterRemoveLiquidity and checks liquidity-related hooks (beforeAddLiquidity and beforeRemoveLiquidity are present as selectors). No liquidity restrictions are evident from the decoded selectors, so liquidity is generally permitted.
Fee behaviour
Applies owner-set buy and sell fee basis points (capped by a hardcoded absolute maximum) on swaps via the return-delta mechanism. Fees accrue as a deferred fee balance that the owner can sweep to the fee recipient. Rate changes are time-delayed (rateIncreaseDelay) when they increase fees.
Owner & admin controls
Owner (Ownable two-step: transferOwnership, acceptOwnership, renounceOwnership) can set fee recipient, set and apply sell/buy fee rate changes after a delay (setRateControl, applyPendingRateControl, cancelPendingRateControl), enable trading (enableTrading), sweep accrued deferred fees (sweepDeferredFee), and approve or revoke pool initialization price tolerance (approveInitialization, revokeInitializationApproval). No pause function is visible in the dispatched selectors.

Enabled Uniswap v4 callbacks

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

beforeInitialize validates the pool's initial price against an approved price and tolerance. afterAddLiquidity and afterRemoveLiquidity are used for accounting or event hooks. beforeSwap, afterSwap, beforeSwapReturnDelta and afterSwapReturnDelta implement fee capture on swaps by adjusting the swap amount delta and taking fee currency through the pool manager.

Security & trust assessment

Risk level: medium (decoded bytecode, medium confidence).

Who controls it: The owner can raise sell and buy fees up to the absolute maximum (after the rate-increase delay), change the fee recipient, and sweep deferred fees. Trading can be gated by the owner, since enableTrading must be called before swaps are processed. A compromised owner key could redirect fee revenue and raise fees on traders.

Risk to user funds: The hook takes fee currency from swaps and holds accrued deferred fees in its own balance, which the owner can sweep. It can alter the amounts users receive through return deltas, but does not appear to hold LP principal beyond fee accrual.

Security findings

  • [medium] Owner-controlled fee rates and recipient: Owner can change sell and buy fee rates and the fee recipient; increases are delayed but not prevented, so the owner can extract value from traders through fees.
  • [info] Trading gated by owner: Swap logic depends on tradingEnabled, so until the owner calls enableTrading swaps revert with TradingNotEnabled.
  • [info] Return-delta fee capture: Hook uses beforeSwapReturnDelta and afterSwapReturnDelta and takes fee currency via the pool manager, so it can alter the net amounts users receive.
  • [low] Single privileged owner: Owner is a single EOA-style Ownable account with two-step transfer; no timelock on the owner beyond the rate-change delay is visible.

Contract details

Verified source
Yes (TibbirHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
11,186 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, erc6909-claims, moves-currency, ownable, return-delta, rewards, self-unlock

Pools using TibbirHook