BHS-1
$BARB contract not deployed
Uniswap V4 · launch-guard hook

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.

$BARB
Token contract
loading…
Ticker
BARB
Supply
1,000,000,000
Standard
BHS-1
Fee
only
no tax
Self
sunset
on a timer
01

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.

BarbedHooksERC-20 token
Fixed supply of 1,000,000,000 BARB, minted once at deploy. EIP-2612 permit. No owner, no mint path, no fee logic.
BarbedHookV4 hook · BHS-1
Attaches to the launch pool. Sets a decaying LP fee for a fixed block window, then leaves it at the base fee. Immutable, fee-only.
02

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.

1
Immutable
Every parameter is set in the constructor. No setters, no owner.
2
Sunset
Protection ends at a block fixed at deploy. After it, only the base fee applies, for good.
3
Monotonic
Inside the window the fee only decreases, block by block. It never climbs back.
4
Bounded
The peak fee is capped at 25% by the contract itself, checked at deploy.
5
Fee-only
The hook moves the LP fee and nothing else. It never reverts a swap, gates an address, or holds tokens.
6
Observable
The whole schedule is emitted on-chain at pool init, so anyone can confirm the sunset before trading.
Fig. 1 — fee schedulethe barb
LP fee per blockbase levelx · blocks since pool init
fee schedulehundredths of a bip · 1e6 = 100%
// 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.

03

Contracts

The token source, on the page. Addresses fill in once each contract is deployed and set in the page config.

BarbedHooks · token
— set TOKEN.address
BarbedHook · hook
deploy below, per launch
BarbedHooks.sol

      
BarbedHook.sol — show sourceexpand
BarbedHook.sol

        
04

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.

Schedule not connected
The canonical V4 PoolManager on Ethereum. Auto-filled; edit only if you know what you're doing.
= 10000
Applied after the window. Percent. 1 = 1%.
= 100000
In the launch block, then decays. Max 25%.
 
Length of protection, in blocks. ~12s/block on Ethereum.
Advanced · paste hook creation bytecode
Your schedulesunset +20
feebaseflags 0x3080
init code hash
salt
hook address
$ idle — connect a wallet, set a schedule, compute, deploy.
copied