Likely fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0x7a6189a1075000c68aa3c7614b19d6bbe57ba0c4 on Ethereum · Fee sharing

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

What it does

A Uniswap v4 hook that charges a dynamic fee within set bounds on swaps and routes a fixed share of that fee to a protocol treasury.

How it works step by step

  • Validates and records pool parameters in beforeInitialize
  • Computes a dynamic swap fee between minFeePips and maxFeePips in beforeSwap
  • Takes a protocol share of the swap in afterSwap via afterSwapReturnDelta
  • Holds protocol earnings as ERC-6909 claims using mint and burn
  • Lets the treasury collect accumulated balances through collect(address)
Swap behaviour
beforeSwap computes a dynamic fee, and afterSwap takes the protocol share of the swap through an after-swap return delta.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fees are computed dynamically within a bounded range between minFeePips and maxFeePips, with a protocol share in basis points sent to a treasury; totalFeePips is exposed as a view. The exact fee formula could not be reconstructed from the bytecode alone.
Owner & admin controls
No owner or pause selectors are dispatched; the contract exposes owner() as an external call target but no setter for owner, fees or treasury was decoded. Parameters (maturity, protocolShareBps, minFeePips, maxFeePips, treasury) are exposed as pure getters, suggesting they are immutable or constant.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, afterSwapReturnDelta

beforeInitialize validates or records pool setup; beforeSwap computes the dynamic fee for the swap; afterSwap applies an after-swap return delta, which lets the hook take a share of the swap output; afterSwapReturnDelta is what allows the hook to move currency from the swap.

Security & trust assessment

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

Who controls it: Limited visible privileged surface. The collect(address) function is nonpayable and its access control could not be confirmed from decoded bytecode; if it is callable by anyone it would be the main point to verify.

Risk to user funds: The hook can take a share of swap output through afterSwapReturnDelta and hold claim balances via ERC-6909 mint/burn, so user swap proceeds are partially routed to the protocol treasury. It does not appear able to block swaps from the decoded surface.

Security findings

  • [medium] Hook takes currency from swaps via return delta: The hook uses afterSwapReturnDelta and calls take, mint and burn, so it can claim a portion of swap output and hold ERC-6909 claim balances on behalf of the treasury.
  • [medium] Unverified access control on collect: collect(address) is a nonpayable entry point that appears to move accumulated protocol balances to a recipient. Without verified source, the access control on this function could not be confirmed.
  • [low] Self-unlock callback flow: The hook calls unlock and implements unlockCallback, meaning it re-enters the PoolManager to settle balances itself.
  • [info] Parameters appear fixed: Fee bounds and protocol share are exposed as constants or pure getters, which limits the risk of parameter changes after deployment.

Contract details

Verified source
No
Bytecode size
6,106 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, moves-currency, return-delta, self-unlock

Pools using Likely fee sharing hook