Reproducible generator + verifier for the TORUS Base migration snapshot (May 2026). Reconstructs old Base-TORUS holder balances from public on-chain logs, removes attacker-origin supply via taint-first accounting, allocates Uniswap V3/V4 pool balances to position owners, applies the team-wallet burn top-up, and emits the migration JSON that seeds the new Base token mint and the TorusEVM claim merkle root.
The point of this repo: anyone can reproduce the exact merkle root offline.
The raw on-chain log cache is committed (Git LFS), so a clone needs no archive
RPC to re-derive and verify the allocations. See pinned/.
nix develop # bun + biome + just + git-lfs
bun install
git lfs pull # fetch the committed raw-log cache
just verify # offline: re-derive + check pinned data (no RPC needed)
just check # biome + tsc + testsRegenerate from chain (needs a Base archive RPC):
cp .envrc.local.example .envrc.local # loads BASE_MAINNET_RPC_URL from passage
just snapshot # re-runs; reads cache, fetches the restWithout .envrc.local, BASE_MAINNET_RPC_URL defaults to the public Base RPC
(slow; fine for cached re-runs, slow for a cold fetch).
just verify (also nix run .#verify) checks, fully offline, against
pinned/manifest.json:
- Cache integrity -- each
pinned/log-cache/*.jsonmatches its pinned sha256 + logCount. - Input -> output reproduction -- re-running the pure transform over the committed cache reproduces
pinned/output/*.migration.jsonexactly. - Accounting invariants -- reconstructed supply == pinned on-chain totalSupply, taint ledger balances, burn coverage.
- Merkle root -- the root re-derived from the prod migration JSON equals the pinned root deployed in
TorusMigrationClaim.
src/ TypeScript port (Bun runtime) -- pure accounting + cached RPC layer
pinned/ manifest.json + log-cache/ (LFS) + output/ -- the committed, verifiable artifact
Accounting rules are documented in SUMMARY.md.