PulseV4Hook on Robinhood Chain

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

Volume (24h)
$385
Value locked (TVL)
$513
All-time volume
$116.91K
Pools using this hook
2
Swaps (24h)
103 (54 traders)
Total swaps
7,287

What it does

A Uniswap v4 hook that raises or lowers the LP fee of its pool based on recent trading volume and takes a small protocol fee from each swap, with the owner able to pause that fee and withdraw the accrued protocol revenue.

How it works step by step

  • Overrides the pool LP fee on each swap using decayed global and local volume to set a fee between a floor and a ceiling
  • Recomputes the dynamic fee at most once per block number and reuses the cached fee within the same block
  • Takes a protocol fee from the unspecified side of each swap and holds it as ERC-6909 claims in PoolManager
  • Tracks hourly-decayed swap volume globally and per usable tick to drive the fee signal
  • Allows the owner to pause protocol fee collection without blocking swaps
  • Lets the owner redeem accumulated protocol revenue per pool to a recipient address
Swap behaviour
beforeSwap overrides the LP fee with a dynamic value clamped between MIN_FEE and MAX_FEE, recomputed once per block. afterSwap takes a protocol fee from the unspecified side (unless paused), mints it as ERC-6909 claims on PoolManager, records the swap volume into global and tick volume buckets, and returns the taken amount as a hook delta.
Liquidity behaviour
No liquidity callbacks. Add and remove liquidity hooks are pure no-ops returning zero deltas.
Fee behaviour
The hook overrides the pool LP fee on every swap via beforeSwap, returning a dynamic fee with the override flag. The fee is recomputed once per block.number change from decayed global and local (+/-2 tick spacing) volume, clamped between MIN_FEE and MAX_FEE. Separately, a protocol fee is taken from the unspecified side of each swap (computed by FeePolicy.protocolFee from amount, tx.gasprice and block.basefee) when not paused, minted as ERC-6909 claims and returned as hookDeltaUnspecified.
Owner & admin controls
Owner (set at construction as _admin, Ownable) can call setPaused to stop protocol fee collection (swaps continue), withdrawProtocolRevenue to redeem accrued protocol revenue for any pool to any non-zero recipient, and transferOwnership/renounceOwnership. Pool fee bounds MIN_FEE, MAX_FEE and FEE_CONSTANT_C are immutable. No upgrade mechanism or proxy is present in the verified source.

Enabled Uniswap v4 callbacks

afterInitialize, beforeSwap, afterSwap, afterSwapReturnDelta

afterInitialize: requires the pool to use the dynamic fee flag and records per-pool initialization, the starting fee and block number. beforeSwap: computes and sets the dynamic LP fee for the swap. afterSwap: collects the protocol fee as ERC-6909 claims, records swap volume into global and tick buckets, and returns a hook delta (afterSwapReturnDelta) equal to the fee taken.

Security & trust assessment

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

Who controls it: The owner can pause protocol fee collection at any time and can withdraw all accrued protocol revenue for any pool to any address. The owner cannot change fee bounds, cannot block swaps (the pause is designed not to revert swaps), and cannot touch LP principal held in PoolManager.

Risk to user funds: The hook holds no user funds directly. Protocol revenue is held as ERC-6909 claims in PoolManager and only the owner can redeem it. The hook's afterSwap can take a fee from swap output or input, reducing trader proceeds, but cannot revert swaps. LP principal is not controlled by the hook.

Security findings

  • [info] Protocol fee taken from every swap: The hook takes a protocol fee from the unspecified side of every swap via afterSwapReturnDelta, so traders receive less than the pool's raw output or pay more than the raw input.
  • [medium] Owner can withdraw accrued protocol revenue: setPaused and withdrawProtocolRevenue are onlyOwner. A compromised owner key could redirect all accrued protocol revenue for every pool to an arbitrary address, though no LP or trader principal is held by the hook.
  • [low] Fee depends on gas price and block-level values: The fee depends on tx.gasprice and block.basefee in FeePolicy.protocolFee, and on block.number caching. These values are controllable or observable by searchers and builders, creating potential for fee-level manipulation within a block.
  • [low] Volume-driven fee can be influenced by wash volume: Dynamic fee is driven by swap volume that is itself manipulable with capital, so an actor can raise the LP fee on a pool temporarily, though the fee is capped at MAX_FEE and floored at MIN_FEE.
  • [info] Single-owner control without timelock: Ownership is a single EOA or multisig via Ownable with no timelock.

Contract details

Verified source
Yes (PulseV4Hook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
8,046 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, ownable, pausable, return-delta, self-unlock

Pools using PulseV4Hook