Unichain — the mechanism is flashblock-native. Settlement windows are measured on Uniswap's official FlashblockNumber contract at 200ms resolution (
0x056466f1a50a6B5e4DCCF106074ee0083D721a42on Sepolia), not on block numbers, which is what makes a 10s maturity + 5s window practical. The hook is deployed on Unichain Sepolia at0xDecF9FA10d1dE837D96Fca76fE31302D82641aC4, and the fork test suite runs the full cycle against the real Unichain PoolManager.Reactive Network — settlement is autonomous. A Reactive Smart Contract on Lasna (
0x324d3DA5f40A9D533fe8FfEa7252D7f4b348cE77) subscribes to the hook'sSwapRecordedevents plus Cron topics and drivessettle()through the official callback proxy intoHindsightCallback(0xF6Dad7BB03a9cf89f4E3b98912Aea695F6b27227). Swaps settle roughly 45–60 seconds after execution with no keeper of ours running anywhere.Chainlink — the same bytecode is deployed on Base Sepolia (
0xE07a6bb6657f1381e5665F7741DEc4d4eAC8dAc4), where there is no flashblock contract at all, so it runs ablock.number × 10fallback clock driven by a Chainlink Automation upkeep (0x45109C72ED596bBD3786A4C5F36Ae1f88872b206). That deployment is the proof the mechanism is not Unichain-only: two chains, two independent settlement paths, one verified bytecode.
Github: https://github.com/OoJae/hindsight-hook Slides: https://docs.google.com/presentation/d/1YYsf39G6MripGXETAapgpFGLIWR9arIPITujRHqo3zs/edit?usp=sharing Project Link: https://oojae.github.io/hindsight-hook/ Demo Video: https://youtu.be/TL88bUqZwuA
Liquidity providers on volatile pairs lose to informed flow. CEX-DEX arbitrage takes the good side of every quote and LPs wear the difference — loss-versus-rebalancing, measured at $233.8M over nineteen months on mainnet, three quarters of it captured by three searchers.
Every fee mechanism we have prices flow before it can know anything about it. A static fee charges retail and arbitrage the same. A dynamic fee reads volatility, but volatility is not intent, it cannot tell a retail swap from a bot. The newest defenses price the intent to be first through priority-fee taxes, but on a fast rollup searchers stop bidding for priority and spam cheap reverting probes instead, and a reverted probe pays zero.
he one signal that cannot be faked, spoofed, or revert-spammed is what the price actually did after the trade landed. Nothing in production prices on it, because pricing after execution means holding something back, and no hook had done that.
Measured on seven days of real Unichain mainnet ETH/USDC 55,822 swaps, the tape committed to the repo, every figure reproducible offline with one command and no RPC: benign flow pays exactly the 5.00 bps headline, informed flow pays 12.32, and LPs recover 53.8% of the realized adverse selection they suffered ($2,688 of $5,002).
Against a revenue-matched volatility-scaled dynamic fee, Hindsight separates benign from toxic by 2.46× versus 1.27×, and takes about three times less of its revenue from non-informed addresses (5.6% versus 14.4% flat). Charge measured in the first half of the week predicts which addresses adversely select in the second: Spearman +0.739, permutation p = 0.0005 — small sample, 34 addresses, stated plainly.
Because a reverted transaction never lands, it never posts a bond and never enters the measurement, so revert-spam is structurally irrelevant rather than defended against. Live on two chains with two independent settlement paths, 133 Foundry tests, and deployed bytecode verified byte-for-byte against the source.
The hardest part was our own evidence. Three adversarial audit rounds, and twice the audit killed a headline we had already published.
Our own live demo inverted the pitch, the largest markout was acquitted and smaller ones convicted because θ shared a window with the markout it judged, so a trade could raise the bar it was measured against. On the real tape, 927 swaps had been acquitted by their own companion prints. Moving σ to a window that closes before the swap lands made that exactly zero, asserted as an equality rather than a bound.
Then an "out-of-sample" correlation of 0.441 turned out to be 91% tautology a placebo tape with zero predictability scored higher,so we retracted it, published the corrected per-trade figure of ≈0 as a negative result, and replaced it with a per-address split-half test that actually holds. A "0.0% of revenue from benign flow" headline was a string literal, true by construction; the honest number is 5.6%.
Every finding has an executable repro committed before its fix, and all three retractions ship on the site next to their corrected figures. Fitting the fixes in cost us the EIP-170 limit: the hook sits 27 bytes under it.