Dynamic fee hook on BNB Chain
Uniswap v4 Hook Contract 0x8c23f7c05ce6939e902bc8afea8ab40dd5bb8880 on BNB Chain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- <$0.01
- All-time volume
- $7.62M
- Pools using this hook
- 2
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 5,615
What it does
A dynamic-fee hook that applies tiered swap fees and restricts liquidity additions to an owner-managed allowlist.
How it works step by step
- Tracks swap count per pool in a mapping keyed by pool id
- Selects a fee tier (tier one, two or three, or default) for each swap
- Exposes an owner-configurable fee configuration and gas threshold
- Gates beforeAddLiquidity to addresses on an allowlist
- Supports an owner pause switch that is checked during swaps
- Swap behaviour
- beforeSwap computes a tiered fee based on per-pool swap count and a gas threshold, using tierOne, tierTwo, tierThree and default fees, and returns the fee override for the swap.
- Liquidity behaviour
- beforeAddLiquidity checks an allowlist (isAllowed mapping) and may revert for addresses not allowed; no liquidity removal logic is active beyond the selector being present.
- Fee behaviour
- Fee is tiered: tierOneFee, tierTwoFee and tierThreeFee are read during beforeSwap alongside a defaultFee and a fee config (getFeeConfig, uint24 and uint16 parameters) that the owner can update; a swap count per pool (mapping slot 3) appears to select the tier. Exact tier thresholds could not be confirmed without source.
- Owner & admin controls
- Owner (slot 0 address) can transfer ownership, pause and unpause via setPaused, set the fee configuration via 0x65a08c0e, set the gas threshold via setGasThreshold, and manage an allowlist via setAllowed (mapping at slot 4) which gates beforeAddLiquidity.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap
beforeSwap is used to compute and apply a tiered dynamic fee based on swap count and gas threshold; beforeAddLiquidity is used to gate liquidity provision to allowlisted addresses.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: The owner can pause the hook, change the fee configuration and tier fees, adjust the gas threshold, add or remove allowed liquidity providers, and transfer ownership, so a single key controls fee levels and who may add liquidity.
Risk to user funds: The hook does not appear to take tokens or use return deltas, so it does not directly custody funds; the main exposure is that the owner can raise fees on swaps or block liquidity addition, and pausing could block swaps.
Security findings
- [medium] Owner-controlled pause: Pausable flag and setPaused allow the owner to halt hook logic, which can affect swap execution depending on how paused is checked in beforeSwap.
- [medium] Owner can change fees and liquidity access: setPaused, setAllowed and setGasThreshold are owner-restricted state changers; the 0x65a08c0e fee configuration setter writes slot 0 and slot 1 and can change fees arbitrarily within its parameter range.
- [info] Unverified source: Without verified source, the bounds on the fee setter parameters and the gas threshold logic cannot be confirmed.
Contract details
- Verified source
- No
- Bytecode size
- 7,185 bytes
- Upgradeable proxy
- No
- Detected patterns
- ownable, 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