Fee sharing hook on Base

Uniswap v4 Hook Contract 0x5530ed7e80a97714aa9d7bd1c904ee3da6bf40cc on Base · Fee sharing

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

What it does

A Uniswap v4 hook that charges a configurable tax on swaps, accrues it and routes it to a designated recipient.

How it works step by step

  • Charges a basis-point tax on swaps in beforeSwap, adjusting amounts via return delta
  • Finalises tax accounting in afterSwap
  • Accrues tax per address and exposes it through accruedTax
  • Forwards accumulated tax to a tax recipient once a threshold is met
  • Uses unlock and pool-manager settlement calls to move funds
  • Owner controls tax rate, recipient, currency and threshold
Swap behaviour
beforeSwap and afterSwap run on every swap; they apply a tax through return deltas and record accrued tax for the taxed currency.
Liquidity behaviour
beforeAddLiquidity, beforeRemoveLiquidity, afterAddLiquidity, afterRemoveLiquidity and donate hooks exist in the dispatch table but appear to be pass-through callbacks; no liquidity-level permission is enabled.
Fee behaviour
Hook takes a configurable tax (taxBps, stored as uint24) on swaps and accrues it per address (accruedTax); accrued tax is routed to a tax recipient once a threshold is reached.
Owner & admin controls
Owner (Ownable) can set the tax rate via 0x2f5f66e9(uint24), set tax recipient and currency via 0x3209b28f(address,address), set tax threshold via 0xa4decd1d(uint256), call 0xc8970142(address,uint256,address) and transfer or renounce ownership. Function names are not verified; these are inferred from selectors and storage writes.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap: charges tax and may adjust the swap via return delta. afterSwap: finalises tax accounting and may adjust the post-swap delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take or give currency that changes the swap amounts, so it can hold tokens during a swap.

Security & trust assessment

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

Who controls it: The owner can change the tax rate, tax recipient, tax currency and threshold at any time, and can transfer or renounce ownership. A high tax rate or a malicious recipient would directly reduce swap output for traders.

Risk to user funds: The hook can take tax from swap flows through return deltas and accrue it internally, so swap proceeds on pools using this hook are partially held by the contract until distributed. Without source, the exact accounting and whether the owner can withdraw accrued funds cannot be confirmed.

Security findings

  • [medium] Hook takes currency via return deltas: Permissions include beforeSwapReturnDelta and afterSwapReturnDelta, so the hook can take a share of each swap through deltas and holds currency during the swap.
  • [medium] Owner-adjustable tax rate: Owner can set the tax rate through a uint24 setter with no visible bound in the decoded function set, so swaps could be taxed heavily.
  • [medium] Self-unlock and claim minting: Hook uses unlockCallback and calls take, settle, sync and mint/burn selectors, meaning it can move pool-manager balances and mint ERC-6909 claims.
  • [info] Single owner key: Standard OpenZeppelin-style Ownable functions (transferOwnership, renounceOwnership) are present, giving a single privileged key.

Contract details

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

Pools using Fee sharing hook