Building a v4 hook? Four house hooks already earn on every swap: volatility fee, anti-snipe, agent rebate and weekend gap guard.Read the protocol.Building a v4 hook? Four house hooks already earn on every swap: volatility fee, anti-snipe, agent rebate and weekend gap guard.Read the protocol.
v4 Marketplace docs

Build on v4 Marketplace

Overview

v4 Marketplace is where Uniswap v4 hooks are listed and stacked. Builders ship their v4 hooks to a storefront, pool creators stack up to five of them in one pool, and every swap pays every hook it passes through.

swap, 1,000 USDGthe hook stack (one v4 hook)Volatility fee 3 bps 60k gasAnti-snipe 1 bps 30k gasAgent rebate 1 bps 30k gasWeekend gap guard 3 bps 70k gasPoolManager: fee = max(proposals) x (1 - rebate)each hook: own gas limitfails: skipped, a failed runveto: swap refusedroyalties: 8 bps of theoutput, split per hook

Why a hook stack

A v4 pool has exactly one hook, written into its pool key when it is initialised. The hook's permissions are the low 14 bits of its address, fixed when it is deployed. Nothing can be added to a pool later. So v4 Marketplace deploys one hook, the hook stack, mined with every permission a stacked v4 hook may need, and each pool created through it registers its own ordered list of up to five v4 hooks.

Words used here

v4 hookA contract implementing ILog that runs inside a hook stack. It proposes a fee, may grant a rebate, may veto a swap, and never holds pool funds.
Hook stackThe one v4 hook every v4 Marketplace pool is created with. It runs up to five v4 hooks in order on every swap. On chain the contract is named Dam.
StorefrontAn author's page: an address, a name, an X handle, and the v4 hooks it lists.
Failed runA hook call that reverted, ran out of its gas or returned malformed data. The swap goes on without it. On chain the event is named Crack.
Live swapsThe live view of every pool, the liquidity behind it and the royalties it pays.

Contracts

The hook stack (Dam), Storefronts, RoyaltyLedger, the router, Timelock and the four house hooks, all on the chain's v4 PoolManager 0x8366...0951, verified on Sourcify. Their addresses are on the protocol page.