Token hook on Ethereum

Uniswap v4 Hook Contract 0xd63ddeb80e1f0c0c4cb152f97e921ee4a9870088 on Ethereum · Token

Volume (24h)
$7.86
Value locked (TVL)
$0
All-time volume
$7.86
Pools using this hook
1
Swaps (24h)
6 (2 traders)
Total swaps
6

What it does

This hook taxes swaps of the launch token at separate buy and sell rates, with the tax sent to an owner-set receiver, so buys and sells pay different amounts and the owner can change those rates.

How it works step by step

  • Implements a launch-token tax hook for a pool that pairs LAUNCH_TOKEN with a currency, detected via TOKEN_IS_CURRENCY0 and NATIVE_ETH views
  • Charges a buy tax and a sell tax (buyTaxBps, sellTaxBps) in beforeSwap, taking the tax through return deltas and moving currency to a tax receiver via take
  • Stores a dynamic LP fee (lpFeeBps) that the owner can change via setLpFee, capped by MAX_LP_FEE_BPS
  • Caps individual taxes at MAX_TAX_BPS, with the owner able to adjust them through setBuyTax and setSellTax
  • Routes collected tax to a configurable tax receiver set with setTaxReceiver
  • Uses two-step ownership (transferOwnership, acceptOwnership, pendingOwner) with an owner-gated admin surface
Swap behaviour
On each swap beforeSwap applies buyTaxBps or sellTaxBps depending on swap direction relative to the launch token, takes the tax amount via a return delta and sends it to the tax receiver. Buys and sells therefore pay different tax rates; which one is higher cannot be determined from the decoded bytecode alone.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Tax is taken on swaps as a return-delta amount controlled by buyTaxBps and sellTaxBps. The pool LP fee is set through lpFeeBps, changed by the owner with setLpFee within MAX_LP_FEE_BPS.
Owner & admin controls
Owner can call setBuyTax, setSellTax, setLpFee and setTaxReceiver, and can transfer or renounce ownership through the two-step flow. No pause or upgrade mechanism was observed in the selectors.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap is enabled to apply the tax and LP fee logic on each swap; beforeSwapReturnDelta is enabled so the hook can take a portion of the swap amount as tax.

Security & trust assessment

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

Who controls it: A single owner key can set buy and sell tax up to the cap, change the LP fee, and reroute all tax proceeds, which means it can make trading arbitrarily expensive within those caps or divert fees.

Risk to user funds: The hook takes a portion of each swap via return deltas and sends it through take() to the tax receiver, so swap amounts are directly moved by the hook; it does not appear to hold a persistent balance beyond that flow.

Security findings

  • [high] Owner-adjustable swap tax: setBuyTax and setSellTax let the owner change taxes on swaps up to MAX_TAX_BPS, so trades can be taxed heavily and the rate changed after users commit to a swap.
  • [medium] Owner-controlled tax receiver: setTaxReceiver lets the owner redirect all collected tax currency to any address.
  • [medium] Owner-adjustable LP fee: setLpFee can change the pool fee up to MAX_LP_FEE_BPS, altering swap cost for traders and LPs.
  • [info] Return-delta currency movement: The hook takes currency through beforeSwap return deltas and take(), so it can hold or move a portion of swap funds.
  • [info] Possible storage collision in slot 2: Slot 2 packs the tax receiver address and three uint24 values, and several selectors read and write it, so the layout should be checked against source.

Contract details

Verified source
No
Bytecode size
3,007 bytes
Upgradeable proxy
No
Detected patterns
launchpad, moves-currency, ownable, return-delta, tax

Pools using Token hook