Likely fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0x99b974da0be7230a21d3588b76b7642cfe9ea0cc 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
0

What it does

This hook takes a fixed fee share on swaps through return deltas and routes it to a distributor as ERC-6909 claims, with no admin setters found, though whether buys or sells pay more could not be determined.

How it works step by step

  • Hook is initialized once in beforeInitialize, which sets a boolean flag in storage slot 0 so the pool can only be configured a single time
  • beforeSwap runs on every swap and reads the pool's fee configuration (LP_FEE, FEE_BPS) to compute the swap fee
  • beforeSwap uses return deltas (beforeSwapReturnDelta) so the hook can take a portion of the swap amount itself rather than leaving it entirely to the pool
  • afterSwap uses return deltas (afterSwapReturnDelta) to settle the hook's share after the swap completes
  • Fee amounts taken by the hook are minted as ERC-6909 claims through a mint call and recorded with recordFee, then routed toward the distributor contract
  • Exposes read-only getters for pairedCurrency, token, poolKey, distributor, poolManager, and the fee constants, so off-chain tools can read its configuration
Swap behaviour
On each swap, beforeSwap and afterSwap run and the hook can take a share of the swap amount through return deltas. The exact split between the trader and the hook is not recoverable from the decoded bytecode, so it is not stated here.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fees are computed from LP_FEE and FEE_BPS constants in the swap path and the hook takes a portion as an ERC-6909 claim, recorded via recordFee and passed to the distributor. Whether the fee is higher for buys or sells is not determinable from the bytecode.
Owner & admin controls
No owner or admin setter selectors were found in the dispatch table. Only read-only getters are exposed, so no parameter changes are visible from the bytecode.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize sets the initialized flag and validates the pool; beforeSwap computes and takes the fee share via return delta; afterSwap settles the remaining share via return delta; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to move part of the swap amount.

Security & trust assessment

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

Who controls it: No privileged setter was found, so a single key cannot change fees or pause swaps from the decoded functions. Distributor and token addresses are fixed constants or set at initialization, which could not be confirmed.

Risk to user funds: The hook can take part of each swap via return deltas and mints ERC-6909 claims for the fee share, so it does hold a portion of swap value momentarily and represents it as claims. Whether it can block swaps depends on checks not visible in the decoded code.

Security findings

  • [medium] Hook takes swap amounts via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta let the hook move part of each swap's currency, so the hook holds user value in transit and its accounting must be exact.
  • [low] Minting and fee recording: The hook calls mint and recordFee, so fee accounting and ERC-6909 claim issuance depend on correct internal logic that could not be verified from source.
  • [info] Unverified source: No verified source is available, so behaviour is inferred from decoded selectors and storage only.

Contract details

Verified source
No
Bytecode size
4,728 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, return-delta

Pools using Likely fee sharing hook