Likely fee sharing hook on BNB Chain
Uniswap v4 Hook Contract 0xa2406b7d5253ab67a7094ea31cc9f492536205c7 on BNB Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- <$0.01
- All-time volume
- $1.18K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 27
What it does
A Uniswap v4 hook that applies tiered dynamic swap fees with per-pool overrides and splits collected fees between the owner, a creator and a fee recipient, with router whitelisting and a pause switch.
How it works step by step
- beforeSwap selects a dynamic LP fee from tier fees, a default fee, or a per-pool override and caps it at MAX_LP_FEE
- beforeSwap can block swaps when paused or when whitelistOnly is enabled and the router is not trusted
- afterSwap increments a per-pool swap counter and can take a share of swap output via return delta
- Collected fees are split between owner (ownerBps), creator (creatorBps) and the remainder
- afterAddLiquidity and afterRemoveLiquidity run hook logic and may return deltas
- Owner can manage trusted routers, origins and exempt addresses, and withdraw tokens the hook holds
- Swap behaviour
- beforeSwap computes and returns a dynamic fee (tiered defaults or per-pool overrides) and enforces trusted-router or whitelist gating; afterSwap records swap counts per pool and can return a balance delta for fee routing.
- Liquidity behaviour
- afterAddLiquidity and afterRemoveLiquidity run hook logic and return balance deltas (afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta are enabled), so the hook can take or give currency on liquidity changes. beforeAddLiquidity and beforeRemoveLiquidity selectors also exist in the dispatch table but the permissions bitmap does not enable them.
- Fee behaviour
- The hook overrides the swap fee in beforeSwap, choosing among tiered fees (tierOne, tierTwo, tierThree, default) with per-pool fee overrides, and gates access through a trusted-router or whitelist check. A portion of collected fees is split between the owner, creator and fee recipient according to ownerBps, creatorBps and a remainder, with a maximum LP fee cap (MAX_LP_FEE). Fee override flags are stored per pool.
- Owner & admin controls
- Owner (storage slot 0) can transfer ownership, pause and unpause the hook (setPaused), toggle whitelistOnly, set the owner, creator and fee-recipient BPS splits, set the fee recipient, add or remove trusted routers and origins in batches, set per-pool fee overrides and clear them, set an exempt address, and withdraw tokens held by the hook via withdraw(address,address,uint256). Owner is also the only party that can change the fee tier parameters through the setter at selector 0x65a08c0e.
Enabled Uniswap v4 callbacks
afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
afterAddLiquidity and afterRemoveLiquidity record or account for liquidity events and can return deltas; beforeSwap sets the dynamic fee and gates swaps by router/whitelist; afterSwap records swap activity and can return a delta to route a share of output to the fee split; afterSwapReturnDelta, afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta let the hook take currency from the pool's flows.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner key controls pausing, whitelisting, routing permissions, fee overrides, fee recipient and split percentages, and can withdraw any tokens the hook holds. A compromised owner can redirect fee revenue, pause trading, or drain balances held by the hook.
Risk to user funds: The hook uses return deltas on swaps and liquidity events and can move currency, and it can hold tokens for fee accrual. The owner can withdraw these balances and pause swaps, so user funds that pass through the hook are exposed to owner action.
Security findings
- [high] Owner withdrawal of hook-held tokens: The owner can call withdraw to transfer arbitrary tokens held by the contract to any address.
- [medium] Owner can change fee split and per-pool fees: The owner can change ownerBps, creatorBps and the fee recipient, and set per-pool fee overrides, altering the economics paid by traders and LPs.
- [medium] Owner can pause or restrict swaps: setPaused and setWhitelistOnly let the owner halt swaps or restrict them to trusted routers.
- [info] Single-step ownership transfer: Ownable2Step-like ownership transfer is a single call (transferOwnership), so a mistaken transfer cannot be recovered.
- [info] Unverified source: No verified source; behaviour is inferred from selectors and storage, so exact fee math and token-flow edge cases cannot be confirmed.
Contract details
- Verified source
- No
- Bytecode size
- 11,871 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, pausable, return-delta
Pools using Likely fee sharing hook
- USDT / 4Stock (0.00% fee) — 24h volume $0, TVL <$0.01, 0 swaps today