Dynamic fee hook on BNB Chain

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

Volume (24h)
$0
Value locked (TVL)
$163
All-time volume
$0
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
0

What it does

A dynamic-fee hook that sets the swap fee for its pool on each swap using owner-configurable parameters and can be paused by the owner.

How it works step by step

  • Runs in beforeSwap on every swap in the pool
  • Reads a paused flag and reverts swaps when paused
  • Computes a dynamic LP fee from stored parameters through calculateFee
  • Pushes the computed fee to the pool manager via updateDynamicLPFee
  • Stores a configurable base currency used in pricing logic
  • Lets the owner adjust fee parameters and pause state
Swap behaviour
beforeSwap runs on every swap, checks the paused flag, computes a dynamic fee through calculateFee, and updates the LP fee on the pool manager.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Dynamic fee computed in beforeSwap via calculateFee(uint256) using storage slots 3 to 5 and the packed parameters in slot 6; the owner can adjust these parameters, and the result is pushed to the pool through updateDynamicLPFee on the pool manager.
Owner & admin controls
Owner (slot 0) can transfer ownership (two-step via pendingOwner in slot 1), set base currency (0xb478f416), pause and unpause swaps (setPaused), and update the dynamic fee parameters (0x279da5d9, 0x69c9e8a6, 0x915ca4bf, 0xf0893cb4, 0x079fcf09). No upgrade mechanism identified.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap is enabled and used to compute and apply a dynamic LP fee for each swap.

Security & trust assessment

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

Who controls it: The owner can pause swaps, change the fee curve parameters and change the base currency, so a compromised or malicious owner could raise fees sharply or halt trading for the pool.

Risk to user funds: The hook does not appear to custody tokens or take return deltas; user funds are exposed mainly through fee manipulation and the ability of the owner to pause swaps, not through direct token transfers.

Security findings

  • [medium] Owner-adjustable dynamic fee: The owner can set fee parameters that feed calculateFee, so fees can be raised substantially for swappers without any on-chain bound visible from the decoded code.
  • [medium] Owner pause can halt swaps: setPaused is callable by the owner and beforeSwap reads the paused flag, so the owner can block all swaps on the pool.
  • [info] Two-step ownership transfer: Ownership transfer is two-step (transferOwnership sets pendingOwner, acceptOwnership completes it), which reduces the risk of transferring to a wrong address.
  • [info] Unverified source: Contract has no source; function names are inferred from selectors and behaviour may differ from intent.

Contract details

Verified source
No
Bytecode size
8,155 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, ownable, pausable

Pools using Dynamic fee hook