DuelHook on Robinhood Chain

Uniswap v4 Hook Contract 0x5f746b7b1722e9bb3849eea97061df50f715aaec on Robinhood Chain · Other · Verified contract

Volume (24h)
$8.45K
Value locked (TVL)
$20.92K
All-time volume
$74.79K
Pools using this hook
21
Swaps (24h)
57 (7 traders)
Total swaps
2,416

What it does

Shared hook for Duel pairs that charges swap fees in ETH, burns a switch fee on cross-pool swaps, buys back a round winner from a round pot, and keeps liquidity permanently locked.

How it works step by step

  • Takes an ETH swap fee and anti-snipe tax on ETH pool swaps and splits it between protocol, round pot and creator
  • Burns a switch fee in the sold token on cross pool swaps
  • Accrues a price-ratio oracle and settles four-hour rounds, buying back the winner from the pot near its reference price
  • Runs a zero-fee triangle arbitrage after swaps to keep the cross pool aligned with ETH pool prices, keeping profit for the pot
  • Locks liquidity: only the factory can add, removal and donations are disabled
Swap behaviour
ETH pool swaps charge an ETH fee (plus anti-snipe tax on buys) taken before the swap as claims; exact-input cross swaps burn a switch fee in the sold token; afterSwap enforces full fills and runs an internal zero-fee arbitrage that realigns pools and keeps profit in the round pot. Round settlement can trigger buybacks from the pot.
Liquidity behaviour
Liquidity can only be added by the factory (beforeAddLiquidity requires sender == factory). Removal is always reverted (LiquidityLocked), so liquidity is permanently locked. Donations are disabled.
Fee behaviour
ETH swaps on the two ETH pools take a swap fee (swapFeeBps, plus a decaying anti-snipe tax on buys) in ETH as ERC-6909 claims, split between protocol share (part kept by protocol per protocolRateBps, rest to round pot), round pot, and creator (or pot if supporter). Cross pool swaps on exact-input burn a switchFeeBps cut of the token being sold. Pool fee is 0.
Owner & admin controls
Owner-less hook: no owner or pause. The factory is the only caller allowed to register pairs, initialize pools, add liquidity and set the protocol rate (setProtocolRate, bounded to 10000 bps, taking effect on every pair at once). Pair creators can change creator role via factory acceptance, claim fees and give up creator fees to round pots. Protocol treasury (read from factory) claims protocol fees. No upgradeability visible: hook is immutable and not a proxy.

Enabled Uniswap v4 callbacks

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

beforeInitialize restricts pool initialization to the factory for registered pools. beforeAddLiquidity restricts adds to the factory. beforeRemoveLiquidity always reverts to lock liquidity. beforeDonate always reverts. beforeSwap takes pre-swap ETH or switch fees and updates round state. afterSwap verifies fills, runs an internal zero-fee arbitrage to realign the cross pool with ETH pools and captures profit into the pot. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take fee amounts as deltas.

Security & trust assessment

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

Who controls it: The factory owner can set the protocol rate across all pairs, changing how much of the protocol share goes to the treasury versus the round pot (the creator share is stated as unchanged). The factory controls registration and pool initialization and liquidity seeding. The factory address is immutable in the hook, so the factory's own upgrade or admin logic governs these powers.

Risk to user funds: The hook holds ETH from fees and pots as ERC-6909 claims and burns token balances during buybacks and switch fees, so it does custody protocol-accumulated value. Liquidity deposited through the factory is locked with no withdrawal path. Swaps can revert on partial fills or arbitrage starvation but cannot be paused by an admin.

Security findings

  • [info] Liquidity permanently locked: Liquidity removal is permanently blocked by beforeRemoveLiquidity reverting, so seeded liquidity cannot be withdrawn; this is by design but means funds are locked.
  • [low] Gas-dependent swap reverts: afterSwap runs an internal arbitrage inside a try/catch that can trade and mint ERC-6909 claims; a gas-starved call reverts the swap (ArbitrageStarved), so callers can influence whether swaps succeed by gas choice.
  • [low] Owner-adjustable protocol share: Protocol rate is set by the factory owner and applies to all pairs at once, redirecting protocol share to round pots or the treasury without per-pair consent.
  • [info] Full-fill requirement on pre-swap fees: Pre-swap fee accounting counts the full requested amount, enforced by PartialFill; swaps that stop short revert, which constrains price-limit usage but protects traders from overcharge.
  • [medium] Hook custodies pot and fee balances: Hook holds ETH and ERC-6909 claims for fees, pots and buyback proceeds, and burns tokens on buybacks and switch fees; user and pool funds are held by the hook and settled via the PoolManager.

Contract details

Verified source
Yes (DuelHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
21,753 bytes
Upgradeable proxy
No
Detected patterns
return-delta, tax

Pools using DuelHook