RiffHook on BNB Chain

Uniswap v4 Hook Contract 0xd964ae41713d1fa9bf4e7da6bcb7329937c3e000 on BNB Chain · Dynamic fee · Verified contract

Volume (24h)
$3.86
Value locked (TVL)
$3.84
All-time volume
$3.86
Pools using this hook
1
Swaps (24h)
3 (2 traders)
Total swaps
3

What it does

A Riff market hook that lets an authorized agent or creator adjust a Uniswap v4 pool's dynamic LP fee within registry-enforced bounds, so traders and LPs pay a fee that can evolve over time.

This read was written for the hook 0x3c94…e000 on BNB Chain and reused here: the two run the same code.

How it works step by step

  • Sets the pool's LP fee to the v4 dynamic fee flag with an initial fee applied at initialization.
  • Allows pool creation only from the factory through the PoolManager and only for this hook's pool key.
  • Changes the fee via executeDynamicFee, which pulls authorization from the mandate registry.
  • Enforces fee bounds, maximum step size, cooldown, nonce, expiry and policy version in the registry before any fee update.
  • Emits DynamicFeeEvolved on each fee change for transparency.
  • Upgradeable through a UUPS proxy controlled by a single upgrade authority.
Swap behaviour
No swap callbacks.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Pool uses the v4 dynamic fee flag with an initial fee set at initialization via initializeFee. Fee changes go through executeDynamicFee, which calls mandateRegistry.consumeFeeAction to enforce mandate bounds (min/max fee capped at 10%, max delta per step, cooldown of at least 60 seconds, nonce, expiry and policy version) before calling poolManager.updateDynamicLPFee. Fees accrue to LPs as standard v4 pool fees.
Owner & admin controls
The upgrade authority (single wallet, no timelock or multisig) can upgrade the implementation immediately via upgradeToAndCall and can nominate a replacement authority, which accepts without delay. The hook itself has no owner pause or fee setter; fee changes are gated by the registry mandate (creator, executor, bounds, cooldown) rather than an admin key. The registry admin can also upgrade the registry, which governs fee authority for the hook.

Enabled Uniswap v4 callbacks

beforeInitialize

beforeInitialize: restricts pool initialization to the factory calling through the PoolManager and requires the pool key to match this hook's pool ID. No swap, liquidity or return-delta callbacks are enabled.

Security & trust assessment

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

Who controls it: The upgrade authority can replace the hook logic entirely, including fee logic, and can drain or redirect any logic the hook gains through an upgrade. The registry admin can upgrade registry logic that gates fee changes. The mandate creator and an autonomous executor can change fees within the mandate bounds.

Risk to user funds: The hook takes no return deltas and does not custody pool funds, so user funds are not directly held by it. However, an upgrade could add arbitrary logic that moves or blocks funds, and fee settings can change within the mandate bounds, affecting trader costs.

Security findings

  • [high] Immediate upgradeability by a single key: A single upgrade authority key can upgrade the implementation immediately with no timelock or multisig, so the hook's behaviour can change at any time.
  • [medium] Upgradeable proxy: The hook is deployed behind an ERC1967 UUPS proxy; the logic served is the implementation at 0x438c6a687b2ca7f581578c7e2687640f62ac9296 and can be swapped.
  • [info] Fee changes bounded by mandate: Fee changes are bounded by the registry mandate (max 10 percent, cooldown and delta limits), which limits how far an executor or the creator can move the fee in a single action.
  • [info] No swap or liquidity callbacks: The hook does not hold or move user tokens; it only sets the LP fee via the PoolManager and enables no swap or liquidity callbacks, so swaps cannot be blocked by the hook.

Contract details

Verified source
Yes (RiffHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
130 bytes
Upgradeable proxy
Yes
Detected patterns
dynamic-fee, upgradeable

Pools using RiffHook