Dynamic fee hook on BNB Chain
Uniswap v4 Hook Contract 0x6fcca4d604809604d9fbbc6e9831cc6755bf8880 on BNB Chain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- <$0.01
- All-time volume
- $9.47M
- Pools using this hook
- 3
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 13,710
What it does
A Uniswap v4 hook on BSC that applies owner-configured dynamic fee tiers and per-address fee overrides to swaps, and gates liquidity additions through a pausable, allowlisted pool registration system.
How it works step by step
- Applies dynamic fee tiers (tierOne, tierTwo, tierThree, default) to swaps via beforeSwap
- Supports per-address fee overrides for specific senders
- Gates liquidity additions in beforeAddLiquidity against pool registration and allowlist state
- Tracks per-pool swap counts and pool state
- Can be paused by the owner to halt hook-gated operations
- Caps LP fees with a maximum LP fee constant and reverts on oversized fees
- Swap behaviour
- beforeSwap returns a dynamic fee override based on configured tiers and per-address overrides, and updates per-pool swap counters.
- Liquidity behaviour
- beforeAddLiquidity is implemented; it reads and writes per-pool and per-address state (slots 7 and 8) and may restrict or record liquidity additions for registered pools. Exact checks could not be determined from decoded bytecode alone.
- Fee behaviour
- Fees are set from owner-configured tiers (tierOneFee, tierTwoFee, tierThreeFee, defaultFee) with per-pool and per-address fee overrides (getFeeOverride, mapping at slot 5 and slot 6), and the hook returns a dynamic-fee override flag (OVERRIDE_FEE_FLAG, DYNAMIC_FEE_FLAG) from beforeSwap. Exact tier selection logic could not be fully determined without source.
- Owner & admin controls
- Owner (owner() view, NotOwner error) can pause and unpause the hook via setPaused(bool), set the gas threshold via setGasThreshold(uint256), manage an allowlist via setAllowed(address,bool) and batch allowlisting, register pools via registerPool, and set fee configuration via selectors 0x2d398609, 0x5ddf0f5e, 0x40bba228 and 0xaf7d96ec (fee tier and per-address fee overrides). No upgrade mechanism was identified in the decoded selectors.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap
beforeSwap: applies the dynamic fee override and updates swap counters per pool (swapCount, poolState). beforeAddLiquidity: gates or records liquidity additions per pool and sender, using the allowlist and pool registration state.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: The owner can pause the hook, which may block swaps and liquidity additions for all pools, change every fee tier and per-address fee override, and add or remove addresses from the allowlist, so a privileged key can directly alter the cost of trading and who may add liquidity.
Risk to user funds: The hook does not appear to custody tokens directly from the decoded selectors, but it can block swaps and liquidity additions through pausing and allowlisting, and can raise fees through owner-set tiers and overrides, affecting user outcomes without taking principal.
Security findings
- [medium] Owner pause control: The owner can call setPaused(bool), which is checked via paused(). If the hook is paused, pool operations gated by this hook may revert, blocking swaps or liquidity adds.
- [medium] Owner-controlled fee parameters: setGasThreshold, fee tier setters (0x2d398609, 0x5ddf0f5e, 0x40bba228, 0xaf7d96ec) and per-address fee overrides let the owner set fees; the LP fee cap MAX_LP_FEE exists but the exact bound applied to owner-set values could not be confirmed from bytecode.
- [low] Allowlist and pool registration gating: Pool registration (registerPool) and an allowlist (setAllowed, batch allowlist) gate participation; the owner decides which pools and addresses are permitted.
- [info] Input validation present: The bytecode contains reverts for LPFeeTooLarge, InvalidWeightTotal, InvalidAddress and NotOwner, indicating input validation exists, but full validation logic could not be verified without source.
Contract details
- Verified source
- No
- Bytecode size
- 13,242 bytes
- Upgradeable proxy
- No
- Detected patterns
- pausable
Pools using Dynamic fee hook
- USDC / WBNB (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- USDT / WBNB (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- WBNB / U (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today