V4rcadeFeeHook on Robinhood Chain

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

Volume (24h)
$23.86K
Value locked (TVL)
$22.03K
All-time volume
$1.55M
Pools using this hook
1
Swaps (24h)
109 (66 traders)
Total swaps
5,277

What it does

A dynamic-fee hook for the V4rcade pool that charges a base fee on swaps, lets owner-signed vouchers discount fees, and gates full-range liquidity provision to allowlisted providers.

How it works step by step

  • Initializes a single pool with a fixed currency pair, tick spacing and starting price, and enables a dynamic LP fee
  • Sets the pool fee to baseFee (5%) that the owner can only lower down to 1%
  • Lets holders of an EIP-712 signed voucher from the signer redeem a discounted swap fee, with nonce, deadline and max-amount checks
  • Donates a fee on exact-input buys to the pool and takes it as an afterSwap return delta
  • Restricts liquidity adds to allowlisted providers and full-range ticks until the owner opens liquidity permanently
  • Blocks removing liquidity in the same block it was added
Swap behaviour
Sells of the paired token pay the base fee via the LP fee override. Buys pay the base fee override, and exact-input buys additionally have a fee taken from the output and donated to the pool. A valid voucher can replace the fee with a discounted rate down to MIN_FEE.
Liquidity behaviour
Liquidity can only be added in the full-range tick band, with the LP gate enabled, restricting adds to owner-allowlisted providers (directly or via trusted routers that forward msgSender). Liquidity added in a block cannot be removed in that same block. After openLiquidityForever is called, the gate is removed and anyone can add full-range liquidity.
Fee behaviour
Pool uses a dynamic fee starting at baseFee (MAX_FEE 5.0%) and can only be lowered by the owner, never below MIN_FEE (1.0%). Sells of the paired token (zeroForOne) are charged the base fee on the swap. Buys with an exact-input amount are charged the base fee via override, and on exact-input buys an additional donate-based fee is taken from the output token and sent to pool LPs. Holders of a valid signed voucher (EIP-712, checked against a nonce bitmap, deadline and max amount) can redeem a discounted fee down to MIN_FEE for that swap.
Owner & admin controls
Owner (Ownable2Step, two-step transfer, renounce disabled) can lower baseFee (only downward, floor MIN_FEE 10000 pips) and push the new fee to the pool, rotate the voucher signer, pause voucher redemption, set trusted forwarders and liquidity routers, allowlist LP providers, and permanently disable the LP gate via openLiquidityForever. Owner cannot raise fees or change the tick range after deployment.

Enabled Uniswap v4 callbacks

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

beforeInitialize validates pool currency pair, tick spacing, dynamic fee flag and initial price. afterInitialize stores the pool key and sets the dynamic LP fee. beforeAddLiquidity enforces the LP allowlist and full-range positions and records the add block. beforeRemoveLiquidity blocks same-block withdrawals. beforeSwap decides the fee override and optionally redeems a voucher. afterSwap donates an extra fee on exact-input buys and takes it as a return delta. beforeSwapReturnDelta and afterSwapReturnDelta are enabled to support that fee capture.

Security & trust assessment

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

Who controls it: The owner key controls the fee floor (down to 1%), the voucher signing key, the forwarder and router trust lists, and the LP allowlist. A compromised owner could reroute voucher signing to a key they control, but cannot raise fees above the current baseFee or drain pool reserves directly. Ownership renouncement is disabled.

Risk to user funds: The hook does not custody user tokens directly, but takes a return-delta fee on exact-input buys and donates it to the pool. It cannot pause swaps outright (voucher pause only disables discounts), and owner-set parameters cannot block trades. Funds exposure mainly comes from the fee-capture mechanism and the owner's ability to change the fee floor and signer.

Security findings

  • [info] One-way fee control: The owner can set baseFee anywhere from MIN_FEE up to the current value, reducing fees for traders and LPs, but cannot raise it again.
  • [medium] Voucher signer key controls discounts: The signer can authorize discounts on any player's swap. Rotating signer or compromise of the signer key lets an attacker obtain fee discounts down to MIN_FEE, reducing LP and protocol fee income.
  • [medium] Permissioned liquidity and trusted router/forwarder lists: The LP gate restricts adds to allowlisted providers until openLiquidityForever is called; the owner can also set trusted routers and forwarders, and msgSender spoofing via a trusted router is possible if the router is malicious.
  • [info] Same-block withdrawal guard: Liquidity added in a block cannot be withdrawn until a later block, and only full-range positions are accepted, limiting sandwich-style LP exploitation.
  • [low] Return-delta fee capture on swaps: The hook uses return deltas and donates fee amounts from exact-input buys to the pool, so it can take part of user output as a fee; users should be aware the amount shifts to LPs rather than being an arbitrary charge.

Contract details

Verified source
Yes (V4rcadeFeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
11,480 bytes
Upgradeable proxy
No
Detected patterns
donates, dynamic-fee, ownable, return-delta

Pools using V4rcadeFeeHook