Launchpad hook on Ink
Uniswap v4 Hook Contract 0xa51fb1ca37919bdff493e15a06598b19d0feeacc on Ink · Launchpad
- Volume (24h)
- $234
- Value locked (TVL)
- $1.12
- All-time volume
- $234
- Pools using this hook
- 1
- Swaps (24h)
- 2 (1 traders)
- Total swaps
- 2
What it does
A launchpad-style tax hook that charges per-pool buy and sell taxes on swaps, capped by an unverified maximum, and lets the factory/recipient claim the collected taxes.
This read was written for the hook 0x6652…eacc on Ink and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Registers pools created through a factory and stores a separate buy tax and sell tax for each pool.
- Takes a tax on swaps using swap return deltas and keeps a running balance of tax owed per pool.
- Lets a recipient withdraw accrued taxes later through a claim function.
- Checks liquidity adds and removals against pool registration; the exact conditions are not visible without source.
- Swap behaviour
- On registered pools the hook charges a buy or sell tax on each swap by adjusting swap amounts, and adds the amount to a per-pool tax balance. A hard-coded maximum tax constant exists and an InvalidTax error is enforced, but the exact cap value cannot be read from bytecode alone.
- Liquidity behaviour
- The hook runs before liquidity is added or removed and reads the factory address and pool registration, so it could revert withdrawals in some cases. No liquidity return deltas are enabled, so it cannot take a cut of LP principal.
- Fee behaviour
- Separate buy and sell tax rates in basis points are set per pool at registration, bounded by a MAX_TAX_BPS constant of unknown value. Taxes accrue to the hook and are withdrawn to an address via a claim function.
- Owner & admin controls
- A deployer can set the factory address once or repeatedly via setFactory; the factory registers pools with their buy and sell tax rates, capped by MAX_TAX_BPS. The factory or a privileged caller can claim accrued taxes.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: only allows registered pools; beforeAddLiquidity: checks pool/factory before deposits; beforeRemoveLiquidity: checks before withdrawals; beforeSwap and afterSwap: compute and record tax; beforeSwapReturnDelta and afterSwapReturnDelta: deduct the tax from swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The deployer controls the factory address, and the factory sets per-pool tax rates within the hard-coded maximum and claims accrued taxes.
Risk to user funds: The hook can deduct a buy or sell tax from swaps up to an unknown hard-coded maximum and holds accrued taxes for claiming. LP principal cannot be taxed, but whether withdrawals can ever be blocked is unconfirmed.
Security findings
- [medium] Swap tax via return deltas: Swaps pay a configurable buy/sell tax capped by an on-chain constant whose value is not verifiable from bytecode.
- [medium] Withdrawal check exists: beforeRemoveLiquidity reads the factory address and could revert removals under conditions that cannot be confirmed without source.
- [info] Not upgradeable: The contract is not a proxy, so code cannot be swapped.
Contract details
- Verified source
- No
- Bytecode size
- 5,189 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta, self-unlock
Pools using Launchpad hook
- ETH / NS (1.00% fee) — 24h volume $234, TVL $1.12, 2 swaps today