Dynamic fee hook on Robinhood Chain

Uniswap v4 Hook Contract 0xf9176589b6fe2d5f68dbef7bcc79475be21a20cc on Robinhood Chain · Dynamic fee

Volume (24h)
$0
Value locked (TVL)
$102.04K
All-time volume
$2.70M
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
4,733

What it does

Applies a basis-point tax on swaps in this pool and routes it to a treasury address.

How it works step by step

  • Initializes pool-specific state (poolId and an initialized flag) in beforeInitialize.
  • Runs beforeSwap and afterSwap on every swap in the pool.
  • Uses beforeSwapReturnDelta and afterSwapReturnDelta to take a delta from swap amounts.
  • Calculates the tax from TAX_BPS over BPS_DENOMINATOR.
  • Routes the collected tax to TAX_TREASURY.
Swap behaviour
beforeSwap and afterSwap run on every swap and use return deltas to take a tax from the swap amounts, which is sent to TAX_TREASURY.
Liquidity behaviour
Hook exposes beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors, but no liquidity callback permissions are enabled, so these functions are not invoked by the PoolManager for this hook.
Fee behaviour
Hook has beforeSwapReturnDelta and afterSwapReturnDelta enabled and exposes TAX_BPS, BPS_DENOMINATOR and TAX_TREASURY getters, which suggests a swap tax taken by the hook and routed to a treasury; the exact fee formula could not be confirmed from the decoded selectors alone.
Owner & admin controls
No admin controls found. No owner, pause or upgrade selectors were decoded; the view getters TAX_TREASURY, TAX_BPS, POOL_FEE and KARAT expose constants or configuration but no setter was found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: runs once at pool creation and writes the poolInitialized flag and poolId state. beforeSwap: runs before each swap and is paired with beforeSwapReturnDelta to adjust the swap amounts. afterSwap: runs after each swap and is paired with afterSwapReturnDelta to take or settle a delta, likely the tax.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, low confidence).

Who controls it: No privileged key was identified in the decoded bytecode, so the hook appears non-upgradeable and non-pausable from its selectors. Trust rests on the immutable tax parameters and treasury address.

Risk to user funds: The hook can take tokens from swaps through return deltas, which means a fraction of each trade flows to the treasury address. It does not appear to hold custody of LP liquidity, since liquidity callbacks are disabled.

Security findings

  • [medium] Return-delta hook can take swap value: Both beforeSwapReturnDelta and afterSwapReturnDelta are enabled, so the hook can take a portion of swap amounts from the trade before and after execution.
  • [info] Unverified source: Without verified source, the tax logic and rounding cannot be audited; the TAX_BPS and treasury values were read as selectors only.
  • [info] Immutable pool binding: Storage shows a bool initialization flag and a uint256 poolId written in beforeInitialize, with no decoded setter for later changes.

Contract details

Verified source
No
Bytecode size
7,032 bytes
Upgradeable proxy
No
Detected patterns
return-delta

Pools using Dynamic fee hook