docs: Chain 138 alignment audit + deprecate stale token-addresses master #1

Open
nsatoshi wants to merge 1 commits from devin/1776556175-chain138-alignment-audit into main
Owner

Chain 138 alignment audit

Requested by @nsatoshi (Devin session 10c48192bc54424e82d856b10a83c9ff).

What

  • New docs/CHAIN138_ALIGNMENT_AUDIT_2026-04-18.md — full drift report over 67 unique Chain-138 addresses collected from 7 canonical sources, cross-checked against live on-chain state at https://rpc-core.d-bis.org (chainId 0x8a / 138).
  • New docs/data/chain138-alignment.json — machine-readable findings for downstream tooling/codegen.
  • Existing docs/CHAIN138_TOKEN_ADDRESSES.md banner-deprecated (only 5 of 15+ tokens, 0 of 43 infrastructure contracts, last updated 2026-01-31 vs. 2026-03-27 canonical inventory).

Sources consulted

  1. LedgerLive/docs/CHAIN138_TOKEN_ADDRESSES.md — purported master (v1.0, 2026-01-31)
  2. smom-dbis-138/config/address-inventory.chain138.json — infrastructure inventory (2026-03-27)
  3. smom-dbis-138/config/runtime-env.chain138.json — runtime env surface (2026-03-27)
  4. smom-dbis-138/services/token-aggregation/src/config/canonical-tokens.ts
  5. dbis_core/src/core/defi/tezos-usdtz/allowlist.config.ts
  6. explorer-monorepo/backend/config/metamask/DUAL_CHAIN_TOKEN_LIST.tokenlist.json (v1.3.4, 2026-04-04)
  7. smom-dbis-138/docs/ADDRESS_MAPPING.md — genesis ↔ deployed mapping
  8. On-chain state via JSON-RPC

Headline findings

  • 64 of 67 referenced addresses are live on-chain; 3 ghosts (in allowlist only, no bytecode).
  • 61 deployed contracts are missing from the LedgerLive master doc.
  • 17 deployed ERC20-shaped tokens vs. the 5 documented. 10 net-new undocumented: cAUDC, cCADC, cCHFC, cEURC, cEURT, cGBPC, cGBPT, cJPYC, cXAUC, cXAUT + raw USDT/USDC/wXRP.
  • WETH9 genesis slot 0xC02aaA39…Cc2 returns decimals=0 on-chain — the genesis pre-deploy is a non-ERC20 shim; the real WETH9 bytecode lives at 0x3304b747…E6 per ADDRESS_MAPPING.md.
  • WETH10 at canonical 0xf4BB2e28…A9f works correctly (18 decimals, Wrapped Ether v10).
  • LedgerLive/docs/CONTRACT_ADDRESSES_REFERENCE.md and CONTRACT_INVENTORY_AND_VERIFICATION.md are linked from the master doc but return 404 (files never existed in this repo).
  1. Treat smom-dbis-138/config/address-inventory.chain138.json as the single on-box source of truth; generate DUAL_CHAIN_TOKEN_LIST.tokenlist.json, allowlist.config.ts Chain-138 block, and canonical-tokens.ts Chain-138 entries from it via codegen.
  2. Either re-point CHAIN138_TOKEN_ADDRESSES.md WETH entry at the real deployed 0x3304b747…E6, or redeploy canonical WETH9 at the genesis slot.
  3. Reconcile 3 ghost addresses in dbis_core/allowlist.config.ts.
  4. Restore or remove the 404ing cross-referenced files.

Verification

curl -sX POST https://rpc-core.d-bis.org -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
# → {"jsonrpc":"2.0","id":1,"result":"0x8a"}
## Chain 138 alignment audit Requested by @nsatoshi (Devin session `10c48192bc54424e82d856b10a83c9ff`). ### What - New `docs/CHAIN138_ALIGNMENT_AUDIT_2026-04-18.md` — full drift report over **67 unique Chain-138 addresses** collected from 7 canonical sources, cross-checked against live on-chain state at `https://rpc-core.d-bis.org` (chainId `0x8a` / 138). - New `docs/data/chain138-alignment.json` — machine-readable findings for downstream tooling/codegen. - Existing `docs/CHAIN138_TOKEN_ADDRESSES.md` banner-deprecated (only 5 of 15+ tokens, 0 of 43 infrastructure contracts, last updated 2026-01-31 vs. 2026-03-27 canonical inventory). ### Sources consulted 1. `LedgerLive/docs/CHAIN138_TOKEN_ADDRESSES.md` — purported master (v1.0, 2026-01-31) 2. `smom-dbis-138/config/address-inventory.chain138.json` — infrastructure inventory (2026-03-27) 3. `smom-dbis-138/config/runtime-env.chain138.json` — runtime env surface (2026-03-27) 4. `smom-dbis-138/services/token-aggregation/src/config/canonical-tokens.ts` 5. `dbis_core/src/core/defi/tezos-usdtz/allowlist.config.ts` 6. `explorer-monorepo/backend/config/metamask/DUAL_CHAIN_TOKEN_LIST.tokenlist.json` (v1.3.4, 2026-04-04) 7. `smom-dbis-138/docs/ADDRESS_MAPPING.md` — genesis ↔ deployed mapping 8. On-chain state via JSON-RPC ### Headline findings - **64 of 67** referenced addresses are live on-chain; **3 ghosts** (in allowlist only, no bytecode). - **61** deployed contracts are missing from the LedgerLive master doc. - **17** deployed ERC20-shaped tokens vs. the 5 documented. 10 net-new undocumented: `cAUDC`, `cCADC`, `cCHFC`, `cEURC`, `cEURT`, `cGBPC`, `cGBPT`, `cJPYC`, `cXAUC`, `cXAUT` + raw `USDT`/`USDC`/`wXRP`. - **WETH9 genesis slot** `0xC02aaA39…Cc2` returns `decimals=0` on-chain — the genesis pre-deploy is a non-ERC20 shim; the real WETH9 bytecode lives at `0x3304b747…E6` per `ADDRESS_MAPPING.md`. - **WETH10** at canonical `0xf4BB2e28…A9f` works correctly (18 decimals, `Wrapped Ether v10`). - `LedgerLive/docs/CONTRACT_ADDRESSES_REFERENCE.md` and `CONTRACT_INVENTORY_AND_VERIFICATION.md` are linked from the master doc but return 404 (files never existed in this repo). ### Recommended follow-ups (listed in audit doc §9) 1. Treat `smom-dbis-138/config/address-inventory.chain138.json` as the single on-box source of truth; generate `DUAL_CHAIN_TOKEN_LIST.tokenlist.json`, `allowlist.config.ts` Chain-138 block, and `canonical-tokens.ts` Chain-138 entries from it via codegen. 2. Either re-point `CHAIN138_TOKEN_ADDRESSES.md` WETH entry at the real deployed `0x3304b747…E6`, or redeploy canonical WETH9 at the genesis slot. 3. Reconcile 3 ghost addresses in `dbis_core/allowlist.config.ts`. 4. Restore or remove the 404ing cross-referenced files. ### Verification ``` curl -sX POST https://rpc-core.d-bis.org -H 'content-type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}' # → {"jsonrpc":"2.0","id":1,"result":"0x8a"} ```
nsatoshi added 1 commit 2026-04-18 23:50:03 +00:00
- Add CHAIN138_ALIGNMENT_AUDIT_2026-04-18.md: drift report covering 67 unique
  Chain-138 addresses from 7 canonical sources, cross-checked against on-chain
  state at https://rpc-core.d-bis.org (chainId 0x8a / 138).
- Add docs/data/chain138-alignment.json: structured findings for downstream tooling.
- Banner CHAIN138_TOKEN_ADDRESSES.md as DEPRECATED (only 5 of 15+ tokens, 0 of 43
  infrastructure contracts).

Findings highlights:
- 64 of 67 referenced addresses are live on-chain; 3 ghosts (in allowlist only).
- 61 deployed contracts are missing from CHAIN138_TOKEN_ADDRESSES.md.
- WETH9 genesis slot (0xC02aaA39...Cc2) is a non-ERC20 shim (decimals=0); real
  WETH9 is at 0x3304b747...E6 per smom/docs/ADDRESS_MAPPING.md.
- WETH10 at canonical 0xf4BB2e28...A9F works (18 decimals, 'Wrapped Ether v10').
- 15 compliant fiat/metal tokens (cEURC, cGBPC, cAUDC, cJPYC, cCHFC, cCADC,
  cXAUC, cXAUT, cEURT, cGBPT, plus non-compliant-wrapper USDT/USDC) all live on-chain,
  all absent from CHAIN138_TOKEN_ADDRESSES.md.

Recommended follow-ups listed in the audit doc.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin devin/1776556175-chain138-alignment-audit:devin/1776556175-chain138-alignment-audit
git checkout devin/1776556175-chain138-alignment-audit
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: d-bis/LedgerLive#1