docs(all-mainnet): align with canonical surface JSON; verification addendum

- ALL_MAINNET_CONFIGURATION: bridge_live vs swap inventory pending; CI script paths;
  remove stale sameChainSwapInventoryPublished:true claims
- ALL_MAINNET_VERIFICATION_COMPLETE: separate bridge verification from DEX inventory posture

Made-with: Cursor
This commit is contained in:
defiQUG
2026-04-28 04:20:16 -07:00
parent 12ba59a3f2
commit 68a245d5e4
2 changed files with 85 additions and 55 deletions

View File

@@ -1,8 +1,23 @@
# ALL Mainnet (651940) Configuration
**Date**: 2026-01-26
**Status**: ✅ **ALL VERIFICATIONS COMPLETE**
**Last Updated**: 2026-01-26
**Status**: ✅ **BIDIRECTIONAL BRIDGE CONFIGURED** (`bridge_live`). ⚠️ **Same-chain swap inventory not production-published** per canonical [`config/allmainnet-non-dodo-protocol-surface.json`](../../../config/allmainnet-non-dodo-protocol-surface.json): `status` is `bridge_live_swap_inventory_pending` and `summary.sameChainSwapInventoryPublished` is **`false`** until committed verified pools are promoted (do not claim routable DEX liquidity from this doc alone).
**Last Updated**: 2026-04-28
---
## Single source of truth (read this first)
| Topic | Canonical location |
|--------|-------------------|
| **CCIP / LiFi flags, inbound list, `isCCIPSupported` / `isLiFiSupported`** | [`alltra-lifi-settlement/src/config/chains.ts`](../../../alltra-lifi-settlement/src/config/chains.ts) — `ALL_MAINNET` must keep `ccipSupported: false` and `lifiSupported: false` until Chainlink / LiFi list 651940. |
| **Routing when LiFi/CCIP are off** | **Alltra custom bridge only** for 138↔651940: `AlltraAdapter` + `AlltraCustomBridge` (table below). **LiFi** routes use `isLiFiSupported(chainId)` — false for 651940, so LiFi quotes must not target ALL Mainnet. **CCIP** routes use `isCCIPSupported(chainId)` — false for 651940. **Generic inbound** includes 651940 via `isSupportedInboundChain` for nonLiFi / nonCCIP settlement (Alltra / internal). |
| **Canonical ALL Mainnet protocol surface (651940)** | **[proxmox root]** [`config/allmainnet-non-dodo-protocol-surface.json`](../../../config/allmainnet-non-dodo-protocol-surface.json) — source of truth for `status`, `sameChainSwapInventoryPublished`, token/protocol rows, and `nextTasks`. Submodule copies must track this file; **config wins** over this markdown if they disagree. |
| **CI / validation (proxmox repo root)** | [`scripts/verify/check-allmainnet-protocol-surface.sh`](../../../scripts/verify/check-allmainnet-protocol-surface.sh) — JSON shape + `sameChainSwapInventoryPublished` vs `status` consistency. [`scripts/verify/check-allmainnet-chains-flags.sh`](../../../scripts/verify/check-allmainnet-chains-flags.sh) — `ALL_MAINNET` in [`alltra-lifi-settlement/src/config/chains.ts`](../../../alltra-lifi-settlement/src/config/chains.ts) keeps `ccipSupported`/`lifiSupported` false for 651940. [`scripts/verify/check-allmainnet-gate-surface-alignment.sh`](../../../scripts/verify/check-allmainnet-gate-surface-alignment.sh) aliases the protocol-surface check. Invoked from [`scripts/validation/validate-config-files.sh`](../../../scripts/validation/validate-config-files.sh) / [`scripts/verify/run-all-validation.sh`](../../../scripts/verify/run-all-validation.sh) step 2. |
| **Registry / machine checks** | **proxmox repo root:** `config/routing-registry.json`, `config/aggregator-route-matrix.csv`, `config/allmainnet-non-dodo-protocol-surface.json`, [`config/all-mainnet-pool-creation-matrix.json`](../../../config/all-mainnet-pool-creation-matrix.json). *(No `all-mainnet-production-gate.json` in repo root today — do not reference a missing file as canonical.)* |
| **This document** | Human narrative, verification history, and operator checklist — **not** a second copy of `chains.ts`; if they disagree, **fix `chains.ts` and regen checks**, then update this file. |
**Same-chain surface:** documented tokens and protocol scaffolding live in [`config/allmainnet-non-dodo-protocol-surface.json`](../../../config/allmainnet-non-dodo-protocol-surface.json). As of **`updated`: 2026-04-28**, the file explicitly sets **`sameChainSwapInventoryPublished`: `false`** and **`status`: `bridge_live_swap_inventory_pending`** — meaning the **AlltraAdapter bridge is live**, but **routable same-chain DEX inventory is not asserted complete**. Follow `documentedTokens`, `protocols[]`, `gaps`, and `nextTasks` there for remaining pool/factory work; **`config/all-mainnet-pool-creation-matrix.json`** tracks pool lifecycle separately.
---
@@ -72,10 +87,10 @@
- LiFi supports 100+ chains but 651940 is not included
**If LiFi Not Supported** (Current Status):
- ALL Mainnet payments must use alternative routing
- Update `isSupportedInboundChain()` to exclude 651940
- Document routing fallback
- Update `chains.ts` to set `lifiSupported: false`
- ALL Mainnet payments must use alternative routing (Alltra custom bridge + internal paths)
- Keep `lifiSupported: false` in `chains.ts` (LiFi service must not quote 651940)
- Use `isAlltraCustomBridgeOnlyChain(651940)` / `isSupportedInboundChain(651940)` for nonLiFi inbound — **do not** route via LiFi SDK
- **Done in repo:** [Routing logic (implemented)](#routing-logic-implemented) and `lifi-routing.service.ts` guard on `isLiFiSupported`
**If LiFi Supported**:
- Update `chains.ts` to set `lifiSupported: true`
@@ -110,6 +125,34 @@
## Configuration Values
### Live Bridge Deployment
ALL Mainnet is not available through CCIP or LiFi, so production routing uses the custom `AlltraAdapter` + `AlltraCustomBridge` transport.
| Chain | Component | Address | Status |
|------:|-----------|---------|--------|
| 138 | `AlltraAdapter` | `0x66FEBA2fC9a0B47F26DD4284DAd24F970436B8Dc` | live |
| 138 | `AlltraCustomBridge` transport | `0x0A734337f080217d87B0a02524556C118d6a3Ee3` | live, configured |
| 651940 | `AlltraAdapter` | `0xe0E93247376aa097dB308B92e6Ba36bA015535D0` | live |
| 651940 | `AlltraCustomBridge` transport | `0xAb57BF30F1354CA0590af22D8974c7f24DB2DbD7` | live, configured |
Bridge route coverage is committed in:
- `config/routing-registry.json`
- `config/aggregator-route-matrix.csv`
- `config/allmainnet-non-dodo-protocol-surface.json`
- `config/all-mainnet-pool-creation-matrix.json` (pool lifecycle; proxmox root)
**Verification (from proxmox repo root):** run repo config validation (includes ALL Mainnet pool matrix when present) and review the canonical surface JSON:
```bash
bash scripts/validation/validate-config-files.sh
```
USDC-on-651940 probe helper (submodule): [`smom-dbis-138/scripts/verify-all-mainnet-usdc.sh`](../../scripts/verify-all-mainnet-usdc.sh).
**Related docs:** [ALL_MAINNET_VERIFICATION_COMPLETE.md](ALL_MAINNET_VERIFICATION_COMPLETE.md); ecosystem routing narrative [docs/11-references/DEPLOYED_TOKENS_BRIDGES_LPS_AND_ROUTING_STATUS.md](../../../docs/11-references/DEPLOYED_TOKENS_BRIDGES_LPS_AND_ROUTING_STATUS.md). *(Earlier pointers to `ALL_MAINNET_PRODUCTION_GATE.md`, `ALL_MAINNET_OPERATOR_ACTIONS.md`, or a fixed-path evidence bundle were removed — those paths are not present in this workspace.)*
### EVM Chain ID
```solidity
uint256 public constant ALLTRA_MAINNET = 651940;
@@ -178,48 +221,24 @@ Use consistent labels for metrics:
---
## Routing Logic Updates
## Routing logic (implemented)
### Before Verification
**Do not duplicate** the snippet below in app code; **import** from [`alltra-lifi-settlement/src/config/chains.ts`](../../../alltra-lifi-settlement/src/config/chains.ts).
- **`isSupportedInboundChain(651940)`** — `true` (Alltra + internal settlement allowed).
- **`isCCIPSupported(651940)`** / **`isLiFiSupported(651940)`** — `false` (use Alltra custom bridge, not CCIP/LiFi rails).
- **`isAlltraCustomBridgeOnlyChain(chainId)`** — `true` only for `651940` (convenience for “no LiFi/CCIP” paths).
```typescript
// ALL Mainnet is NOT included in supported chains
export function isSupportedInboundChain(chainId: number): boolean {
const supported = [
CHAIN_CONFIG.ETHEREUM.chainId,
CHAIN_CONFIG.BASE.chainId,
CHAIN_CONFIG.ARBITRUM.chainId,
// CHAIN_CONFIG.ALL_MAINNET.chainId, // Disabled until verified
];
return supported.includes(chainId);
}
```
### After CCIP Verification
```typescript
// If CCIP is supported, enable CCIP bridging
if (isCCIPSupported(chainId)) {
// Use CCIP bridge
const selector = getCCIPSelector(chainId);
// ... CCIP routing logic
} else {
// Use alternative bridge (e.g., AlltraAdapter)
// ... fallback routing logic
}
```
### After LiFi Verification
```typescript
// If LiFi is supported, enable LiFi routing
if (isLiFiSupported(chainId)) {
// Use LiFi for payment routing
// ... LiFi routing logic
} else {
// Use internal routing/adapter
// ... fallback routing logic
}
// See chains.ts for full implementations
import {
isSupportedInboundChain,
isCCIPSupported,
isLiFiSupported,
isAlltraCustomBridgeOnlyChain,
} from 'alltra-lifi-settlement/src/config/chains';
// LiFi quote/build paths: if (!isLiFiSupported(fromChainId)) { ... }
// CCIP send paths: if (!isCCIPSupported(chainId)) { use AlltraAdapter / not CCIP }
```
---
@@ -228,14 +247,14 @@ if (isLiFiSupported(chainId)) {
1. ✅ Update `AlltraAdapter.sol` with chain ID 651940
2. ✅ Update `chains.ts` with ALL_MAINNET config
3. ⚠️ **VERIFY CCIP SUPPORT** - Check CCIP Directory
4. ⚠️ **VERIFY LIFI SUPPORT** - Query LiFi API
5. ⚠️ **VERIFY USDC DEPLOYMENT** - Check ALL Mainnet explorer
6. ⚠️ Update routing services based on verification results
7. ⚠️ Update telemetry/metrics labels
8. ⚠️ Test adapter deployment
9. ⚠️ Register chain in ChainRegistry.sol
10. ⚠️ Update documentation with verified values
3. **VERIFY CCIP SUPPORT** - not supported as of 2026-01-26
4. **VERIFY LIFI SUPPORT** - not supported as of 2026-01-26
5. **VERIFY USDC DEPLOYMENT** - AUSDC verified on ALL Mainnet
6. Update routing services based on verification results
7. Update telemetry/metrics labels
8. ✅ Deploy and configure adapter transports on Chain 138 and 651940
9. ✅ Publish bidirectional bridge routes for WETH, cUSDT/AUSDT, and cUSDC/AUSDC
10. **Promote same-chain swap inventory** — set `summary.sameChainSwapInventoryPublished` to **`true`** in [`config/allmainnet-non-dodo-protocol-surface.json`](../../../config/allmainnet-non-dodo-protocol-surface.json) only after factory/router/pool addresses are verified and aligned with [`config/all-mainnet-pool-creation-matrix.json`](../../../config/all-mainnet-pool-creation-matrix.json); until then status remains `bridge_live_swap_inventory_pending`.
---
@@ -251,21 +270,30 @@ if (isLiFiSupported(chainId)) {
- [x] Routing logic updated based on support status ✅
- [x] Telemetry labels standardized ✅
- [x] Documentation updated with verified values ✅
- [x] Chain 138 adapter transport configured ✅ (2026-04-26)
- [x] ALL Mainnet adapter transport configured ✅ (2026-04-26)
- [x] Bidirectional route registry entries committed ✅ (2026-04-26)
- [ ] Same-chain ALL DEX pool inventory **published** in canonical surface JSON (`sameChainSwapInventoryPublished: true`) — **pending** as of 2026-04-28; bridge-only posture documented in JSON.
## Verification Summary
**Date**: 2026-01-26
**Date**: 2026-04-26
| Item | Status | Result |
|------|--------|--------|
| CCIP Support | ✅ Verified | ❌ **NOT SUPPORTED** |
| LiFi Support | ✅ Verified | ❌ **NOT SUPPORTED** |
| USDC Deployment | ✅ Verified | ✅ **DEPLOYED** - `0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881` (AUSDC) |
| Chain 138 Bridge Transport | ✅ Verified | `0x66FE...B8Dc``0x0A73...e3Ee3` |
| ALL Mainnet Bridge Transport | ✅ Verified | `0xe0E9...5D0``0xAb57...DbD7` |
| Same-chain ALL DEX Inventory | ⬜ **Pending** | [`config/allmainnet-non-dodo-protocol-surface.json`](../../../config/allmainnet-non-dodo-protocol-surface.json) — `sameChainSwapInventoryPublished: false`; document tokens/protocols without asserting full routable inventory |
**Action Taken**:
- ✅ Use `AlltraAdapter` for bridging (CCIP not available)
- ✅ Use internal routing for payments (LiFi not available)
- ✅ USDC contract verified: `0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881` (AUSDC)
- ✅ Chain 138 ↔ ALL Mainnet bridge support is configured and machine-verifiable
- **Same-chain:** do **not** treat surface JSON as full swap readiness until `sameChainSwapInventoryPublished` is **`true`**; follow `nextTasks` / pool matrix promotion; bridge-only flows remain valid.
---