
TARE
Measures what a Uniswap v4 hook really takes from your swap. 125,072 measurements, each replayable.
Demo
About
When you swap on Uniswap v4, a small program called a hook runs during your trade, and it can take a cut. Nobody publishes how much. Uniswap asks hooks to declare it through the HookSwap and HookFee events its own guide recommends. Across 1,559 hooks seen in 200,000 Base blocks, nine emit either one. The official registry describes 978 entries with 27 fields each, 19 of them booleans — and not one of the 27 is a quantity. Its schema does not merely omit a number, it forbids adding one. So TARE measures it. The obvious comparison is impossible: a v4 pool's identity — its PoolKey — contains the hook's address, so "the same pool without its hook" does not exist. TARE does not change the pool: it changes the hook. On a fork pinned to a block, anvil_setCode replaces the hook's bytecode with an inert 89-byte stub. The poolId, the liquidity, slot0 and the reserves stay byte-identical; the only thing that changed is the code that runs during the swap. Quote the same swap twice and the gap IS what the hook took. 125,072 measurements, 7,817 pools, 112 hooks, 8 sizes, both directions. Every row carries its block, its size, its direction, its label and a command that reproduces it. What could not be measured keeps its reason instead of a zero: 61,916 of those rows are not values, and we publish that too.
How it's made
The engine is Python. It pins an anvil fork of Base at block 50,614,000, quotes a swap through V4Quoter, rewrites the hook's bytecode with anvil_setCode to an inert 89-byte stub that satisfies Hooks.sol's return-data validation (96 bytes from beforeSwap, 64 otherwise, selector echoed), quotes the same swap again, and restores the bytecode. The gap is the take. A gate re-executes real swaps and checks the quote against the execution: 96.74 bps quoted, 96.74 bps executed, to the wei. The agent exposes fourteen named tools in three families — collection, analysis, action — and the rule it cannot get around is written into the tool descriptions themselves: it never states a number a tool did not return. Four of them are served over MCP to Claude Desktop, offline, reading the committed corpus from disk. Hedera carries the paid path: a fresh measurement costs 0.001 USDC over x402, settled through the Blocky402 facilitator on Hedera testnet and read back on the mirror node — a settlement is only counted if the mirror node returns it, never on our own word. The agent's identity is HCS-14, derived from six canonical fields so a caller recomputes it instead of trusting us, and the usage log is anchored on an HCS topic. Ledger secures what is irreversible. The signing key lives in the Key Ring (wallet-cli ring), and the guard's verdict is encoded as EIP-712 and rendered field by field on the device — you do not sign an opaque digest. Cancelling returns 4001 and no call goes out. The front end is React with no runtime backend: the whole corpus is column-encoded into 8.3 MB and shipped inside the page, so the site answers with zero network requests. A browser extension does the same offline, 12 kB of content script, and reads the Universal Router calldata three seconds before you sign. When a cheaper door exists it builds the replacement transaction and signs it through Permit2 (command list 0x0a10, PERMIT2_PERMIT then V4_SWAP) — and never broadcasts it. On 99.71% of corpus rows there is no cheaper door, and it says so rather than inventing one. 1,230 tests green across engine, API, MCP, guard, keyring and front end.