Token hook on Base
Uniswap v4 Hook Contract 0xad2d75a5945b2fab3beb97f13abd83a824afa0cc on Base · Token
- Volume (24h)
- $42.99K
- Value locked (TVL)
- $0
- All-time volume
- $42.99K
- Pools using this hook
- 1
- Swaps (24h)
- 214 (68 traders)
- Total swaps
- 214
What it does
A token tax hook that charges admin-adjustable buy and sell taxes, capped by an unverified limit, on swaps and sends them to a fee receiver, while LPs can withdraw freely.
How it works step by step
- Charges a buy tax and a sell tax on swaps of a specific token pool, with separate rates for buys and sells.
- Collects the tax from swaps and sends it to a fee receiver address; fees that cannot be sent right away are parked and settled later.
- Lets the owner or an operator change the buy and sell tax rates, subject to a hard-coded fee cap whose exact value is not visible from bytecode.
- Includes rescue functions that let admins recover ETH, tokens or NFTs sitting in the hook contract itself.
- Does not run on liquidity changes, so LPs can add and withdraw freely.
- Swap behaviour
- On each swap the hook takes a percentage of the swap amount as a buy or sell tax, using return deltas, and forwards it to the fee receiver. The exact tax rates are adjustable and could not be confirmed from bytecode.
- Liquidity behaviour
- No liquidity callbacks; LPs can add and withdraw freely.
- Fee behaviour
- Separate buy and sell taxes, stored as basis points, are deducted from swaps and paid to a configurable fee receiver. They are limited by a FEE_CAP constant whose exact value could not be read from the bytecode.
- Owner & admin controls
- The owner and operator can set the buy and sell tax rates, up to the fee cap. They can also change the fee receiver and operator, and rescue assets held by the hook.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: restricts or validates which pool can use the hook; beforeSwap: applies the tax on the swap input side; afterSwap: applies the tax on the output side and sends or parks the collected fees; beforeSwapReturnDelta/afterSwapReturnDelta: lets the hook deduct the tax from swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: An owner (with two-step ownership transfer) and an operator control the tax rates, the fee receiver and the rescue functions. The worst they can do is raise the taxes up to the unverified cap.
Risk to user funds: The hook can deduct the buy or sell tax from traders' swap amounts, up to the FEE_CAP, whose value is unknown. LP principal cannot be locked or taxed.
Security findings
- [medium] Adjustable swap taxes: Admins can change the buy and sell tax rates with setFees, bounded by a FEE_CAP constant. The cap value cannot be verified from bytecode.
- [low] Rescue functions: Admins can withdraw ETH, ERC20 tokens or NFTs held by the hook contract itself. Pool reserves sit in the PoolManager and are not reachable this way.
- [info] LP withdrawals unrestricted: The remove-liquidity callbacks are disabled, so the hook can never block or tax LP withdrawals.
Contract details
- Verified source
- No
- Bytecode size
- 6,138 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc20, moves-currency, ownable, return-delta, self-unlock
Pools using Token hook
- ETH / INTERPID (0.00% fee) — 24h volume $42.99K, TVL $0, 214 swaps today