FactionGameHook on Robinhood Chain

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

Volume (24h)
$3.12K
Value locked (TVL)
$1.07K
All-time volume
$2.13M
Pools using this hook
4
Swaps (24h)
144 (22 traders)
Total swaps
12,361

What it does

A Uniswap v4 hook for FactionGame pools that enforces the game rules: only the vault can create pools or add/remove liquidity, swaps are blocked during nighttime windows, and for an hour after each night ends public trades pay a decaying anti-snipe tax in WETH that is split between the vault, a booster, the protocol treasury and the creator.

How it works step by step

  • Restricts pool initialization to the protocol vault and pins the pool fee to 1%
  • Locks liquidity add and remove to the vault only, so third parties cannot open LP positions
  • Blocks non-vault swaps while the night oracle reports an active night
  • After each night, taxes public WETH buys and sells with a linear decay from 99% to 0% over 60 minutes by default
  • Splits each tax payment among vault boost, vault LP pot, StockBooster, protocol treasury and creator via immediate poolManager.take
  • Optionally reverts non-vault swaps whose price move exceeds a configured tick limit
Swap behaviour
During the nighttime curfew all non-vault swaps revert. Outside nights, if a snipe window is active, non-vault exact-input buys are taxed on WETH input in beforeSwap and sells are taxed on WETH output in afterSwap, with exact-output swaps rejected. An optional per-swap tick-move guard can revert non-vault swaps that move the pool price too far. The vault is exempt from all swap restrictions and tax.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity revert unless the sender is the vault, so only the protocol vault can open or close LP positions. afterAddLiquidity and afterRemoveLiquidity are disabled.
Fee behaviour
Pools must use a fixed 1% static LP fee (GAME_LP_FEE = 10000), enforced at initialization. During a snipe window after each night, public buys are taxed on the WETH input via a beforeSwap return delta and public sells are taxed on the WETH output via an afterSwap return delta; the tax starts at snipeStartBps (default 99%) and decays linearly to zero over snipeWindowSecs (default 3600 seconds). The collected WETH is split five ways: boost and LP shares to the vault, and booster, protocol treasury and creator shares paid out directly through poolManager.take. The vault is exempt from the tax.
Owner & admin controls
Owner (two-step transfer via transferOwnership/acceptOwnership) can call setGame to rewire vault and nightOracle (both must be nonzero), setMaxTickMove to set the per-swap tick-move guard (0 disables), setSnipeCurve to change the snipe tax start rate (below 100%, can be set to 0 to disable) and window (up to 24 hours), setTaxRecipients to repoint booster, protocol treasury and creator addresses, and setTaxSplit to retune the five-way split summing to 100%. No pausing or upgrade mechanism is present; the contract is not a proxy.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool creation to the vault and enforces the 1% fee tier. beforeAddLiquidity and beforeRemoveLiquidity lock LP to the vault. beforeSwap enforces the nighttime curfew for non-vault swaps, snapshots the tick for the tick-move guard, and applies the buy-side snipe tax as a return delta. afterSwap enforces the tick-move guard, applies the sell-side snipe tax as a return delta, and distributes tax legs. beforeSwapReturnDelta and afterSwapReturnDelta are enabled to let the hook skim WETH. Donate and afterInitialize/afterAddLiquidity/afterRemoveLiquidity callbacks revert as unused.

Security & trust assessment

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

Who controls it: The owner cannot move existing funds directly but can redirect all future snipe-tax recipients, set the tax split (including zeroing the boost or LP pot), set the snipe tax to 0 or 98%-plus, retarget the night oracle or vault (which controls curfew and LP access), and set the tick guard. Changing the night oracle to a contract returning isNight false or manipulated status would disable the curfew; changing the vault would move pool creation and LP control.

Risk to user funds: The hook does not custody user funds beyond the transient balance in the same call. It moves WETH via poolManager.take during snipe windows (up to the owner-set rate on swaps) and routes it to vault, booster, treasury and creator; the owner can change where that money goes and how much is taken. Swaps can be blocked by the night curfew or tick guard, and LP operations are restricted to the vault.

Security findings

  • [high] Owner can rewire vault and night oracle instantly: setGame sets vault and nightOracle with no timelock, and the owner can reassign them at any time. A malicious or compromised owner could disable the nighttime curfew or change which address controls LP and pool creation.
  • [medium] Owner can redirect snipe tax recipients and split: setTaxRecipients and setTaxSplit can redirect the snipe tax (up to 100% of the collected WETH via the split) to arbitrary addresses at any time, with no timelock or cap.
  • [medium] Curfew and tax depend entirely on the external night oracle: If the nightOracle call fails or reverts, the curfew check in beforeSwap reverts swaps; if nightOracle is set to zero, the curfew is silently disabled (fail-open) in the isNight check and the snipe tax returns 0. Setting nightOracle to zero is blocked by setGame, but the oracle contract itself can be upgraded or replaced only through the owner.
  • [info] Hook can block swaps and liquidity actions by design: Swaps are blocked during nights, exact-output swaps are rejected during snipe windows, and tickMove guard reverts swaps that move price beyond maxTickMove, so the hook can block trading. Pool creation and all LP are gated to the vault.
  • [info] Tax flows are pushed out within the same transaction: The hook holds no persistent user balances; it takes tax WETH from the PoolManager within the same unlock and pays out to vault, booster, treasury and creator, and tax is fail-closed when recipients are unset.

Contract details

Verified source
Yes (FactionGameHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
7,611 bytes
Upgradeable proxy
No
Detected patterns
liquidity-management, moves-currency, oracle, ownable, return-delta, tax

Pools using FactionGameHook