Building a v4 hook? Pick what it does, set the numbers, and deploy it as your own hook or stacked on v4 Marketplace. Open the builder ↗
v4 Builder docs
Build a v4 hook from modules

Overview

v4 Builder writes Uniswap v4 hooks from modules. You pick what the hook does and set its numbers; the site writes the Solidity, compiles it, runs it on the live chain's PoolManager, and you deploy it from your own wallet through the v4 Builder factory. No Solidity on your side.
  1. recipe
    modules and numbers, as JSON
  2. generate
    Solidity, line by line from the modules
  3. solc 0.8.26
    compiled on the site
  4. eth_simulateV1
    run on the live PoolManager
  5. factory.deploy()
    sent from your wallet
own v4 hook: BaseHook at a mined address. You open a pool with it.
stacked hook: ILog, called by the v4 Marketplace hook stack on every swap.
the recipe is written on chain in the factory's Built event

Four steps

  1. Pick the modules. Ten rules the builder knows how to write: anti-snipe fee, volatility fee, off-hours fee, cooldown, price guard, launch allowlist, holder rebate, AI agent rebate, swap tax and liquidity lock. Modules.
  2. Set the numbers. Each module has a few parameters with checked bounds. Each choice reads back as one plain sentence, and the same recipe always writes the same source. Recipes.
  3. Prove it. The source compiles with solc 0.8.26 and runs on the live chain in one eth_simulateV1 request, against the real PoolManager. The proof.
  4. Deploy from your wallet. The factory puts the code at its CREATE2 address, checks the callbacks against the address bits, and writes the recipe on chain. Deploying and fees.

Two targets

The same recipe builds two contracts. A v4 hook of its own is an OpenZeppelin BaseHook whose address is mined so its low 14 bits carry exactly the callbacks it uses; you open a pool with it. A stacked hook implements ILog and is called by the v4 Marketplace hook stack on every swap of the pools that stack it, next to up to four other hooks, and it earns a royalty per swap. Swap tax and liquidity lock exist only on a hook of its own, because a stacked hook never moves funds. Own hook or stacked hook.

Words used here

v4 hookA contract the Uniswap v4 PoolManager calls around a pool's actions. The low 14 bits of its address say which callbacks it has.
ModuleA rule the builder knows how to write, with its own numbers: a fee, a guard, a rebate, a cut of each swap, a lock.
RecipeThe JSON that names the modules and their numbers. The factory records it with every hook.
Own hookA BaseHook contract at a mined address. Pools opened with it run it on every swap.
Stacked hookAn ILog contract the v4 Marketplace hook stack calls on every swap of the pools that stack it.
Hook stackThe one v4 hook every v4 Marketplace pool is created with. It runs up to five stacked hooks in order. On chain it is named Dam.
ProofThe run of a recipe on the live chain inside one eth_simulateV1 request, before any deploy.
FactoryThe contract every v4 Builder hook is deployed through. Its Built event carries the recipe.
PipsThe fee unit of Uniswap v4: 1,000,000 pips are 100%, 3,000 pips are 0.30%.
Basis points10,000 basis points are 100%. Moves, cuts and royalties use them.

Hooks built

Every hook deployed through the factory is listed on the hooks page, read from the factory's events. Two of them, built from the example recipes and verified on Sourcify:

HookTargetAddress
Fair LaunchOwn v4 hook0xFA85Ff…121280 ↗
Stock HoursStacked on v4 Marketplace0x989822…678e17 ↗