SPCXUniswapV4Hook on Base
Uniswap v4 Hook Contract 0xd6cf37f4a3a1db14bd6b3199da04f88e297e60cc on Base · Token · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $23.50K
- All-time volume
- $257.84K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 949
What it does
A tax-taking hook for a single ETH/SPCX pool that charges buy and sell fees in ETH and burns a portion of the SPCX token, with a short 99% sniper-tax window after launch migration.
How it works step by step
- Enforces that only the ETH/SPCX pool keyed to this hook can be initialized and swapped.
- Charges a buy tax in ETH on exact-input buys, defaulting to 3% trader plus 1% insurance.
- Charges a sell tax in ETH on exact-output sells, defaulting to 3% trader plus 1% insurance.
- Burns 1% of SPCX on both buys and sells by transferring to a burn address.
- Applies a 99% buy tax for 5 blocks after the launch contract notifies migration.
- Lets the admin pause swaps and adjust taxes within caps.
- Swap behaviour
- On buys (ETH in, SPCX out), beforeSwap charges an ETH input tax of up to 5% split between trader and insurance wallets and burns 1% of the SPCX output in afterSwap; on sells (SPCX in, ETH out), afterSwap charges up to 5% ETH output tax split between trader and insurance and burns 1% of SPCX. Swaps revert when paused.
- Liquidity behaviour
- No liquidity callbacks. Liquidity add and remove hooks are no-ops and are not enabled in permissions.
- Fee behaviour
- Swap tax is levied in the hook: buys of the SPCX token charge up to 5% in ETH on the input side (currentBuyEthTaxBps, or 99% during sniper protection for 5 blocks after notifyMigration), split into trader and insurance shares; sells of SPCX charge up to 5% ETH on output (sellLongTaxBps plus insuranceTaxBps), and an additional 1% burn of the SPCX token on buys and sells, sent to a burn address. Default values: buy long 3%, sell long 3%, insurance 1%, burn 1%.
- Owner & admin controls
- Single admin (set at deploy, transferable via two-step transferAdmin/acceptAdmin) can setTaxes within caps (buy and sell totals capped at 5%), change traderWallet and insuranceWallet (zero address rejected), and pause/unpause the hook, which reverts beforeSwap and afterSwap. Not upgradeable: no proxy or upgrade function found.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool initialization to a fixed poolInitializer sender and to the single ETH/SPCX pool keyed to this hook. beforeSwap pauses-checks, validates the pool, takes the buy-side tax via poolManager.take and returns a before-swap delta to charge the tax. afterSwap pauses-checks, takes the sell-side ETH tax (or the buy-side burn) and returns the taken amount as an after-swap delta. beforeSwapReturnDelta and afterSwapReturnDelta allow these tax captures to be expressed as deltas against the swap.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The admin can raise taxes up to the 5% per-direction cap at any time, redirect the trader and insurance ETH to any address, and pause all swaps in this pool indefinitely. Admin changes take effect immediately for all traders.
Risk to user funds: The hook takes ETH and SPCX from swaps via poolManager.take and forwards ETH to the trader and insurance wallets during swap execution, and it can block all swaps through pause. Users do not hold funds inside the hook, but a paused or redirected hook can prevent trades or divert tax proceeds.
Security findings
- [high] Admin can freeze swaps: Pause blocks beforeSwap and afterSwap, so the admin can halt all trading of the SPCX/ETH pool; there is no time limit or unpause requirement beyond the admin key.
- [medium] Adjustable tax rates: setTaxes lets the admin set buy and sell taxes up to 5% combined with insurance and burn, changing the economic terms of every swap without user consent.
- [medium] Tax recipients controlled by admin: The hook sends ETH to traderWallet and insuranceWallet via low-level calls during swaps; these are mutable by the admin, so a malicious admin can redirect tax revenue.
- [medium] 99% buy tax during sniper window: Sniper protection sets buy tax to 99% for 5 blocks after notifyMigration, callable only by the launch contract; this is a very large short-term fee on buys.
- [info] Pool restricted to one pair: Swaps are limited to exact-input SPCX/ETH in this single pool, and the hook uses its own nonReentrant-style state guard for callbacks; no external token transfer hooks are involved.
Contract details
- Verified source
- Yes (SPCXUniswapV4Hook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 8,829 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, mev-protection, moves-currency, pausable, return-delta, tax
Pools using SPCXUniswapV4Hook
- ETH / bSPCX (0.10% fee) — 24h volume $0, TVL $23.50K, 0 swaps today