Skip to content

Repository files navigation

bridge-2026-05-snapshot

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/.

Quick start

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 + tests

Regenerate 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 rest

Without .envrc.local, BASE_MAINNET_RPC_URL defaults to the public Base RPC (slow; fine for cached re-runs, slow for a cold fetch).

What verify proves

just verify (also nix run .#verify) checks, fully offline, against pinned/manifest.json:

  1. Cache integrity -- each pinned/log-cache/*.json matches its pinned sha256 + logCount.
  2. Input -> output reproduction -- re-running the pure transform over the committed cache reproduces pinned/output/*.migration.json exactly.
  3. Accounting invariants -- reconstructed supply == pinned on-chain totalSupply, taint ledger balances, burn coverage.
  4. Merkle root -- the root re-derived from the prod migration JSON equals the pinned root deployed in TorusMigrationClaim.

Layout

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages