Dynamic fee hook on BNB Chain

Uniswap v4 Hook Contract 0x847f3a2ba166d28453746ad9690783bdad5e85cf on BNB Chain · Dynamic fee

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$4.61M
Pools using this hook
29
Swaps (24h)
0 (0 traders)
Total swaps
21,882

What it does

A Uniswap v4 hook on BNB Chain that uses return-delta callbacks on swaps and liquidity changes, with owner-controlled fees, pausing and withdrawals, so its exact effect on traders and LPs cannot be confirmed without source.

How it works step by step

  • Runs beforeSwap and afterSwap callbacks that can modify swap amounts via return deltas
  • Runs afterAddLiquidity and afterRemoveLiquidity callbacks that can adjust liquidity flows via return deltas
  • Stores fee tiers, discount threshold and creator share parameters that the owner can change
  • Tracks claimable fees per recipient and exposes claimFees and withdraw functions
  • Supports pausing, authorized owners and a signer-based license check
Swap behaviour
beforeSwap and afterSwap run with return-delta permissions, so the hook can adjust swap amounts and take a fee or share on each swap, and the owner can pause swaps.
Liquidity behaviour
Hooks after add and remove liquidity return deltas, indicating it can take or credit tokens during liquidity operations; purpose and magnitude cannot be confirmed without source.
Fee behaviour
Fee-related setters (fee tiers, discount threshold, fee recipient) exist and the hook appears to use a dynamic fee flag and a creator share in basis points; exact fee formula cannot be determined from decoded bytecode alone.
Owner & admin controls
Owner (two-step transfer via transferOwnership/acceptOwnership, pendingOwner) can set fee recipient, set discount threshold, pause/unpause swaps, grant or revoke authorized owners, set fee tiers and fee parameters, and withdraw funds. Authorized owners mapping and signer-based license checks also gate some functions.

Enabled Uniswap v4 callbacks

afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta

afterAddLiquidity and afterRemoveLiquidity are used for post-liquidity accounting with return deltas; beforeSwap and afterSwap with return deltas are used to adjust swap amounts and take a share of value; afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta let the hook alter liquidity flows; beforeSwapReturnDelta and afterSwapReturnDelta let it modify swap amounts.

Security & trust assessment

Risk level: high (decoded bytecode, low confidence).

Who controls it: The owner and authorized owners can change fee recipient, thresholds and fee parameters, pause swaps, withdraw balances, and revoke other owners. A privileged key could redirect fees or block trading.

Risk to user funds: The hook takes and records currency through the pool manager via return deltas and holds balances it can withdraw to addresses chosen by owners, so user swap and liquidity flows pass through hook-controlled accounting and can be paused or redirected.

Security findings

  • [medium] Owner-controlled fee parameters: Setters allow an owner to change fee tiers and fee parameters that apply to swaps; the exact upper bound cannot be verified from bytecode.
  • [medium] Pausable swaps: setPaused and a paused() view indicate the owner can halt hook-driven swaps.
  • [high] Owner withdrawal of held funds: withdraw, withdrawAll and claimFees functions move currency balances held by the hook to addresses chosen by privileged callers.
  • [medium] Return-delta token custody: The hook uses return deltas and a take/record callback path, so it can hold and move tokens from swaps and liquidity operations.
  • [info] Two-step ownership: Ownership transfer is two-step and a revokeOwner function exists, which reduces accidental loss of control but leaves the admin key as a single point of trust.

Contract details

Verified source
No
Bytecode size
22,162 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, pausable, return-delta, self-unlock

Pools using Dynamic fee hook