BarbedHooks
BarbedHooks guards a fair launch with a swap fee that decays every block and falls off on a fixed block. It can't tax transfers, and it can't change after deploy.
onlyno tax
sunseton a timer
What it is
BarbedHooks is two contracts. The token is a plain fixed-supply ERC-20 with nothing in its transfer path: no tax, no blacklist, no pause, no mint after deploy. Everything about the launch lives in a separate Uniswap V4 hook attached to the pool.
In V4 a hook is a contract the PoolManager calls during a swap. The Barbed Hook implements beforeSwap and overrides the pool's LP fee on every swap, reading the value from a fixed schedule. The pool is created with V4's dynamic-fee flag so the hook is allowed to set that fee.
The charge is the standard V4 LP fee that goes to liquidity providers. It is a pool parameter, not a transfer tax, so a holder can always exit. During the launch window they just pay more, and the extra lands with LPs rather than a wallet.
BHS-1 — the standard
The Barbed Hook Standard is a short set of invariants for a V4 hook whose only job is launch protection a holder can verify and that can't outlive its window. A compliant hook holds all six.
// elapsed = block − launchBlock window = guardBlocks fee(elapsed) = peakFee elapsed == 0 peakFee − (peakFee − baseFee) · elapsed/window 0 < elapsed < window baseFee elapsed >= window
A V4 hook's permissions are encoded in its address. The PoolManager reads the low 14 bits to decide which callbacks to run, so a hook must live at an address whose low bits match its permission set. BarbedHook uses beforeInitialize, afterInitialize and beforeSwap — low bits 0x3080. The tool below mines a CREATE2 salt until the address matches, then deploys through a deterministic factory.
Contracts
The token source, on the page. Addresses fill in once each contract is deployed and set in the page config.
— set TOKEN.address
deploy below, per launch
● BarbedHook.sol — show sourceexpand
Create your own hook
Deploy your own BarbedHook with your own schedule. The contract enforces every BHS-1 rule no matter what you pick: the fee is capped, it decays, and it sunsets. No tokens are deployed here — hooks only.
Advanced · paste hook creation bytecode
Hook deployed. Next:
- Initialize a V4 pool with
fee = 0x800000(dynamic) andhooks =your hook address. - Add liquidity. The schedule arms at init.
- The barb releases automatically at
launchBlock + guardBlocks.