In February 2022, the Wormhole bridge lost $320 million. Not to subtle cryptography — to a function that checked a signature on one account type and forgot to check it on another. Sixty-five lines of Rust. The contract worked. It just worked in a world that didn't exist.The expensive bugs aren't missing braces or integer overflows. They're representation gaps: the space between what the code believes and what the chain can prove. I wanted to know if a language model could see that gap — not in the abstract, I wanted a number.So I built a benchmark: ten real bridge exploits, ~$1.2 billion in historical losses, six classes of compositional vulnerability, a Foundry test suite that reproduces each one from source. Then I ran the tools.Static analyzers scored approximately 0%. An LLM scored 40%.This book is the investigation that produced those numbers — and a mechanistic answer to what lives in the other 60%.### What's inside202 pages. 23 chapters. 23 hands-on labs. Written as field notes, ordered as the investigation unfolded — it starts with a memecoin honeypot and ends with activation patching on GPT-2.Part I — Bridges, and the Art of Printing Money. The anatomy of real exploits, rebuilt and proven in Foundry: the honeypot with a freeze button, the index fund that held the wrong asset, the bridge that paid twice, the bridge that minted from nothing. How CoW Protocol actually settles trades, why an arb bot with no slippage check is somebody else's sandwich, and the EIP-712 bug I found (and fixed — the PR is merged in alloy-rs/core) along the way.Part II — Randomness, Proof, and the Limits of Verifiable. A fake dice game with no win condition. The full on-chain randomness landscape. Why a coin flip can be verifiable and still not trustless. What a ZK proof actually proves (and what it doesn't), ZK dark chess with real fog of war, FHE where ZK stops, and the post-quantum signature scheme that Shor breaks anyway — because of its wrapper.Part III — Machine Learning, Pointed at Hard Things. The benchmark itself: who audits the auditor, what active learning actually buys you, a model that asks when it can't explain what it sees — and the mechanistic-interpretability hunt for why the model reads "not" but can't use it. The answer has the same shape as the bridge bugs in Part I.### The labsEvery chapter ships with a lab: clone the repo, run the exploit, watch the invariant go red, then fix it and watch it go green. Real Foundry test suites against real bug classes — honeypot anatomy, lock-and-mint bridges, EIP-712 recursive types, on-chain randomness, ZK proof binding, post-quantum verification. If you only read one thing, read the contracts.### Who this is for- Solidity/DeFi developers who want to internalize how real exploits compose — not CTF puzzles, the actual mechanisms behind nine-figure losses- Auditors who want a falsifiable benchmark for what LLM tooling can and cannot catch today- ML engineers pointed at security problems, who want to know where the model's understanding actually stops — measured, not vibes- Anyone who's read one too many "AI will replace auditors" takes and wants the number instead### What you get- The book as a typeset PDF (6×9, designed for screen and print)- Links to every lab repo and the benchmark suite- Free updates to this edition### What this isn'tIt's not a Solidity tutorial (you should read code), not a course (Cyfrin Updraft is free and excellent), and not a prediction about AGI. It's field notes from pointing the current generation of models at the hardest bugs in the most adversarial environment we have — and a precise account of where they fail.The model reads the contracts. It does not yet read the world the contracts assume. That gap is the thing worth working on — and the thing worth understanding before you trust an audit to a machine.---Questions? Find me at 0xsoftboi.github.io.