Dynamic fee hook on Robinhood Chain

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

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$10.87M
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
9,384

What it does

A Uniswap v4 hook that applies owner-configurable dynamic swap fees (base fee plus tiered fees) and can take a share of swap output, with an owner-controlled pause.

How it works step by step

  • beforeSwap computes a dynamic fee from a base fee and tiered fee values stored in contract slots
  • afterSwap increments a per-pool swap counter stored in a mapping
  • afterSwapReturnDelta lets the hook retain a portion of swap output as a return delta
  • Owner can set base fee, tier configuration and gas threshold
  • Owner can pause and unpause the hook
  • Owner can sweep or withdraw tokens held by the hook
Swap behaviour
beforeSwap computes and applies a dynamic fee based on configured base and tier values and a gas threshold; afterSwap records swap counts per pool and can return a delta that the hook keeps.
Liquidity behaviour
Liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are present as selectors but appear to be passive; no clear liquidity manipulation was identified from the decoded input.
Fee behaviour
Fees are dynamic and tiered: beforeSwap reads a base fee plus tierOne, tierTwo and tierThree fee values and a gas threshold, and the owner can adjust these through setBaseFee and the fee configuration setter. Exact tier selection logic cannot be fully confirmed without source.
Owner & admin controls
Owner (slot 0) can pause or unpause the hook via setPaused, set the base fee via setBaseFee, set the gas threshold via setGasThreshold, reconfigure fee tiers via the unnamed 0xca14a65b setter, sweep tokens via sweep, withdraw funds via withdraw, and transfer ownership via transferOwnership.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, afterSwapReturnDelta

beforeSwap sets the dynamic swap fee, afterSwap records swap activity (swapCount mapping) and can return a delta, and afterSwapReturnDelta allows the hook to take a share of the swap output as a return delta.

Security & trust assessment

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

Who controls it: The owner can pause swaps, change fees including the base fee and tier configuration, set the gas threshold, sweep and withdraw tokens held by the hook, and transfer ownership to any address, so a privileged key has substantial control over user pricing and hook-held funds.

Risk to user funds: The hook can take a share of swap output through its return delta and holds balances that the owner can sweep or withdraw, so user and pool value routed through this hook is exposed to owner action.

Security findings

  • [medium] Owner pause control: The setPaused function, guarded by the owner, can halt hook behaviour, which may block swaps routed through this hook.
  • [medium] Owner-adjustable fees: setBaseFee and the fee configuration setter let the owner change swap fees; the bytecode does not show a clear upper bound, so fees could be raised substantially.
  • [medium] Hook holds and withdraws tokens: afterSwapReturnDelta is enabled and the hook exposes sweep and withdraw functions, so the hook can hold tokens and the owner can move them out.
  • [low] Single owner key with instant transfer: Ownership can be reassigned through transferOwnership with no visible timelock, so a compromised owner key gives full control.
  • [info] Unverified source: No verified source is available, so function behaviour and bounds are inferred from selectors and storage access only.

Contract details

Verified source
No
Bytecode size
9,544 bytes
Upgradeable proxy
No
Detected patterns
ownable, pausable, return-delta

Pools using Dynamic fee hook