Dynamic fee hook on BNB Chain

Uniswap v4 Hook Contract 0xfffff5962193fbdc458e81cac67437e426c708c0 on BNB Chain · Dynamic fee

Volume (24h)
$16.36K
Value locked (TVL)
$67.09K
All-time volume
$13.73M
Pools using this hook
1
Swaps (24h)
206 (83 traders)
Total swaps
79,666

What it does

A dynamic-fee hook for a Uniswap v4 pool on BNB Chain that adjusts LP fees on swaps and manages its own liquidity positions.

How it works step by step

  • Sets a dynamic LP fee on the pool through updateDynamicLPFee during swaps
  • Runs logic before and after swaps via beforeSwap and afterSwap callbacks
  • Gates liquidity additions through beforeAddLiquidity
  • Mints and burns its own liquidity positions through mintPosition and burnPosition
  • Takes and settles currency with the pool manager through take and settleFor
  • Allows currency to be withdrawn from the hook with withdrawCurrency
Swap behaviour
beforeSwap and afterSwap are enabled; beforeSwap likely sets the dynamic LP fee via updateDynamicLPFee, and afterSwap performs post-swap accounting, with exact logic not verifiable from bytecode.
Liquidity behaviour
beforeAddLiquidity is enabled and may gate or inspect liquidity additions; the hook also exposes mintPosition and burnPosition that manage positions via modifyLiquidities and track liquidity via getPositionLiquidity, so it appears to act as a position manager for its own liquidity.
Fee behaviour
Calls updateDynamicLPFee on the pool manager (selector 0x52759651), indicating the hook sets a dynamic LP fee per pool, likely from its beforeSwap logic; exact fee formula not determinable from the bytecode alone.
Owner & admin controls
Storage slot 0 holds an address-like owner value written in a16c9b57 (likely an ownership or initializer setter); mintPosition, burnPosition and withdrawCurrency suggest an operator-only position manager, but no explicit owner check was confirmed from the decoded bytecode, so exact admin scope is uncertain.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeSwap, afterSwap

beforeAddLiquidity checks or gates liquidity additions; beforeSwap computes and applies the dynamic fee before each swap; afterSwap runs post-swap bookkeeping, possibly updating state or moving currency.

Security & trust assessment

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

Who controls it: A privileged key may be able to set the owner-like address, mint and burn positions, and withdraw accumulated currency via withdrawCurrency; the exact authority cannot be verified without source.

Risk to user funds: The hook takes and settles currency with the pool manager and exposes withdrawCurrency and position minting and burning, so it can hold, move and potentially withdraw funds it manages; the access control on these paths is not confirmed.

Security findings

  • [high] Currency withdrawal path: withdrawCurrency(address) is an externally callable function that moves currency out of the hook, and its access control could not be confirmed from the bytecode.
  • [medium] Hook moves currency: The hook calls take, settleFor and modifyLiquidities on the pool manager, so it moves pool currency and can hold balances on behalf of the pool.
  • [medium] Owner-like storage slot written in an unnamed function: Storage slot 0 stores an address written during a16c9b57, which may be an initializer or owner setter; if it is not one-time, ownership could be reassigned.
  • [info] Dynamic fee control: The hook dynamically updates LP fees, so a privileged or manipulable fee source could raise swap costs for traders.

Contract details

Verified source
No
Bytecode size
24,200 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency

Pools using Dynamic fee hook