Fee sharing hook on BNB Chain

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

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$297
Pools using this hook
3
Swaps (24h)
0 (0 traders)
Total swaps
251

What it does

A Uniswap v4 hook that takes a configurable fee on swaps, accrues it inside the hook, and lets an owner-designated recipient withdraw it.

How it works step by step

  • Captures a percentage fee on swap output in afterSwap using a return delta
  • Accrues fees per currency in hook-held ERC-6909 claims tracked by feesAccrued
  • Lets the owner set feeBps, bounded by MAX_FEE_BPS
  • Lets the owner or fee recipient withdraw accrued fees with withdrawFees
  • Is an upgradeable proxy whose owner can replace the implementation
Swap behaviour
After each swap, the hook takes a fee (feeBps, capped by MAX_FEE_BPS) through afterSwapReturnDelta and records it in feesAccrued for the relevant currency.
Liquidity behaviour
Liquidity callbacks beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are exposed but appear to be pass-through; no liquidity-specific accounting was identified from decoded bytecode.
Fee behaviour
A configurable fee in basis points (feeBps, capped by MAX_FEE_BPS) is taken from afterSwap via afterSwapReturnDelta and accrued per currency in feesAccrued; accrued fees are withdrawable by the owner or a designated recipient via withdrawFees.
Owner & admin controls
Owner (ownable) can call setFeeBps (fee, bounded by MAX_FEE_BPS), setFeeRecipient, withdrawFees for a given currency and amount, transferOwnership, and upgradeToAndCall to replace the implementation behind the proxy. Owner is stored in an ERC-1967-style slot, so upgrades are possible at any time.

Enabled Uniswap v4 callbacks

afterSwap, afterSwapReturnDelta

afterSwap: takes a fee from swap output after the swap, adjusting the swap via a return delta. afterSwapReturnDelta: allows the hook to return a delta that changes the amounts settled by the pool manager, which is how the fee is captured.

Security & trust assessment

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

Who controls it: The owner can raise the fee up to MAX_FEE_BPS on every swap, redirect fee accrual by changing the fee recipient, withdraw accrued fees, and upgrade the implementation to arbitrary logic that could alter swap settlement or move funds.

Risk to user funds: The hook holds fee balances in ERC-6909 claims and can take currency during afterSwap. The owner can withdraw accrued fees and, through upgrades, potentially move or block any funds the hook touches. Exact bounds are not verifiable without source.

Security findings

  • [high] Upgradeable proxy controlled by owner: The hook is an upgradeable proxy (upgradeToAndCall) controlled by a single owner, so the implementation, including fee logic and fund-moving code, can be replaced without user consent.
  • [medium] Hook custodies and withdraws swap fees: The hook uses afterSwapReturnDelta, so it settles currency deltas with the pool manager on each swap; its accrued balances are custodied by the hook and withdrawable by the owner.
  • [medium] Adjustable fee up to a configurable cap: setFeeBps is owner-controlled up to MAX_FEE_BPS; a high fee would extract most of each swap's output from traders.
  • [info] Uses ERC-6909 claims and self-unlock: The bytecode references take, mint, burn and unlock calls, which indicates the hook interacts with ERC-6909 claims and the pool manager's unlock flow.

Contract details

Verified source
No
Bytecode size
212 bytes
Upgradeable proxy
Yes
Detected patterns
dynamic-fee, erc6909-claims, fee-sharing, moves-currency, ownable, return-delta, self-unlock, upgradeable

Pools using Fee sharing hook