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

Rewards, routing and AI agents

Six programs that bring outside swaps to v4 Marketplace pools: hooked pools for Pons coins with a creator share, a best-price compare against Uniswap, $V4M rewards for LPs, a weekly $V4M bounty for the most used v4 hook, a fee rebate for AI agents and a replay simulator for hooks before they list.

Pons coin pools

A Pons coin keeps its Pons pool and the Pons hook. On Create a pool its creator, or anyone, pastes the coin or searches it by symbol and opens a second v4 pool against USDG, TSLA, NVDA or QQQ. The opening price is the Pons pool's price, times ETH/USDG from the ETH/USDG v4 pool, divided by the Chainlink feed for a stock pair. The stack is anti-snipe, volatility fee, agent rebate and the pool creator share. The wallet that signs owns the pool and pays its own gas; the second step adds full-range liquidity from the same wallet.

Pool creator share

pool creator share: 5 bps of each swap's output
1 bp burn reserve
3 bps pool creator, pool tokens
1 bp to $V4M LP rewards
royalty ledger
20% kept for burnBuy
creator vault
75% to the pool owner
creator vault
25% bought into $V4M

The pool creator share is a listed v4 hook with a 5 bps royalty and no fee opinion (it returns zero, so the pool's fee does not change). Its author is the CreatorVault contract. The royalty ledger keeps 20% for the $V4M burn as for every hook; of the 80% it credits the vault per pool, claimCreator(poolKey) pays 75% to the pool's owner in the pool's own tokens once the ledger's 7-day vesting has passed, and buyRewards(path, amountIn, minOut) turns the other 25% into $V4M for LP rewards along allowed pools, each hop capped at a 0.25% sqrt price move, once an hour. Both calls are permissionless. A pool owner can hand the pool to another wallet with setDamOwner; the share follows.

Uniswap routing and best price

The Uniswap Trading API serves Robinhood Chain and routes v2, v3, v4 and UniswapX there. It needs an API key; with UNISWAP_API_KEY set on the server, Best price asks it for the route of each pool's pair and shows whether any hop goes through the hook stack. The page never says a pool is routed unless the API returned such a route.

Without the key the compare still runs, on chain: the Uniswap v4 Quoter (0x8dc1...8f94) quotes the v4 Marketplace pool with every hook running, QuoterV2 (0x33e8...a9e7) quotes Uniswap's v3 pools of the pair at four fee tiers and the v4 Quoter its hookless v4 pools. One click swaps where the output is higher: the v4 Marketplace router for our pool, SwapRouter02 for a Uniswap v3 pool. The keeper keeps each house pool within 0.30% of its reference pool every hour.

LP rewards in $V4M

weekly payout   = 20% of the LP rewards balance not yet paid
pools           = v4 Marketplace pools stacking at least one listed v4 hook
split by pool   = the pool's swaps from outside wallets / all such swaps
split in a pool = liquidity x seconds of the position / the pool's total
funding         = 25% of the pool creator share royalty, bought into $V4M,
                  plus fund(0, amount) from any wallet
excluded        = the machine wallet and the house keeper

Liquidity comes from the PoolManager's ModifyLiquidity events of each pool: a router position belongs to the address in its salt, a position manager NFT to its owner. Weeks are unix weeks, the index the contract uses (block.timestamp / 1 weeks): Thursday 00:00 UTC to Wednesday 23:59 UTC. After a week closes the keeper posts a Merkle root of cumulative amounts per account with postRoot; it goes live 12 hours later, a window in which the owner can cancel a wrong root. claim(account, cumulative, proof) pays everything not yet claimed. The proof is served at /api/rewards/proof?account=0x... and by the MCP tool lp_rewards.

Hook of the week

hook A9 outside walletshook B6 outside walletshook C2 outside wallets, under the minimum of 3Thursday 00:00 UTC to Wednesday 23:59 UTC; keeper and machine wallet never count

Every week the listed v4 hook with the most distinct outside wallets that swapped through a pool stacking it wins the bounty pot: 50% of the bounty stream's balance not yet paid, in $V4M, to the hook's author. Outside means neither the machine wallet, nor the house keeper, nor the hook's own author. A hook needs at least 3 outside wallets; ties go to more swaps, then to the older hook. With no winner the pot rolls over. Hooks the protocol listed itself are shown in the race and never win. The pot is the rewards contract's stream 1: anyone can add to it with fund(1, amount). The result goes into the same weekly root as LP rewards.

AI agents

The agent rebate hook reads the chain's ERC-8004 identity registry (0x8004...a432, AgentIdentity). When tx.origin holds an agent identity the hook returns a 25% rebate and the hook stack takes 25% off the composed fee. It runs in every house pool and in every Pons coin pool opened from the site. An agent registers itself with register(agentURI) on the registry; the MCP tool register_agent returns the calldata. Then agent_status, quote_swap and swap cover the rest; the SDK has the same calls. See AI agents.

Hook simulator

The simulator takes a deployed hook address or creation bytecode and replays it on up to the last 1,000 swaps of a pool, read from the PoolManager's Swap events. One eth_call with state overrides puts a replay contract at the hook stack's address, so the hook sees the hook stack as its caller, and calls beforeSwap once per swap with the swap's real direction, amount and origin, at the hook's gas limit. The score: gas per swap (average, p95, max), the fee it would charge over the pool's base fee, failed calls, vetoes, and the extra cost on the output against no hook. The same replay is the MCP tool replay_hook, free, 8 runs per 10 minutes per address on the site.

Contracts

V4MRewards$V4M streams 0 (LP rewards) and 1 (hook of the week), weekly Merkle roots with a 12 hour delay, cumulative claims; the owner may withdraw only what no root has allocated.
CreatorVaultAuthor of the pool creator share hook. claimCreator, buyRewards, collect.
CreatorShareLogThe pool creator share v4 hook: no fee opinion, 5 bps royalty, 10,000 gas.
ReplayHarnessNever deployed: the simulator's eth_call override.

Each contract has unit tests and a fork test against the live hook stack, ledger, router, PoolManager and the ERC-8004 registry. Addresses appear on the protocol page once deployed.