Dynamic fee hook on BNB Chain
Uniswap v4 Hook Contract 0x8e24cb1691a883e39e1076efa3b217847aed5080 on BNB Chain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0.39
- All-time volume
- $438.61K
- Pools using this hook
- 21
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 33,779
What it does
A Uniswap v4 hook that applies an owner-configurable dynamic swap fee to pools it is attached to, aiming to adjust trading costs for traders and returns for LPs.
How it works step by step
- Initializes per-pool fee configuration in afterInitialize when a pool is created with this hook
- Reads stored fee parameters for the pool in beforeSwap
- Returns a dynamic LP fee for each swap, clamped to MIN_ALLOWED_FEE and MAX_ALLOWED_FEE
- Exposes owner-gated setter 0x02b05f8c to update fee configuration
- Exposes fee and pool state views (feeConfig, poolState) for off-chain reading
- Does not hook liquidity add or remove, donate, or return token deltas
- Swap behaviour
- beforeSwap computes the pool's dynamic fee from stored per-pool configuration, clamped between minimum and maximum allowed fees, and returns it to the pool manager for the swap.
- Liquidity behaviour
- No liquidity callbacks are enabled in the hook permissions (only afterInitialize and beforeSwap); liquidity add/remove functions are present in the ABI but are not hooked by the pool manager for this address.
- Fee behaviour
- Sets a dynamic LP fee per pool: beforeSwap (0x575e24b4) reads per-pool fee state from storage mappings and returns an overridden fee bounded by MIN_ALLOWED_FEE and MAX_ALLOWED_FEE, with DEFAULT_MIN_FEE and DEFAULT_MAX_FEE as fallback bounds. Fee is recomputed from stored state and the owner-configurable parameters; the exact formula could not be recovered from bytecode alone.
- Owner & admin controls
- Owner (single address in slot 0) can renounce ownership and transfer ownership. Selector 0x02b05f8c (nonpayable, 9 args) is an owner-gated configuration setter that writes fee configuration mappings in slots 1 and 2, so the owner can change fee parameters for pools using this hook.
Enabled Uniswap v4 callbacks
afterInitialize, beforeSwap
afterInitialize: initializes per-pool fee configuration when a pool is created with this hook. beforeSwap: computes and returns the dynamic swap fee for each swap.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: A single owner key controls fee configuration and can renounce or transfer ownership. A malicious or compromised owner could set fees toward the maximum bound, extracting value from swappers, or set them to the minimum to drain LP value to arbitrageurs.
Risk to user funds: The hook does not hold tokens and cannot block liquidity operations, but it sets the fee charged on every swap in its pools. Users and LPs are exposed to fee changes made by the owner, bounded by the on-chain min and max constants.
Security findings
- [medium] Owner can change swap fees: Owner-gated function 0x02b05f8c writes fee configuration storage used by beforeSwap, so a single key can change the fee applied to every swap on pools using this hook.
- [low] Single-owner control without timelock: Ownable pattern with renounceOwnership and transferOwnership present; no timelock or multisig is visible in the bytecode.
- [info] No token-taking or liquidity gating permissions: Hook declares beforeSwap and afterInitialize only, so it does not take tokens via return deltas and does not gate liquidity operations.
- [info] Fee bounds enforced: Fee is bounded by MIN_ALLOWED_FEE and MAX_ALLOWED_FEE constants, limiting how extreme an owner-set fee can be.
Contract details
- Verified source
- No
- Bytecode size
- 5,639 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, ownable
Pools using Dynamic fee hook
- USDT / ARX (Dynamic fee) — 24h volume $0, TVL $0.30, 0 swaps today
- USDT / CLO (Dynamic fee) — 24h volume $0, TVL $0.09, 0 swaps today
- BAS / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / RIVER (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- O / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- BTW / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / SYN (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / DEXE (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- SLX / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- UB / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ZEST / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / EVAA (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / BULLA (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / FOLKS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / BSB (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / BLESS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / AIO (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / ALICE (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- M / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / RESOLV (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today