Likely fee sharing hook on BNB Chain

Uniswap v4 Hook Contract 0x9eae5b531300e6ddb30f03a2849a39f5586fc5c7 on BNB Chain · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$314.62K
Pools using this hook
7
Swaps (24h)
0 (0 traders)
Total swaps
2,772

What it does

A Uniswap v4 fee and revenue-sharing hook on BNB Chain that adjusts swap fees per pool and splits collected fees between the protocol owner, pool creator and liquidity providers.

How it works step by step

  • beforeSwap sets a dynamic fee per pool using default tiers, per-address overrides and gas-based thresholds
  • afterSwap increments per-pool swap counts and can take a fee share as a hook delta
  • Fees are split between owner (ownerBps), creator (creatorBps) and the remainder to LPs
  • afterAddLiquidity and afterRemoveLiquidity return deltas to account for a share of liquidity flows
  • Trusted routers and trusted origins are whitelisted, with optional whitelist-only mode
  • Owner can pause the hook and withdraw tokens held by the contract
Swap behaviour
beforeSwap applies a dynamic or overridden fee for the pool, and afterSwap records swap activity and can take a share of the swap through a return delta.
Liquidity behaviour
afterAddLiquidity and afterRemoveLiquidity callbacks run with return-delta flags, so the hook can adjust balance deltas after liquidity changes and may take or credit tokens as part of that accounting. beforeAddLiquidity and beforeRemoveLiquidity views are present but the enabled permission set only includes the after variants.
Fee behaviour
Fees are set dynamically per pool: a default fee with tiered fee values (tierOne, tierTwo, tierThree), per-address fee overrides, and gas-based thresholds. Protocol revenue is split between owner (ownerBps) and creator (creatorBps) shares, with the remainder going to LPs; a feeRecipient receives fees. Exact fee formulas cannot be fully confirmed without source.
Owner & admin controls
Owner (slot 0) can pause or unpause via setPaused, toggle whitelistOnly, add or remove trusted routers and trusted origins, set per-pool fee overrides (setFeeOverride, clearFeeOverride), set default fee tiers and gas threshold (65a08c0e), set ownerBps and creatorBps revenue splits, change feeRecipient and exemptAddress, withdraw tokens (withdraw), set a deadline-like uint64 (dc161fa9), and transfer ownership. Ownership transfer is a single-step function.

Enabled Uniswap v4 callbacks

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

afterAddLiquidity and afterRemoveLiquidity use return deltas to take or account a share of liquidity flows; beforeSwap sets dynamic fee and overrides per pool; afterSwap and afterSwapReturnDelta record swap counts (swapCount mapping) and can take a share of swap output as a hook delta; afterInitialize and beforeInitialize are present as views only; beforeDonate and afterDonate are view-only stubs.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, medium confidence).

Who controls it: The owner key controls pausing, fee levels, fee overrides, revenue split percentages, trusted router whitelist, token withdrawals and ownership transfer. A malicious or compromised owner could set fees high, redirect the fee recipient, drain tokens through withdraw, or pause swaps indefinitely.

Risk to user funds: The hook can hold tokens (via take and return deltas), owner can withdraw those balances, and pausing can block swaps. Users trading through trusted routers pay fees whose levels are owner-adjustable; the hook does not appear to permanently lock user principal.

Security findings

  • [high] Owner withdrawal of hook-held tokens: Owner can call withdraw(address,address,uint256) to move ERC20 tokens held by the hook, which may include accumulated fees or delta-taken balances.
  • [medium] Owner-controlled fee overrides: Owner can set per-pool fee overrides and default tiers through setFeeOverride and the fee configuration setter, allowing fees to be raised substantially for targeted pools.
  • [medium] Pausable by owner: Owner can pause the hook via setPaused, which can block swaps and liquidity operations depending on the paused checks.
  • [medium] Return-delta fee capture: Hook returns deltas from after-swap and liquidity callbacks, meaning it takes a portion of user flows as part of settlement; the take() selector suggests it moves currency through the pool manager.
  • [info] Single-step ownership and no timelock: Ownership transfer is single-step and the owner setters have no timelock, so key compromise gives immediate control.

Contract details

Verified source
No
Bytecode size
14,185 bytes
Upgradeable proxy
No
Detected patterns
erc20, moves-currency, ownable, pausable, return-delta

Pools using Likely fee sharing hook