Dynamic fee hook on BNB Chain

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

Volume (24h)
$72.65K
Value locked (TVL)
$138
All-time volume
$461.55K
Pools using this hook
1
Swaps (24h)
3,253 (55 traders)
Total swaps
18,032

What it does

A dynamic-fee hook that sets and exposes a pool fee for swaps and checks liquidity additions, controlled by a single owner.

How it works step by step

  • Sets pool-specific fee state during afterInitialize
  • Exposes the current fee through publicFee()
  • Computes the dynamic fee applied in beforeSwap
  • Checks liquidity additions in beforeAddLiquidity
  • Pushes fee updates to the pool manager via updateDynamicLPFee
  • Restricts privileged setters to the owner
Swap behaviour
beforeSwap is enabled and applies the dynamic fee used for each swap; afterSwap selector exists but is not enabled in permissions.
Liquidity behaviour
beforeAddLiquidity is enabled and performs a check before liquidity is added; beforeRemoveLiquidity and afterAddLiquidity/afterRemoveLiquidity selectors exist but are not enabled in permissions, so no callbacks run there.
Fee behaviour
Hook exposes publicFee() and afterInitialize writes a uint24 fee into storage slot 0 offset 20; the hook appears to drive a dynamic LP fee and calls updateDynamicLPFee on the pool manager, with NotDynamicFeePool error present.
Owner & admin controls
Owner can call transferOwnership(address) and set the stored public fee via the selector 0x6e1de20e (address,address,uint24,int24,address,uint24) which writes slot 0 offset 20 (uint24); exact access check on that setter is inferred from bytecode only.

Enabled Uniswap v4 callbacks

afterInitialize, beforeAddLiquidity, beforeSwap

afterInitialize: sets up pool-specific fee state at pool creation. beforeAddLiquidity: runs a check before liquidity is added. beforeSwap: computes the dynamic fee applied to each swap.

Security & trust assessment

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

Who controls it: The owner controls ownership transfer and the stored fee parameter; a privileged key could set the fee to a high value, extracting value from swappers, or transfer control to another address.

Risk to user funds: The hook has no return-delta or token-taking permissions enabled, so it does not directly hold or move pool tokens; its exposure is limited to the fee it sets, which can change swap outcomes for users.

Security findings

  • [medium] Owner-settable fee: Owner can write the stored uint24 fee through the 0x6e1de20e setter, which feeds the dynamic LP fee applied on swaps.
  • [low] Single-step ownership transfer: Owner can transfer ownership to any address via transferOwnership, with no visible two-step confirmation in the decoded functions.
  • [info] Single owner key: Hook is ownable with an owner slot at storage slot 0; the bytecode references NotOwner, so access is restricted to a single key.

Contract details

Verified source
No
Bytecode size
2,877 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, ownable

Pools using Dynamic fee hook