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.
- recipemodules and numbers, as JSON
- generateSolidity, line by line from the modules
- solc 0.8.26compiled on the site
- eth_simulateV1run on the live PoolManager
- 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
- 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.
- 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.
- Prove it. The source compiles with solc 0.8.26 and runs on the live chain in one
eth_simulateV1request, against the real PoolManager. The proof. - 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
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:
