Dynamic fee hook on BNB Chain
Uniswap v4 Hook Contract 0xb79969c60f83bba765c14de29fb4e36727610880 on BNB Chain · Dynamic fee
- Volume (24h)
- $0.07
- Value locked (TVL)
- $14
- All-time volume
- $0.07
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 1
What it does
An admin-managed, upgradeable hook that applies per-pool settings and possibly a configurable fee on swaps and limits who can add liquidity, while LPs can always withdraw freely.
This read was written for the hook 0x685e…c880 on BNB Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Runs a check before every swap on registered pools, likely applying a per-pool fee setting and tracking per-pool counters.
- Runs a check before liquidity is added, apparently limiting who may add liquidity per pool (a per-pool address allowlist exists).
- Lets an admin or pool initializer register pools and set per-pool configuration, including a small fee-like value and an address list.
- Upgradeable proxy whose owner can swap in new logic, but it can never gain return-delta or withdrawal callbacks.
- Swap behaviour
- Before each swap the hook reads the pool's configuration and may set a swap fee or revert, for example when a global toggle is set. It cannot take tokens from swaps directly because return deltas are disabled.
- Liquidity behaviour
- Before liquidity is added the hook checks a per-pool address allowlist, so adding liquidity may be restricted to approved addresses. Remove-liquidity callbacks are disabled, so LPs can always withdraw freely.
- Fee behaviour
- A per-pool fee value stored as a 16-bit number appears to be applied as the pool's fee. The exact range and cap cannot be confirmed from bytecode, and any fee goes to the pool's LPs through normal Uniswap accounting, not to the hook.
- Owner & admin controls
- The owner/admin can upgrade the implementation, register and configure pools, manage per-pool liquidity allowlists, toggle a global flag that affects swaps, and blacklist function selectors. Exact fee caps are not verifiable from bytecode.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap
beforeAddLiquidity: gates who can add liquidity per pool; beforeSwap: applies per-pool config, possible fee override, and can block swaps.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner/admin controls upgrades, pool configuration, and allowlists. The worst they can do is halt swaps, restrict new liquidity, or set fees within whatever range the logic allows.
Risk to user funds: The hook holds no user or LP funds and cannot deduct tokens from swaps; the exact fee range is unknown from bytecode. LP principal cannot be locked or drained by this hook.
Security findings
- [medium] Upgradeable proxy with limited permissions: The owner can change the hook logic, but the address bits only allow beforeSwap and beforeAddLiquidity, so no upgrade can take swap tokens via deltas or block withdrawals.
- [medium] Admin can gate swaps and liquidity adds: A global toggle and per-pool settings read in beforeSwap could block trading, and an allowlist controls who may add liquidity.
- [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled at the address level, so LP principal can always be withdrawn.
Contract details
- Verified source
- No
- Bytecode size
- 100 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- ownable, upgradeable
Pools using Dynamic fee hook
- YY / WBNB (Dynamic fee) — 24h volume $0.07, TVL $14, 1 swaps today