Dynamic fee hook on BNB Chain

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

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$15.10M
Pools using this hook
2
Swaps (24h)
0 (0 traders)
Total swaps
14,018

What it does

A Uniswap v4 hook that applies owner-configurable tiered dynamic swap fees and can restrict who adds liquidity and pause trading.

How it works step by step

  • Returns a dynamic swap fee from beforeSwap based on configured tiers and a default fee
  • Tracks swap counts per pool id in a mapping
  • Uses a gas threshold parameter as part of fee selection logic
  • Gates liquidity additions in beforeAddLiquidity with an address-based permission mapping
  • Allows the owner to pause swaps and reconfigure fees at any time
Swap behaviour
beforeSwap computes a dynamic fee from tiered settings and per-pool swap counts and returns it to the pool; swaps revert while the hook is paused.
Liquidity behaviour
beforeAddLiquidity checks a per-address mapping (likely an allowlist) and can revert liquidity additions for addresses that are not permitted. No removal logic is enabled for the hook.
Fee behaviour
Fees are not static: the hook reads tiered fee parameters (tierOneFee, tierTwoFee, tierThreeFee), a defaultFee and a per-pool fee mapping keyed by address, and gasThreshold appears to select a fee tier in beforeSwap. Owner-set fee configuration determines the swap fee returned by the hook; exact tier logic cannot be confirmed without source.
Owner & admin controls
Owner (slot 0) can pause and unpause swaps via setPaused, change the default fee via setDefaultFee, change the gas threshold via setGasThreshold, set tier fees via the fee-config setter (selector 0x65a08c0e), set per-address flags via 0x6e0db89c, set per-pool fee overrides via 0xc94e2375, and transfer ownership via transferOwnership. Ownership is a single address with no visible timelock.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeSwap

beforeSwap: computes the dynamic swap fee and applies swap-count tracking (mapping keyed by pool id). beforeAddLiquidity: gates liquidity additions using an address-keyed boolean mapping.

Security & trust assessment

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

Who controls it: The owner can pause all swaps, change fees (including fee tiers and per-pool fee overrides), and grant or revoke liquidity access, so a compromised owner key could raise swap fees sharply or block trading.

Risk to user funds: The hook does not appear to custody user tokens or take return deltas; its main effect on funds is through the swap fee it returns and its ability to pause swaps or block liquidity additions. Users cannot withdraw funds stuck by a pause through the hook itself, but pool funds are not moved by the hook.

Security findings

  • [medium] Owner-controlled fee parameters: Owner can set default and tier fees through setter functions; no bounds are visible in the decoded selectors, so fees could potentially be set very high.
  • [medium] Pausable swaps: setPaused lets the owner halt swaps, which would block all trading in pools using this hook.
  • [low] Allowlisted liquidity provision: beforeAddLiquidity reverts for addresses not in a permission mapping, restricting who can provide liquidity.
  • [info] Non-upgradeable as observed: Contract stores its own fee state and its own ownership; no proxy or upgrade selectors were found in the decoded functions.

Contract details

Verified source
No
Bytecode size
8,010 bytes
Upgradeable proxy
No
Detected patterns
ownable, pausable

Pools using Dynamic fee hook