Fee sharing hook on Base

Uniswap v4 Hook Contract 0x36666f28213dc0a07ab7d5c8ea4da13cd1fe4044 on Base · Fee sharing

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

What it does

A swap-tax hook that takes a configurable fee or sell tax on trades through an after-swap return delta, with a whitelist that may exempt some addresses.

How it works step by step

  • afterSwap runs after every swap and returns a delta that lets the hook take a portion of the swap output
  • setHookFee(uint24) sets the fee rate applied to swaps
  • setSellTaxThreshold(uint256) sets a threshold used by the sell tax logic
  • unlockCallback re-enters the PoolManager to settle the taken currency using take, mint and burn
  • isWhitelist(address) checks whether an address is exempt from the tax
  • getHookPermissions reports that only afterSwap and afterSwapReturnDelta are enabled
Swap behaviour
afterSwap runs after each swap, computes a fee or tax from the configured hook fee and sell tax threshold, and takes that amount from the pool through the PoolManager as a return delta.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
The hook exposes setHookFee(uint24) and setSellTaxThreshold(uint256), and afterSwap takes a return delta, so it appears to charge a hook fee or sell tax on swaps and send part of the value out; exact fee formula is not recoverable without source.
Owner & admin controls
Selectors setSellTaxThreshold(uint256) and setHookFee(uint24) are nonpayable and write storage slots 1 and 0 (offset 20); the access control check cannot be confirmed from bytecode alone, but an address-typed slot 3 is read by setters and the transfer/isWhitelist selectors suggest an owner or whitelist role can change fee and tax parameters.

Enabled Uniswap v4 callbacks

afterSwap, afterSwapReturnDelta

afterSwap is used to run post-swap accounting and tax logic; afterSwapReturnDelta lets the hook take a share of the swap output from the pool, using the poolManager take, mint and burn calls.

Security & trust assessment

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

Who controls it: A privileged key that can set the hook fee and sell tax threshold can change the cost of every swap, and if the whitelist or admin role can be reassigned it can exempt or target specific addresses.

Risk to user funds: The hook can take value out of swap outputs through return deltas and can mint or burn ERC6909 claims during unlockCallback, so it can affect trader proceeds; it does not appear to hold user LP principal directly, but this cannot be fully verified without source.

Security findings

  • [medium] Hook takes a share of swap output: afterSwapReturnDelta permission combined with take, mint and burn calls means the hook can withdraw value from swaps, so any increase in the configured fee directly reduces trader output.
  • [high] Fee setters may lack confirmed access control: setHookFee(uint24) and setSellTaxThreshold(uint256) are nonpayable setters that write hook state; no access control check could be verified from bytecode, so any caller may be able to change fees if the check is missing.
  • [medium] Whitelist can exempt addresses from tax: The contract calls isWhitelist(address) and reads an address stored in slot 3, which suggests a whitelist that can exempt some addresses from the tax.
  • [info] Self-unlock pattern: The contract stores a poolManager address and an unlockCallback entry point, meaning it enters the PoolManager unlock flow itself to move currency.

Contract details

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

Pools using Fee sharing hook