StaticsSwapFeeHook on Robinhood Chain

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

Volume (24h)
$2.90K
Value locked (TVL)
$1.25K
All-time volume
$7.70K
Pools using this hook
7
Swaps (24h)
23 (15 traders)
Total swaps
233

What it does

A Statics Protocol swap-fee hook that charges configurable bilateral fees on every swap and routes the collected fees into protocol-owned liquidity, staker rewards, creator payouts and treasury, with registration and admin control held by the Statics Diamond.

How it works step by step

  • Charges an input and output swap fee per pool with defaults set at deployment and per-pool overrides controlled by the Diamond, capped at 2% combined.
  • Splits every fee into POL, basket staker, Statics staker, creator (fixed 5%) and treasury shares based on global allocation profiles.
  • Holds fees as ERC-6909 claims on the Uniswap v4 PoolManager until a permissionless settlement call redeems them to recipients.
  • Blocks donations to canonical pools and requires pools to be registered before initialization.
  • Notifies the Statics Diamond after each swap so the protocol can account for fee flows.
Swap behaviour
beforeSwap charges the specified-leg fee and afterSwap charges the unspecified-leg fee through return deltas, minting ERC-6909 claims on PoolManager for each charged amount. Swaps revert if the pool is decommissioned or quarantined by the Diamond.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Charges a bilateral swap fee on the specified leg and the unspecified leg, with default input and output rates set at construction and per-pool overrides set by the Diamond. Fees are collected as ERC-6909 PoolManager claims, then split into POL, basket staker, Statics staker, creator (fixed 500 bps) and treasury shares according to global allocation profiles, with a per-pool POL override. Combined rate is capped at 2% and static LP fees are capped below 100%.
Owner & admin controls
Only the immutable Statics Diamond (staticsDiamond) can call setDefaultFeeRate, setPoolFeeRate, clearPoolFeeRate, setBasketFeeAllocation, setGeneralFeeAllocation, registerPool, decommissionPool, settleFeeDistribution, settleStakerRewards and settleProtocolPol. The hook has no owner, pause or upgrade path of its own, but the Diamond can change fee rates per pool up to the 20,000-pip combined cap, change global allocation profiles, decommission pools, and quarantine swaps through the Diamond's protocolPoolSwapsBlocked check. The hook is not a proxy and its constructor parameters are immutable.

Enabled Uniswap v4 callbacks

afterInitialize, beforeSwap, afterSwap, beforeDonate, beforeSwapReturnDelta, afterSwapReturnDelta

afterInitialize enforces that the pool is registered before initialization. beforeSwap checks registration, decommission and quarantine status and charges the specified-leg fee via a return delta. afterSwap charges the unspecified-leg fee via a return delta, mints ERC-6909 claims, allocates the fee and notifies the Diamond through afterStaticsPoolSwap. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap amounts. beforeDonate is enabled and always reverts with CanonicalPoolDonationForbidden, so donations are blocked.

Security & trust assessment

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

Who controls it: The Statics Diamond key controls all fee rates, allocation splits, pool registration and decommissioning, and whether swaps are quarantined. Raising fees within the 2% cap or redirecting allocation shares to treasury or POL would shift value away from LPs and stakers. Basket and staker shares can be rerouted to POL or treasury when eligibility changes.

Risk to user funds: The hook holds ERC-6909 claims on PoolManager for accrued fees rather than raw user tokens, and fees are withheld from swap deltas. Users' LP principal is not held by the hook. The Diamond can block swaps for a pool and can redirect fee distributions, but cannot directly withdraw LP principal through this hook.

Security findings

  • [info] Swap return deltas withhold trader funds: The hook takes fees on swaps through beforeSwapReturnDelta and afterSwapReturnDelta, so a portion of every swap's specified and unspecified amounts is withheld as claims on PoolManager. Users receive less than the pool's raw output.
  • [medium] Privileged Diamond can block swaps and change fees: The Diamond can set per-pool and default fee rates up to a combined 2% and can quarantine swaps for a pool via protocolPoolSwapsBlocked, which causes beforeSwap to revert. Pools can also be permanently decommissioned.
  • [low] Parameter changes apply without delay: Fee rate, allocation and pool-status changes take effect immediately with no timelock visible in the hook. Pending distributions are re-routed when eligibility changes, which can move previously accrued basket staker rewards to POL or treasury.
  • [info] Claim accounting includes solvency and fill checks: Claim liability is checked for solvency on every mint and burn, and the specified-leg fill is checked for exact equality, which limits the risk of unaccounted fees.

Contract details

Verified source
Yes (StaticsSwapFeeHook)
Compiler
solc 0.8.33+commit.64118f21
Bytecode size
17,113 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, moves-currency, return-delta, rewards, self-unlock

Pools using StaticsSwapFeeHook