Files
proxmox/docs/GALATIC_SUMMARY.md
defiQUG dbd517b279 Sync workspace: config, docs, scripts, CI, operator rules, and submodule pointers.
- Update dbis_core, cross-chain-pmm-lps, explorer-monorepo, metamask-integration, pr-workspace/chains
- Omit embedded publish git dirs and empty placeholders from index

Made-with: Cursor
2026-04-12 06:12:20 -07:00

251 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.
# Galatic Summary — Chain 138 Ecosystem, Routing, and Integrations
**Audience:** Galatic
**Last Updated:** 2026-04-02
**Purpose:** Single reference for what is built, all available routing (DEX and aggregators), On-Ramp/Off-Ramp, Fireblocks, and other integrations.
---
## 1. What Is Built Here
### 1.1 Core Network: Chain 138 (DeFi Oracle Meta Mainnet)
- **Chain ID:** 138
- **Name:** Defi Oracle Meta Mainnet (D-BIS)
- **Consensus:** Besu (EVM); validator set and RPC nodes on Proxmox/LAN.
- **Public RPCs:**
- `https://rpc-http-pub.d-bis.org`, `https://rpc.d-bis.org`, `https://rpc2.d-bis.org`
- `https://rpc.defi-oracle.io`, `https://138.rpc.thirdweb.com`
- **Explorer:** **Blockscout** — https://explorer.d-bis.org
- **Chainlist:** https://chainlist.org/chain/138
**Protocol/wallet acceptance:** Ledger App-Ethereum (in firmware), Chainlist, thirdweb (chain + bridge), MetaMask (custom network / Chainlist), Blockscout, ethers.js compatible.
---
### 1.2 On-Chain Contracts (Chain 138)
| Area | Component | Status | Address / Note |
|------|-----------|--------|----------------|
| **Compliance & tokens** | ComplianceRegistry, TokenFactory, DebtRegistry, PolicyManager | Deployed | See CONTRACT_ADDRESSES_REFERENCE |
| **Stablecoins** | Compliant cUSDT, cUSDC | Deployed | cUSDT, cUSDC; optional cEURC, cEURT, cGBP*, cAUDC, cJPYC, cCHFC, cCADC, cXAU* |
| **Bridges** | Bridge Vault (multi-chain stablecoin) | Deployed | `0x31884f84555210FFB36a19D2471b8eBc7372d0A8` |
| **CCIP** | CCIP WETH9/WETH10 bridges (138 ↔ Ethereum L2s) | Deployed | Deterministic addresses; LINK-funded |
| **PMM / DEX** | DODOPMMIntegration | Deployed | `0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895` (canonical official-DVM-backed stable stack) |
| **PMM pools** | Canonical public stable pools + retained XAU pools | Live | Stable: cUSDT/cUSDC `0x9e89bAe009adf128782E19e8341996c596ac40dC`, cUSDT/USDT `0x866Cb44b59303d8dc5f4F9E3E7A8e8b0bf238d66`, cUSDC/USDC `0xc39B7D0F40838cbFb54649d327f49a6DAC964062`; public XAU pools remain on the older PMM phase |
| **PMM routing** | DODOPMMProvider | Deployed | `0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e`; supports the canonical stable pool set |
| **Registry** | ChainRegistry (UUPS proxy) | Deployed | `0x6949137625CA923A4e9C80D5bc7DF673f9bbb84F`; EVM + non-EVM chain registry |
| **Truth Network** | TruthNetworkAdapter (non-EVM) | Deployed | `0x7880Ef14887a0567807AcF785eC92553D014930f`; Truth registered in ChainRegistry, but this is a registry/pointer attachment to the Ethereum ↔ Truth bridge story, not a direct 138 ↔ Truth CCIP lane |
| **Tron** | TronAdapter (non-EVM) | Deployed | `0x28a94FB4bC415Ac3273211429338f768074CBEF6`; relay/off-chain wiring still defines end-to-end usability |
| **Solana** | SolanaAdapter (non-EVM / SVM) | Contract in repo | `SolanaAdapter` in `smom-dbis-138`; list under `token-mapping-multichain.json``nonEvmNetworks` (no EIP-155 id); deploy address in inventory when registered on 138 |
| **Trustless bridge** | Lockbox138 | Deployed | `0xFce6f50B312B3D936Ea9693C5C9531CF92a3324c` |
| **Multi-provider DEX router** | EnhancedSwapRouterV2 + pilot venue layer | Live | Router-v2 plus funded pilot-compatible `Uniswap_v3`, `Balancer`, `Curve_3`, and `1inch` venues are live on 138; public planner/execution uses the canonical routing asset `WETH` lane |
| **Swapbridgeswap** | SwapBridgeSwapCoordinator | Script exists | Deploy when E2E swap+bridge+swap flow is needed |
**References:**
- [CONTRACT_ADDRESSES_REFERENCE](11-references/CONTRACT_ADDRESSES_REFERENCE.md)
- [LIQUIDITY_POOLS_MASTER_MAP](11-references/LIQUIDITY_POOLS_MASTER_MAP.md)
- [PMM_DEX_ROUTING_STATUS](11-references/PMM_DEX_ROUTING_STATUS.md)
---
### 1.3 Services & APIs
| Service | Purpose | API / Location |
|---------|---------|----------------|
| **Token-aggregation** | Token/pool index; single-hop DEX quotes; bridge routes; token mapping | `GET /api/v1/quote`, `/api/v1/tokens`, `/api/v1/bridge/routes`, `/api/v1/token-mapping`; see REST_API_REFERENCE |
| **Bridge quote (orchestration)** | Swap + bridge + swap quotes | `POST /api/bridge/quote` (source/dest swap optional) |
| **Ramp API** (metamask-integration) | On-ramp / off-ramp session creation | `POST /ramps/on-ramp/session`, `POST /ramps/off-ramp/session`, `GET /ramps/quote`, `GET /ramps/providers` |
| **Crypto.com OTC** (dbis_core) | Institutional OTC, RFQ, settle-later | `/api/v1/crypto-com-otc` (dbis-api.d-bis.org) |
| **Exchange Registry** (dbis_core) | Multi-exchange price aggregation | `/api/v1/exchange` (Binance, Kraken, Oanda, FXCM) |
| **Explorer backend** | Bridge aggregator (Li.Fi, Socket, Squid, etc.) | Bridge routes; not on-chain DEX on 138 |
---
## 2. DEX and Aggregator Routing — Whats Available
### 2.1 On-Chain Routing (Chain 138)
- **Live today:**
- **DODO-style PMM** via **DODOPMMIntegration** and **DODOPMMProvider**.
- **Canonical current stable stack:** cUSDT/cUSDC, cUSDT/USDT, and cUSDC/USDC are live on the official-DVM-backed integration; retained public XAU pools remain on the older PMM phase.
- Swaps: use pool address + `swapCUSDTForUSDC`, `swapCUSDTForUSDT`, `swapCUSDCForUSDC`, etc., with approval on the integration contract.
- **Live pilot-compatible venue layer:**
- **EnhancedSwapRouterV2** now routes across DODO V2 PMM, DODO v3 pilot, and the funded pilot-compatible `Uniswap_v3`, `Balancer`, `Curve_3`, and `1inch` venues on 138. Public planner visibility is live at `/token-aggregation/api/v2`, and the canonical `WETH -> USDT` lane currently resolves through the pilot `Uniswap_v3` venue.
- **Important boundary:**
- Those live `Uniswap_v3`, `Balancer`, `Curve_3`, and `1inch` venues are **Chain 138 canonical routing venues**, not public-chain `cW*` pool venues. The repo still treats public-chain `cW*` PMM/AMM liquidity as design-only until edge pools are actually deployed.
**Routing logic (router-v2 / planner-v2):**
- By size: small (<$10k) → Uniswap V3 / Dodoex; medium ($10k$100k) → Dodoex → Balancer → Uniswap V3; large (>$100k) → Dodoex → Curve → Balancer.
- By slippage/liquidity: low slippage → Dodoex (PMM); medium → Balancer; high → Curve.
**References:**
- [PMM_DEX_ROUTING_STATUS](11-references/PMM_DEX_ROUTING_STATUS.md)
- [DEX_AND_AGGREGATORS_CHAIN138_EXPLAINER](04-configuration/DEX_AND_AGGREGATORS_CHAIN138_EXPLAINER.md)
---
### 2.2 Token-Aggregation API (Off-Chain Quotes)
- **Single-hop quote:** `GET /api/v1/quote?chainId=138&tokenIn=&tokenOut=&amountIn=` → best direct-pool quote from indexed DODO (and Uniswap if configured).
- **Token/pool discovery:** `GET /api/v1/tokens?chainId=138`, `/api/v1/tokens/:address/pools`, `/api/v1/report/token-list`.
- **Bridge:** `GET /api/v1/bridge/routes`, `/api/v1/token-mapping?fromChain=138&toChain=1`.
- **Limitation:** Single-hop only; no N-hop pathfinding.
---
### 2.3 SwapBridgeSwap (Cross-Chain)
- **Orchestration:** `POST /api/bridge/quote` — can return optional **sourceSwapQuote** and **destinationSwapQuote** in addition to bridge route.
- **On-chain (optional):** **SwapBridgeSwapCoordinator** — deploy when a single tx “swap (source) → bridge → swap (destination)” is required.
---
### 2.4 External DEX Aggregators (1inch, ParaSwap, 0x, Li.Fi)
- **1inch, ParaSwap, 0x:** Integrated in **alltra-lifi-settlement** for quotes on supported chains. **Chain 138 is not supported** by these aggregators unless they add it; to use them with 138, they would need to add the chain and index DODO PMM (and any other DEX on 138).
- **Li.Fi:** Cross-chain routing; **Chain 138 not supported**. Use **CCIP** for 138 ↔ Ethereum/L2.
- **Explorer bridge aggregator:** Uses Li.Fi, Socket, Squid, Symbiosis, Relay, Stargate for **bridge routes**, not for on-chain DEX on 138.
**Practical today:** Use **token-aggregation** for quotes and **DODOPMMIntegration** (or DODOPMMProvider) for execution on Chain 138.
---
### 2.5 Routing Summary Table
| Capability | Available | Where |
|------------|------------|--------|
| Single-hop quote (API) | Yes | `GET /api/v1/quote` |
| DODO PMM on-chain swaps | Yes | DODOPMMIntegration + DODOPMMProvider on the canonical stable stack; direct stable and retained XAU routes are live |
| Multi-provider one-leg routing | Yes (Chain 138 canonical lanes) | EnhancedSwapRouterV2 on Chain 138 for canonical `WETH` / stable and related lanes |
| N-hop path (A→B→C on one chain) | No | No graph-based multi-hop API |
| Swapbridgeswap (cross-chain) | Yes (orchestration) | QuoteService + optional SwapBridgeSwapCoordinator |
| 1inch / ParaSwap / 0x on 138 | No | Aggregators do not support Chain 138 yet |
| Public-chain cW* pools | No | cW tokens/bridges exist in places, but the repo does not record live cW* pool contracts on Balancer, Curve, DODO edge, Uniswap, or 1inch |
---
## 3. On-Ramp and Off-Ramp
### 3.1 Ramp Providers (Implemented)
- **MoonPay** — On-ramp + Off-ramp
- **Ramp Network** — On-ramp + Off-ramp
- **Onramper** — Aggregator (on-ramp + quotes)
- **Transak** — On-ramp + Off-ramp
- **Banxa** — On-ramp + Off-ramp
- **Coinbase Ramps** — On-ramp + Off-ramp
- **Stripe Crypto** — On-ramp
- **Cybrid** — On-ramp + Off-ramp
- **Sardine** — On-ramp
- **HoneyCoin** — Off-ramp
**API:** `POST /ramps/on-ramp/session`, `POST /ramps/off-ramp/session`, `GET /ramps/quote`, `GET /ramps/providers` (metamask-integration).
**API keys:** See MASTER_SECRETS_INVENTORY, API_KEYS_REQUIRED (e.g. MOONPAY_API_KEY, RAMP_NETWORK_API_KEY, ONRAMPER_API_KEY).
---
### 3.2 User Flows (Chain 138)
- **On-ramp (fiat → crypto on 138):**
1. User chooses **Buy** in companion/dApp.
2. Selects a ramp-supported chain (e.g. **Ethereum Mainnet**).
3. Completes purchase via ramp (MoonPay, Ramp, etc.) → funds on mainnet.
4. Uses **Bridge** to send assets **Mainnet → Chain 138**.
5. Assets on 138 for gas, swaps, dApps.
- **Off-ramp (crypto on 138 → fiat):**
1. User uses **Bridge** to send **Chain 138 → Ethereum Mainnet**.
2. After confirmation, opens companion/dApp **Sell** (off-ramp).
3. Selects **Ethereum Mainnet** and completes sale via ramp provider.
4. Fiat to linked bank/payment per provider terms.
**Note:** Ramps today target supported public chains (e.g. mainnet). Chain 138 native on-ramp/off-ramp would require ramp providers to add 138 (see ON_RAMP_INTEGRATION_GUIDE, CONSENSYS_OUTREACH_PACKAGE).
**References:**
- [MAINNET_RAMP_USER_FLOWS](04-configuration/MAINNET_RAMP_USER_FLOWS.md)
- [MAINNET_LIQUIDITY_AND_RAMPS_PRIORITY](00-meta/MAINNET_LIQUIDITY_AND_RAMPS_PRIORITY.md)
- [METAMASK_BRIDGE_SWAP](../../smom-dbis-138/docs/operations/integrations/METAMASK_BRIDGE_SWAP.md)
---
## 4. Fireblocks
- **Purpose:** Institutional custody and Web3 operations on Chain 138.
- **Dedicated RPC (Chain 138):** One node is reserved for Fireblocks so traffic is isolated from public and other tenant RPCs.
- **VMID:** 2301 (besu-rpc-private-1).
- **LAN:** `http://192.168.11.232:8545`, `ws://192.168.11.232:8546`.
- **Public:** `https://rpc-fireblocks.d-bis.org`, `wss://ws.rpc-fireblocks.d-bis.org`.
- **Fireblocks Console:** Add custom network with RPC URL above, Chain ID **138**, optional WebSocket URL.
- **Fireblocks Web3 Provider (SDK):** Use `rpcUrl: "https://rpc-fireblocks.d-bis.org"` (or env `RPC_URL_138_FIREBLOCKS`) with `@fireblocks/fireblocks-web3-provider`.
- **REST API:** Use Chain ID **138** for Create Transaction etc.; backend uses custom network config for 138.
- **Optional:** Fireblocks Network Link / IP allowlisting — restrict to the Fireblocks-dedicated node (2301) only.
**References:**
- [FIREBLOCKS_WEB3_INTEGRATION](04-configuration/FIREBLOCKS_WEB3_INTEGRATION.md)
- [RPC_ENDPOINTS_MASTER](04-configuration/RPC_ENDPOINTS_MASTER.md)
- fireblocks-integration submodule (Gitea: d-bis/fireblocks-integration)
---
## 5. Other Integrations
### 5.1 Bridges
| Bridge | Scope | Tokens | Notes |
|--------|--------|--------|--------|
| **CCIP (live EVM matrix)** | 138 ↔ Ethereum, Optimism, Polygon, Arbitrum, Base, BSC, Avalanche, Cronos, Gnosis, Celo | WETH, WETH10, cUSDT, cUSDC, LINK | Fees in LINK; deterministic receiver addresses; use the deployed-tokens status doc as canonical live-state reference |
| **CCIP (pending EVM)** | 138 ↔ Wemix | WETH, WETH10, cUSDT, cUSDC, LINK | Repo wiring exists, but operator completion is still pending |
| **Bridge Vault** | Multi-chain stablecoin (Ethereum, Polygon, BNB) | cUSDT, cUSDC | Vault: `0x31884f84555210FFB36a19D2471b8eBc7372d0A8` |
| **Truth Network** | Ethereum ↔ Truth (Substrate); adapter on 138 | TRUU (lift/burn) | TruthNetworkAdapter on 138; Chain 138 is registry/pointer only today, not a normal CCIP destination |
| **Tron** | Chain 138 non-EVM adapter program | Tron-side relay assets | `TronAdapter` exists on 138; treat as adapter + off-chain relay program, not CCIP |
| **Solana** | SVM mainnet-beta; non-EVM adapter pattern | TBD per relay | `SolanaAdapter` in repo; CAIP-2 `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`; not a CCIP EVM destination |
| **AlltraAdapter** | ALL Mainnet (651940) | Custom | CCIP/Li.Fi not supported on 651940 |
| **Etherlink / Tezos** | Feature-gated scaffold | TBD | Placeholder token mapping + remaining-items plan exist; not a finished public bridge lane |
| **XDC Zero** | Chain 138 ↔ XDC Network | XDC Zero program assets | Parallel to CCIP |
| **OP Stack L2** | Optional future 138 bridge design | TBD | Design notes only; not live |
**References:**
- [CHAINS_AND_PROTOCOLS_BRIDGE_INTEGRATION](11-references/CHAINS_AND_PROTOCOLS_BRIDGE_INTEGRATION.md)
- [CCIP_CHAIN_SELECTORS](11-references/CCIP_CHAIN_SELECTORS.md)
- [TRUTH_NETWORK_BRIDGE_SPEC](07-ccip/TRUTH_NETWORK_BRIDGE_SPEC.md)
- [TEZOS_CCIP_REMAINING_ITEMS](07-ccip/TEZOS_CCIP_REMAINING_ITEMS.md)
- [CHAIN138_XDC_ZERO_BRIDGE_RUNBOOK](03-deployment/CHAIN138_XDC_ZERO_BRIDGE_RUNBOOK.md)
- [OP_STACK_L2_AND_BESU138_BRIDGE_NOTES](03-deployment/OP_STACK_L2_AND_BESU138_BRIDGE_NOTES.md)
---
### 5.2 Wallets & Discovery
- **Ledger:** Chain 138 in App-Ethereum (Defi Oracle Meta, ticker ETH).
- **MetaMask:** Add via Chainlist or custom RPC; defi-oracle-metamask-sdk for `addOrSwitchNetwork()`. Native Swaps/Bridge do not support 138 yet.
- **thirdweb:** Chain 138 listed; bridge to/from Defi Oracle Meta; RPC and explorer (blockscout.defi-oracle.io).
- **Token list:** Dual-chain token list (e.g. DUAL_CHAIN_TOKEN_LIST) for MetaMask; token-aggregation report endpoint for Chain 138.
---
### 5.3 Infrastructure & Ops
- **Blockscout:** https://explorer.d-bis.org (verification, contracts, txs).
- **Cloudflare:** DNS, SSL, Tunnels.
- **Proxmox:** Host and VM/container management for validators, RPC, explorer, services.
- **NPMplus:** Reverse proxy (e.g. rpc-fireblocks.d-bis.org, explorer).
---
## 6. Quick Reference
| Need | Where |
|------|--------|
| Contract addresses (138) | CONTRACT_ADDRESSES_REFERENCE, LIQUIDITY_POOLS_MASTER_MAP |
| DEX routing status | PMM_DEX_ROUTING_STATUS, DEX_AND_AGGREGATORS_CHAIN138_EXPLAINER |
| Quote API | token-aggregation: GET /api/v1/quote, POST /api/bridge/quote |
| On/off-ramp | MAINNET_RAMP_USER_FLOWS, INTEGRATIONS_QUICK_REFERENCE |
| Fireblocks | FIREBLOCKS_WEB3_INTEGRATION, RPC_ENDPOINTS_MASTER |
| Bridges & chains | CHAINS_AND_PROTOCOLS_BRIDGE_INTEGRATION, CCIP_CHAIN_SELECTORS |
| Integrations list | INTEGRATIONS_QUICK_REFERENCE (root) |
---
*This summary is maintained in the proxmox/docs repo. For contract addresses and deployment details, always confirm against CONTRACT_ADDRESSES_REFERENCE and runbooks.*