Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0x83bb0c7957117d7272c6e3812220f6a3b715c044 on Ethereum · Fee sharing

Volume (24h)
$21
Value locked (TVL)
$0
All-time volume
$21
Pools using this hook
1
Swaps (24h)
5 (1 traders)
Total swaps
5

What it does

This hook takes a fee from each swap's output after the trade settles and splits it between a treasury, liquidity providers and a referrer, while the owner can pause swaps or sweep collected balances.

How it works step by step

  • Enables only afterSwap and afterSwapReturnDelta permissions, so it takes a share of each swap's output as a hook return delta after the swap settles
  • Splits the captured amount between a treasury, an LP share and a referrer using the TREASURY_BPS, LP_BPS and REFERRER_BPS constants
  • Exposes a sweepToTreasury function that forwards accumulated balances to the treasury address
  • Contains a pause flag that can be toggled by the owner via setPaused
  • Exposes a stations mapping keyed by bytes32 and a uniswapV3SwapCallback, suggesting it also interacts with a Uniswap V3 pool for routing or flash-style swaps
  • Has ownership transfer functionality through transferOwnership, with the owner controlling pause and treasury sweep
Swap behaviour
After each swap, the hook's afterSwap callback runs and, through afterSwapReturnDelta, claims a fraction of the swap output to be split among treasury, LPs and referrer; the exact fee rate depends on the constants, which could not be read from the decoded bytecode.
Liquidity behaviour
Add and remove liquidity hooks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are present as selectors, but the permissions do not enable them, so they are not invoked by the pool manager; no liquidity callbacks are active.
Fee behaviour
Takes a return-delta fee on swaps after execution, split by TREASURY_BPS, LP_BPS and REFERRER_BPS; the pool's own static fee is applied separately by the pool.
Owner & admin controls
Owner can call setPaused to halt the hook, transferOwnership to hand over control, and sweepToTreasury to move accumulated balances to the treasury address. Treasury and split parameters appear to be constants rather than admin-settable, but this is not fully confirmed from bytecode.

Enabled Uniswap v4 callbacks

afterSwap, afterSwapReturnDelta

afterSwap is used to compute and record the swap-side fee after execution; afterSwapReturnDelta lets the hook take a share of the output token as a return delta, which is how the fee is collected.

Security & trust assessment

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

Who controls it: A single owner key controls pause, ownership transfer and treasury sweeps, so it can halt swaps and redirect accrued balances.

Risk to user funds: The hook can hold and move a share of swap output tokens via return deltas and sweeps, and can block swaps when paused, but it does not custody LP principal in the pool.

Security findings

  • [medium] Owner-controlled pause: setPaused toggles a stored boolean checked by the swap path, so the owner can block swaps through this hook while the pool continues to exist.
  • [medium] Return-delta fee capture: afterSwapReturnDelta lets the hook take part of each swap output, so the hook holds and redirects a portion of trader proceeds.
  • [low] Treasury sweep: sweepToTreasury moves hook-held balances to an address; if the treasury address or owner key is compromised, accumulated fees can be drained.
  • [info] Unverified source: No verified source is available, so constants, upgradeability and the exact fee math are inferred from decoded selectors only.

Contract details

Verified source
No
Bytecode size
15,758 bytes
Upgradeable proxy
No
Detected patterns
ownable, pausable, return-delta, tax

Pools using Fee sharing hook