V4IndexEngine on Robinhood Chain

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

Volume (24h)
$0.02
Value locked (TVL)
$1.89
All-time volume
$2.66
Pools using this hook
9
Swaps (24h)
3 (1 traders)
Total swaps
1,682

What it does

A Uniswap v4 hook that charges a directional swap fee set by an authorised publisher, with the fee clamped to fixed bounds and a fallback when none is published, and that emits a Flow event for each swap.

How it works step by step

  • Holds no capital and takes no swap delta, so user funds stay in the pool manager flow
  • Receives per-pool buy and sell fees from allowlisted publishers and clamps them to immutable min and max bounds
  • Uses baseIsCurrency0 to map each swap's zeroForOne direction to a buy or sell fee
  • Returns the chosen fee as a v4 override fee on every beforeSwap
  • Quotes the immutable fallback fee for pools with no published fee
  • Emits a Flow event in afterSwap for indexing trade direction and amounts
Swap behaviour
beforeSwap returns the buy or sell fee for the swap direction as a fee override, or the fallback fee if none is published. afterSwap emits a Flow event with direction, fee and amounts. No tokens are taken by the hook.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fees are published per pool by allowlisted publishers via setPoolFeePpm or setPoolFees, clamped to the immutable minFeePpm and maxFeePpm. beforeSwap returns the buy or sell fee as an override with OVERRIDE_FEE_FLAG set, based on swap direction relative to the baseIsCurrency0 flag. Pools with no published fee quote fallbackFeePpm. The hook takes no fee of its own (BeforeSwapDelta is zero).
Owner & admin controls
Governor (two-step transferable via transferGovernance/acceptGovernance) can set publishers via setPublisher, replace the guardian, and unpause. Governor or guardian can pause, which halts beforeSwap and afterSwap-dependent flow only where whenNotPaused is applied; the source applies no whenNotPaused modifier to the fee feed or swap callbacks, so pause is a state flag with limited direct effect on swaps. Publishers (market adapters) can set buy and sell fees per pool within the immutable min and max clamp.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap

beforeSwap: returns the directional dynamic fee override for each swap. afterSwap: emits the Flow event recording trader direction, fee and balance deltas for indexing. No return-delta permissions are claimed, so the hook cannot take or redirect tokens.

Security & trust assessment

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

Who controls it: A governor key cannot directly set a pool fee; it can only add or remove publishers and change the guardian. A compromised publisher can set any pool's buy and sell fee anywhere between minFeePpm and maxFeePpm, which can make swaps expensive up to the ceiling or cheap down to the floor. A compromised guardian or governor can pause, which affects only functions that carry whenNotPaused.

Risk to user funds: The hook does not hold, move or block pool or user funds: it returns zero BeforeSwapDelta and makes no token transfers. Its only effect on users is the fee charged on each swap, which is bounded by the immutable minFeePpm and maxFeePpm, and a publisher can push it anywhere in that range.

Security findings

  • [medium] Publisher-controlled fees: Publishers can set buy and sell fees on any pool to any value within the clamp. Because the clamp bounds are immutable, the worst case is fixed, but a malicious or compromised publisher can still impose the maximum fee on trades for every pool it publishes.
  • [low] Pause does not gate swap path: pause() is gated by onlyPauser but beforeSwap, afterSwap, setPoolFeePpm and setPoolFees do not use whenNotPaused in the shown source, so a pause does not stop swaps. Users may expect a pause to halt trading but it does not from this contract alone.
  • [medium] Direction flag set by publisher: The baseIsCurrency0 flag is written by the publisher alongside the fees. A publisher that sets it incorrectly would apply buy fees to sell trades and vice versa, mispricing flow for that pool.
  • [info] No custody and no upgrade path: No upgradeability, proxy pattern, or token custody is present; the hook holds no funds and returns zero deltas. Callbacks are restricted to the immutable poolManager address.
  • [info] Permission bits enforced at deploy: Address-based permissions require deployment at an address with low bits 0xC0. The constructor enforces this, so misdeployment reverts rather than producing a silent hook.

Contract details

Verified source
Yes (V4IndexEngine)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
4,500 bytes
Upgradeable proxy
No
Detected patterns
pausable

Pools using V4IndexEngine