Token hook on Arc
Uniswap v4 Hook Contract 0x0f9222bfb9868e9289a09068c61521f049ab40cc on Arc · Token
- Volume (24h)
- $1.94
- Value locked (TVL)
- $0
- All-time volume
- $1.94
- Pools using this hook
- 1
- Swaps (24h)
- 2 (1 traders)
- Total swaps
- 2
What it does
This hook charges a buy tax and a separate sell tax on swaps, takes the tax out of the swap through return deltas and accrues it for a tax recipient, so traders pay the configured rate in whichever direction is taxed.
How it works step by step
- Charges a buy tax and a sell tax on swaps, expressed in basis points and readable through buyTaxBps() and sellTaxBps(), capped by MAX_TAX_BPS().
- Routes the collected tax to a recipient address exposed via taxRecipient() and tracks an accrued fee balance readable through accruedFees().
- Uses return deltas in beforeSwap and afterSwap to take the tax out of the swap amount before it settles, and moves currency through the pool manager via take() and unlock/unlockCallback.
- Provides a claim() function that lets the accrued tax be withdrawn, which calls an ERC20 transfer on the token (quoteToken() and token() are exposed).
- Swap behaviour
- beforeSwap and afterSwap run on every swap and can take a tax from the swap amount through return deltas; buy and sell directions are taxed at separate rates (buyTaxBps and sellTaxBps), so one direction may pay more than the other depending on configured values which cannot be read from bytecode alone.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are present but appear to be pass-through checks that do not alter liquidity amounts.
- Fee behaviour
- A tax in basis points is charged on swaps and accrues to the hook; the pool's own static fee is separate. Tax rates are capped by MAX_TAX_BPS.
- Owner & admin controls
- taxRecipient and tax rate parameters are stored; the bytecode does not show a clear owner-only setter, so whether rates or recipient can be changed by an admin is not confirmed from the input.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap and afterSwap are used to read swap parameters and apply the tax; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a portion of the swap currency as tax.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, medium confidence).
Who controls it: A privileged key, if one exists, could alter tax rates within the cap or redirect tax to a different recipient, affecting every swap in the pool.
Risk to user funds: The hook takes a share of swap currency through return deltas and holds accrued tax until claim() moves it out, so user swap proceeds pass through the hook contract.
Security findings
- [high] Hook takes currency via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled, so the hook removes part of every swap's currency and holds it, moving user funds into the hook.
- [medium] Tax rate configuration: buyTaxBps and sellTaxBps are storage-backed values; if they can be changed by a privileged key, that key could raise taxes up to MAX_TAX_BPS on existing pools.
- [medium] Accrued fees withdrawal: claim() transfers accrued tax tokens out of the hook; the access rules for claim() and the recipient were not visible in decoded bytecode and should be checked.
- [info] Unverified source: No verified source is available, so the exact access control and rate-setting logic is inferred from selectors and storage only.
Contract details
- Verified source
- No
- Bytecode size
- 5,792 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, moves-currency, return-delta, self-unlock, tax
Pools using Token hook
- USDC / STONKSPAD (0.00% fee) — 24h volume $1.94, TVL $0, 2 swaps today