← ALL WORK · CASE 02
GM SWAP
ERC-20 swaps through MetaMask — live rates and gas estimates before you sign, so the transaction you approve is the transaction you get.

SWAP STATE MACHINE — NOTHING GETS SIGNED BLIND
QUOTE STALE → MIN-OUT REVERT → WALLET UNTOUCHED — THE ONLY COST IS GAS
01 — WARP
What had to be true first
A quote is a promise the chain hasn't made yet. Before any interface existed we set the swap path: minimum-out enforced by the EVM on every call, exact-value ERC-20 approvals instead of unlimited allowances, and rates computed from pool reserves at the current block. There is no rate on screen the chain didn't produce, and nothing cached ahead of it.
02 — WEFT
What we wove through it
Onto that warp we shipped in weekly passes: MetaMask connection over EIP-1193, with chain switches and account changes handled rather than assumed; live rate previews that re-quote on every new block; gas estimation and EIP-1559 fee tiers before the signature prompt ever appears; and a tracker that follows each swap from mempool to confirmation — the same states the transaction walks.
03 — BEAT
How it was pressed tight
Every merge was beaten in: review on every path that moves value, fork tests against live chain state so tokens misbehave the way they actually misbehave, and rehearsals of the ugly cases — fee-on-transfer tokens, ERC-20s that return false instead of reverting, quotes going stale between preview and signature. The slippage check was fuzzed until it stopped being interesting.
04 — WEAR
Life in production
GM SWAP runs in production today. Swaps route unattended, quotes track the chain block by block, and nothing reaches a signature prompt without a rate and a gas figure attached. When price moves against a pending swap, minimum-out reverts it and the tokens never leave the wallet; the only cost is the gas. Worn daily, in public.
NEXT CASE — 03
HYPEMINT →