Dynamic fee hook on Robinhood Chain

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

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

What it does

A Uniswap v4 hook that charges tiered dynamic swap fees with owner-configurable rates and an after-swap return delta, controlled by a single owner who can pause trading and withdraw tokens.

How it works step by step

  • Stores a default fee and three tier fees in contract storage, updated by the owner
  • beforeSwap selects a fee tier for the swap and can return a fee override
  • Tracks swap counts per pool id in a mapping
  • afterSwap updates counters and can adjust the swap delta via afterSwapReturnDelta
  • Owner can pause swaps, change the gas threshold, and withdraw or sweep tokens
Swap behaviour
beforeSwap is enabled and applies a dynamic fee chosen by tier logic, gated by the paused flag and gas threshold; afterSwap runs bookkeeping per pool and can apply a return delta to the swap.
Liquidity behaviour
No liquidity callbacks are enabled in the hook permissions. The beforeAddLiquidity, afterRemoveLiquidity and related selectors are present in the dispatch table but are not permitted by the address flags, so they are not invoked by the PoolManager.
Fee behaviour
Fees appear to be set per tier (tierOne, tierTwo, tierThree fees and a default fee) stored in the hook's config slots and updated by an owner-only setter (selector 0xca14a65b). beforeSwap likely selects a fee tier and the hook may return an override fee. Exact selection logic cannot be confirmed without source.
Owner & admin controls
Owner (slot 0 address) can call setPaused, setGasThreshold, transferOwnership, sweep and withdraw, and also appears to set fee configuration via selector 0xca14a65b (writes slots 0 and 1 and 2). Owner can change tier fees, default fee, and gas threshold, and can withdraw or sweep tokens held by the hook.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, afterSwapReturnDelta

beforeSwap: inspects swap parameters and likely computes a dynamic fee and records swap counts per pool. afterSwap: runs post-swap bookkeeping and may return a delta adjustment (afterSwapReturnDelta is enabled, so the hook can take or give tokens after swaps).

Security & trust assessment

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

Who controls it: A single owner key controls pausing, fee tiers, gas threshold, ownership transfer and token withdrawal. A malicious or compromised owner could raise fees, pause swaps, or drain tokens accumulated in the hook.

Risk to user funds: The hook can take tokens via its after-swap return delta and holds tokens that the owner can withdraw or sweep. It can also block swaps when paused. User funds in the pool are not directly custodied by the hook, but fee extraction and owner withdrawal paths expose value.

Security findings

  • [medium] Return delta can take tokens from swaps: afterSwapReturnDelta is enabled, so the hook can take a portion of swap output from users and pool flows through a return delta.
  • [high] Owner can withdraw hook-held tokens: The owner can call withdraw(address,address,uint256) and sweep(address) to move tokens held by the hook.
  • [medium] Owner can pause swaps: setPaused exists and swaps are gated on the paused flag read in beforeSwap, so the owner can halt trading.
  • [medium] Owner can set fees without evident bounds: Fee tier values and the default fee are writable by the owner; no bounds are evident from bytecode, so fees could be set very high.
  • [info] Single-key ownership: Owner is a single address with transferOwnership and no evident timelock or multisig requirement.

Contract details

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

Pools using Dynamic fee hook