Dynamic fee hook on BNB Chain
Uniswap v4 Hook Contract 0x7f2347dccc0d72155f032bddd5a660ead30740c4 on BNB Chain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- <$0.01
- All-time volume
- $12.43M
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 11,189
What it does
A dynamic-fee hook for a Uniswap v4 pool on BNB Chain that sets swap fees from configurable tiers and takes a post-swap currency delta, with an owner-controllable pause.
How it works step by step
- Overrides the LP fee on each swap in beforeSwap using tiered fee configuration (tierOne, tierTwo, tierThree, default).
- Stores a per-address fee mapping, possibly giving specific addresses a different fee tier.
- Computes a post-swap delta in afterSwap and takes tokens from the pool manager via take().
- Supports a paused state that can disable hook processing.
- Exposes owner-gated configuration and fee getters for off-chain inspection.
- Swap behaviour
- beforeSwap sets the dynamic fee for the swap from the configured tiers or per-address overrides; afterSwap applies a return delta that can take a portion of the swap's tokens.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fees appear to be set by tiered configuration (tierOneFee, tierTwoFee, tierThreeFee, defaultFee, getFeeConfig) and per-address fee mapping, applied in beforeSwap; the hook also returns a delta in afterSwap, so it may take or redirect a portion of swap amounts.
- Owner & admin controls
- Owner-gated functions exist (owner() view, configuration writes to storage slots 5, 7 and 8 via 0xc077e3cd and 0x5ae10390). The paused() state and ACTION_SET_PAUSED suggest the owner can pause hook activity; fee tiers (tierOneFee, tierTwoFee, tierThreeFee, defaultFee) and fee config appear to be owner-adjustable. Exact access checks could not be confirmed without source.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, afterSwapReturnDelta
beforeSwap sets or overrides the dynamic swap fee per pool configuration; afterSwap computes a post-swap delta (afterSwapReturnDelta) that can take tokens from the swap via the pool manager's take function; pausable state can disable hook logic.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: An owner or admin key can likely change fee tiers, default fee, and pause the hook, affecting swap pricing and whether swaps through this pool execute as expected.
Risk to user funds: The hook can take currency via return deltas and transfer tokens, and an admin can pause it; user funds in swaps routed through this pool could be taxed by the afterSwap delta or blocked while paused. Source is unverified, so the exact amounts and conditions are uncertain.
Security findings
- [medium] Hook takes tokens via return delta: The hook has afterSwapReturnDelta and calls take(address,address,uint256), so it can move currency out of the swap flow as part of its accounting.
- [medium] Owner-controlled pause: A pausable flag and ACTION_SET_PAUSED indicate an admin can halt hook processing, which may block swaps routed through this hook.
- [medium] Mutable fee parameters: Multiple fee tier and fee config values are stored and readable, and owner-related storage writes exist, so privileged parameters may be changed after deployment.
- [low] Direct token transfers possible: The contract references a custom token-transfer selector (0xa9059cbb transfer) and a wrapped error type, suggesting it can transfer tokens directly, not only through the pool manager.
Contract details
- Verified source
- No
- Bytecode size
- 13,126 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, pausable, return-delta
Pools using Dynamic fee hook
- QQQB / USDT (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today