Fee sharing hook on Base

Uniswap v4 Hook Contract 0x8ac4ff9711f6a706fd6cb468716a39752902c044 on Base · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$8.26M
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
18,846

What it does

A fee-taking hook that runs after swaps, skimming a configurable fee from swap outputs and applying a sell-side tax threshold, with admin-set parameters.

How it works step by step

  • afterSwap runs after every swap on pools using this hook
  • afterSwapReturnDelta lets the hook take a portion of the output currency as a return delta
  • Hook fee (uint24) is stored and can be changed by setHookFee
  • A sell tax threshold (uint256) is stored and can be changed by setSellTaxThreshold
  • Uses take, mint and burn to settle the fee in ERC6909 claims on the pool manager
  • Whitelist checks suggest some addresses may be exempt from the fee
Swap behaviour
After each swap, afterSwap runs and, via afterSwapReturnDelta, the hook can take a share of the swap output currency as a fee, settling it through the pool manager.
Liquidity behaviour
Liquidity callbacks are present as view stubs (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) but the hook permissions do not enable them, so no liquidity logic is expected to run.
Fee behaviour
Hook fee is a uint24 stored in slot 0 (offset 20) and settable via setHookFee; a sell tax threshold is stored in slot 1 and settable via setSellTaxThreshold. The afterSwap path appears to take a fee-related amount using the swap delta, consistent with a hook-level fee or tax on swaps.
Owner & admin controls
setHookFee(uint24) and setSellTaxThreshold(uint256) are nonpayable setters that appear to be restricted to a stored address (storage slot 3, read by the setters and by 0x1d45c7ee), most likely an owner; the access check itself is not directly confirmed from the decoded bytecode. No pause or upgrade functions were identified.

Enabled Uniswap v4 callbacks

afterSwap, afterSwapReturnDelta

afterSwap is used to run custom logic after each swap, and afterSwapReturnDelta lets the hook take a share of the swap's output currency as a return delta; the bytecode also contains take, mint, burn and transfer selectors, indicating it moves currency and claims ERC6909 balances.

Security & trust assessment

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

Who controls it: A privileged key controlling setHookFee could raise the fee on swaps through this hook, and setSellTaxThreshold could alter the sell-side tax trigger, changing trader outcomes without notice.

Risk to user funds: The hook can take a portion of swap output via return delta and hold ERC6909 claim balances, so swap proceeds are directly affected by its fee logic; it does not appear to hold arbitrary user deposits or block withdrawals.

Security findings

  • [medium] Hook takes currency from swaps: The hook uses afterSwapReturnDelta and calls take, mint and burn, so it can extract value from swap outputs and hold claim balances on the pool manager.
  • [medium] Admin-settable hook fee with no confirmed cap: setHookFee accepts any uint24 value; without a visible cap in the decoded code, an admin could set a very high fee.
  • [low] Whitelist-based exemptions: isWhitelist and balanceOf selectors are referenced, suggesting some addresses may be exempt from fees or taxes, which can create unequal treatment between traders.
  • [info] Unverified access control: Access control on the setters and on the unlockCallback path could not be fully verified from decoded bytecode alone; no source is available.
  • [info] Self-unlock accounting: The hook calls unlock and implements unlockCallback, a self-unlock pattern that performs pool manager accounting inside the hook.

Contract details

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

Pools using Fee sharing hook