Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xf6486e81adf343739edf6c000ad78faef0ddc088 on Ethereum · Fee sharing

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

What it does

A Uniswap v4 hook that charges a basis-point fee on swaps, accumulates it, and lets the owner withdraw collected fees and toggle swaps.

How it works step by step

  • Charges a fee on swaps in beforeSwap using a return delta
  • Accumulates fee balances per pool (feeBalance)
  • Allows the owner to toggle swaps on or off (setSwapsEnabled)
  • Allows the owner to withdraw accumulated fees (withdrawFees)
  • Stores an executor address set by the owner and tracks a V4 pool fee and a WETH/native ETH reference
Swap behaviour
beforeSwap is non-view and returns a delta, so each swap is charged a hook fee and can be blocked when swapsEnabled is false; afterSwap is present as a view.
Liquidity behaviour
Liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are present but appear to be pass-through views with no state changes.
Fee behaviour
A hook fee is defined by HOOK_FEE_BPS (basis points over BPS_DENOMINATOR) and accumulated per pool into feeBalance; the fee is intended to be taken on swaps via beforeSwap with return delta, and collected fees are withdrawable by the owner.
Owner & admin controls
Owner (0x8da5cb5b) can transfer ownership (transferOwnership), set the executor (setExecutor), toggle swaps on/off (setSwapsEnabled), and withdraw accumulated fees (withdrawFees). Owner is stored in slot 0 and executor in slot 1; no upgrade or proxy functions were found.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: charges a fee on swaps by taking a share of the swap via a return delta. beforeSwapReturnDelta: allows beforeSwap to return a delta that adjusts the amounts settled for the swap.

Security & trust assessment

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

Who controls it: The owner can disable swaps for all users through setSwapsEnabled, withdraw any accumulated fee balances, and change the executor address that is privileged in the swap flow. A compromised owner key could halt trading or drain fees.

Risk to user funds: The hook takes its fee through a return delta on swaps and holds accumulated fee balances per pool, which the owner can withdraw. Swaps can be halted, so user trades through this hook depend on owner and executor behavior.

Security findings

  • [medium] Swap blocking and return-delta fee: beforeSwap returns a delta, so the hook alters the amounts settled between the pool and the trader; swaps can be blocked when swapsEnabled is false.
  • [medium] Owner can pause swaps and withdraw fees: The owner can call setSwapsEnabled(false) to halt all swaps through this hook, and withdrawFees to move collected fee balances.
  • [medium] Privileged executor role: The executor address is set by the owner and has privileged roles in the swap path that cannot be verified without source.
  • [info] Unverified source: Source is unverified, so the exact fee arithmetic, the executor's permissions and whether the hook can take more than the advertised fee could not be confirmed.

Contract details

Verified source
No
Bytecode size
6,638 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, return-delta

Pools using Fee sharing hook