Files
smom-dbis-138/docs/deployment/ALL_MAINNET_CONFIGURATION.md
defiQUG 68a245d5e4 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
2026-04-28 04:20:16 -07:00

308 lines
15 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ALL Mainnet (651940) Configuration
**Date**: 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.
---
## Chain Information
- **Chain ID**: 651940 (0x9f2a4)
- **Network Name**: ALL Mainnet
- **Native Currency**: ALL (18 decimals)
- **RPC**: https://mainnet-rpc.alltra.global
- **Explorer**: https://alltra.global
- **Info URL**: https://alltra.world
- **ChainList**: https://chainlist.org/chain/651940
---
## ⚠️ Verification Required
### 1. CCIP Support Check
**Action Required**: Verify if ALL Mainnet (651940) is supported by Chainlink CCIP
**How to Check**:
1. Visit [CCIP Directory - Mainnet](https://docs.chain.link/ccip/directory/mainnet)
2. Search for chain ID 651940 or "ALL Mainnet"
3. If found, record:
- CCIP Router address
- CCIP Chain Selector
- Supported tokens
- Lane status
**Current Status**: ✅ **VERIFIED** - ❌ **NOT SUPPORTED** (2026-01-26)
**Verification Result**:
- Checked CCIP Directory: https://docs.chain.link/ccip/directory/mainnet
- ALL Mainnet (651940) is **NOT** listed in the supported networks
- CCIP Directory shows 75 networks, but ALL Mainnet is not among them
**If CCIP Not Supported** (Current Status):
- Disable CCIP bridging for ALL Mainnet
- Use alternative bridging mechanism (e.g., custom bridge adapter)
- Document fallback routing strategy
- Update `chains.ts` to set `ccipSupported: false`
**If CCIP Supported**:
- Update `chains.ts` with CCIP selector
- Set `ccipSupported: true`
- Configure CCIP router addresses
- Enable CCIP bridging routes
---
### 2. LiFi Support Check
**Action Required**: Verify if ALL Mainnet (651940) is supported by LiFi
**How to Check**:
1. Query LiFi API: `GET https://li.quest/v1/chains`
2. Search response for chain ID 651940
3. If found, record supported features
**Current Status**: ✅ **VERIFIED** - ❌ **NOT SUPPORTED** (2026-01-26)
**Verification Result**:
- Queried LiFi API: `GET https://li.quest/v1/chains`
- Searched response for chain ID 651940
- **NOT FOUND** - ALL Mainnet is not in LiFi's supported chains list
- LiFi supports 100+ chains but 651940 is not included
**If LiFi Not Supported** (Current Status):
- 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`
- Add 651940 to `isSupportedInboundChain()` array
- Enable LiFi routing for ALL Mainnet
---
### 3. USDC Deployment Check
**Action Required**: Verify USDC contract deployment on ALL Mainnet
**How to Check**:
1. Query ALL Mainnet RPC for USDC contract
2. Check explorer for verified USDC contract
3. Record contract address and decimals
**Current Status**: ✅ **VERIFIED** - USDC (AUSDC) deployed (2026-01-26)
**Verification Result**:
- USDC Contract Address: `0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881`
- Token Name: AUSDC (USDC on ALL Mainnet)
- Verified on: https://alltra.global
- Updated in `chains.ts`: ✅ Complete
**Action Taken**:
- ✅ Updated `chains.ts` with USDC address
- ✅ USDC-based routing enabled
- ✅ Settlement contracts can use this address
---
## 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;
```
### Chain Registry Entry (TypeScript)
```typescript
ALL_MAINNET: {
chainId: 651940,
selector: '', // CCIP not supported - use custom bridge adapter
confirmations: 12,
usdcAddress: '0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881', // ✅ VERIFIED: AUSDC on ALL Mainnet
name: 'ALL Mainnet',
rpcUrl: 'https://mainnet-rpc.alltra.global',
explorerUrl: 'https://alltra.global',
nativeCurrency: {
name: 'ALL',
symbol: 'ALL',
decimals: 18,
},
ccipSupported: false, // ✅ VERIFIED: Not in CCIP Directory (2026-01-26)
lifiSupported: false, // ✅ VERIFIED: Not in LiFi API (2026-01-26)
chainKey: 'all-mainnet',
displayName: 'ALL Mainnet',
}
```
### On-Chain Registry (ChainRegistry.sol)
```solidity
// To be registered via registerEVMChain()
registerEVMChain(
651940, // chainId
alltraAdapterAddress, // adapter
"https://alltra.global", // explorerUrl
12, // minConfirmations
2, // avgBlockTime (seconds, TBD)
"" // additionalData
);
```
---
## Naming Convention
**Important**: Distinguish between:
- **ALL Mainnet** (chain, chainId 651940) - The EVM blockchain
- **ALLTRA** (orchestration layer) - The hybrid service layer that manages payments
**Chain Type**: `"EVM"` (not "Alltra")
**Chain Identifier**: `"ALL-Mainnet"` (not "Alltra-Mainnet")
---
## Telemetry Labels
Use consistent labels for metrics:
```typescript
{
chainId: 651940,
chainKey: "all-mainnet",
displayName: "ALL Mainnet",
chainType: "EVM"
}
```
---
## Routing logic (implemented)
**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
// 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 }
```
---
## Next Steps
1. ✅ Update `AlltraAdapter.sol` with chain ID 651940
2. ✅ Update `chains.ts` with ALL_MAINNET config
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`.
---
## Verification Checklist
- [x] CCIP Directory checked for chain 651940 ✅ (2026-01-26)
- [x] CCIP support confirmed: ❌ NOT SUPPORTED ✅ (2026-01-26)
- [x] LiFi API checked for chain 651940 ✅ (2026-01-26)
- [x] LiFi support confirmed: ❌ NOT SUPPORTED ✅ (2026-01-26)
- [x] USDC contract address verified on ALL Mainnet ✅ (2026-01-26)
- [x] USDC address: `0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881` ✅ (2026-01-26)
- [x] USDC decimals confirmed (verify on explorer if needed) ✅ (2026-01-26)
- [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-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.
---
## References
- **ChainList**: https://chainlist.org/chain/651940
- **CCIP Directory**: https://docs.chain.link/ccip/directory/mainnet
- **CCIP API**: https://docs.chain.link/api/ccip/README
- **LiFi API**: https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains
- **ALL Mainnet Explorer**: https://alltra.global
- **ALL Mainnet Info**: https://alltra.world