Dynamic fee hook on BNB Chain
Uniswap v4 Hook Contract 0xdd8e8dc0e38a1b79a19ba85c910962650cee8080 on BNB Chain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $841
- All-time volume
- $10.65K
- Pools using this hook
- 98
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 170
What it does
A Uniswap v4 hook that charges a dynamically computed LP fee on each swap, with owner-configurable fee parameters.
How it works step by step
- Implements beforeSwap to return a dynamic LP fee for each swap
- Computes the fee with calculateFee from parameters stored in packed slot 5
- Reads current pool state (getSlot0) to inform fee calculation
- Pushes fee updates to the pool manager via updateDynamicLPFee
- Owner can set base currency and reconfigure fee parameters
- Swap behaviour
- beforeSwap computes a dynamic fee (via calculateFee and stored parameters, reading pool state) and returns it for the swap.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fee is computed on the fly by calculateFee(uint256) and beforeSwap returns a dynamic LP fee; fee parameters are stored in packed slot 5 and owner-settable, and the hook calls updateDynamicLPFee on the pool manager to apply the value.
- Owner & admin controls
- Owner (slot 0) can transfer ownership, set the base currency (slot 1) and set/override the dynamic LP fee via the owner-gated setters (0x279da5d9, 0x69c9e8a6 write packed fee/parameter slot 5); no pause or upgrade mechanism identified.
Enabled Uniswap v4 callbacks
beforeSwap
beforeSwap: computes and returns the dynamic swap fee for each swap based on stored parameters and pool state read via getSlot0.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner can transfer ownership, change the base currency and reconfigure fee parameters, so a compromised owner key could set swap fees to extreme values and extract value from traders.
Risk to user funds: The hook does not appear to custody tokens or take return deltas; it affects user funds only by setting the LP fee charged on swaps, which an owner could raise significantly.
Security findings
- [medium] Owner can reconfigure dynamic fees: Owner-gated setters (0x279da5d9, 0x69c9e8a6, 0xb478f416) write fee-related storage that directly determines swap fees paid by users.
- [low] Single-step ownership transfer: The owner can reassign ownership in a single step via transferOwnership (0xf2fde38b), with no evident two-step acceptance.
- [info] Source not verified: Without verified source, exact fee bounds and the correctness of calculateFee cannot be confirmed from bytecode alone.
Contract details
- Verified source
- No
- Bytecode size
- 5,612 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, ownable
Pools using Dynamic fee hook
- CPERon / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- BMNRB / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / BZon (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- SMCIB / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- 大肥鱼 / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- NTESon / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / JDon (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / FUTUon (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- BIDUon / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ALABB / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / sGENIUS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- AAOIB / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- MRVLB / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- RDDTon / USDT (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- USDT / DOP (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / MIXUx (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / BILIon (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / IBMB (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDT / USARB (Dynamic fee) — 24h volume $0, TVL $265, 0 swaps today
- MUUB / USDT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today