Fee sharing hook on Base

Uniswap v4 Hook Contract 0xf74777488b99c95a21a75fe85b1de1ccc2c8a8c4 on Base · Fee sharing

Volume (24h)
$262
Value locked (TVL)
$4.56
All-time volume
$262
Pools using this hook
1
Swaps (24h)
72 (18 traders)
Total swaps
72

What it does

A Uniswap v4 hook that charges a configurable tax on swaps, accrues it inside the hook, and gates liquidity additions to whitelisted or allowlisted addresses.

How it works step by step

  • Applies a tax in basis points (taxBps) to swaps
  • Accrues tax per address and tracks it against a threshold (taxThreshold)
  • Restricts liquidity additions through a whitelist and allowlist
  • Uses afterSwapReturnDelta to take part of swap output as tax
  • Exposes owner-only setters for tax rate, threshold and access lists
Swap behaviour
beforeSwap and afterSwap run on every swap; afterSwapReturnDelta lets the hook take a tax share of the output, which accrues per address.
Liquidity behaviour
beforeAddLiquidity is implemented and gated by the whitelist or allowlist; afterRemoveLiquidity and afterAddLiquidity are present. beforeRemoveLiquidity is decoded but its effect is unclear.
Fee behaviour
A tax in basis points (taxBps, stored in slot 2 as uint24) is applied to swaps and accrued per address (accruedTax). Taxed amounts are denominated in taxCurrency and are claimed or moved by the hook; the exact fee flow could not be fully confirmed without source.
Owner & admin controls
Owner (Ownable) can set the tax threshold via setTaxThreshold, set tax bps via the uint24 setter (selector 0x47ee6680), manage the whitelist via setWhitelist, set the allowlist address via setAllowlist, transfer or renounce ownership, and call the 0x95190b6b and 0xe2f30cb8 setters whose names are unknown. No pause function identified.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta

beforeInitialize validates pool setup; beforeAddLiquidity restricts who may add liquidity; beforeSwap and afterSwap implement the tax logic and tax accounting; afterSwapReturnDelta lets the hook take a portion of the swap output, which is the mechanism for skimming tax.

Security & trust assessment

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

Who controls it: The owner can change the tax rate and threshold, alter the whitelist or allowlist (possibly blocking or allowing particular addresses from adding liquidity), and transfer ownership. A malicious or compromised owner could raise the tax sharply or redirect accounting.

Risk to user funds: The hook takes a share of swap output through return deltas and accrues tax balances it can later move or claim. It can also block liquidity additions for non-whitelisted addresses. The exact custody and withdrawal path could not be fully traced from decoded bytecode.

Security findings

  • [medium] Hook skims swap output: afterSwapReturnDelta is enabled, so the hook takes a share of swap output and the tax amount depends on owner-set taxBps.
  • [medium] Owner-adjustable tax rate: The owner can change taxBps and taxThreshold at any time, with no visible cap in the decoded logic, which could set a punitive tax on swappers.
  • [low] Owner-controlled liquidity gating: Whitelist and allowlist contracts control which addresses may add liquidity, so the owner can censor LPs.
  • [info] Single owner key: Ownable with renounceOwnership and transferOwnership; no timelock is visible.

Contract details

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

Pools using Fee sharing hook