Files
proxmox/docs/00-meta/TASKS_TO_INCREASE_ALL_E2E_FLOWS.md
defiQUG b3a8fe4496
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
chore: sync all changes to Gitea
- Config, docs, scripts, and backup manifests
- Submodule refs unchanged (m = modified content in submodules)

Made-with: Cursor
2026-03-02 11:37:34 -08:00

12 KiB
Raw Permalink Blame History

Tasks Required to Increase All End-to-End Flows

Last Updated: 2026-02-28
Purpose: Single list of all tasks needed to complete and improve every E2E flow (same-chain swap, bridge-only, swapbridgeswap).
Flows: DEX_AND_AGGREGATORS_CHAIN138_EXPLAINER.md §6 — Flow A (swap on 138), Flow B (bridge from 138), Flow C (swap → bridge → swap).


Legend

Type Meaning
Op Operator (LAN/Proxmox, credentials)
Auto Script exists; run or schedule
Code Code or config change
Doc Documentation / design
Def Blocked or deferred

Flow A: Swap on Chain 138 only (same chain)

Goal: User can resolve tokens → get quote → execute swap on 138 (cUSDT↔cUSDC, cUSDT↔USDT, cUSDC↔USDC).

# Task Type Notes
A1 Ensure Core RPC (138) writable and reachable Op REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS. make-rpc-vmids-writable-via-ssh.sh, health-check-rpc-2101.sh.
A2 Verify or create three PMM pools on 138 Op/Auto cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC. CreateCUSDTCUSDCPool.s.sol, CreateCUSDTUSDTPool.s.sol, CreateCUSDCUSDCPool.s.sol or setup-dodo-pools.sh. NEXT_STEPS_PMM_FULL_PARITY.
A3 Register pools with DODOPMMProvider Op Set POOL_CUSDTCUSDC, POOL_CUSDTUSDT, POOL_CUSDCUSDC in .env; run RegisterDODOPools.s.sol.
A4 Add liquidity to all three PMM pools Op AddLiquidityPMMPoolsChain138.s.sol with ADD_LIQUIDITY_BASE_AMOUNT, ADD_LIQUIDITY_QUOTE_AMOUNT; or run-pmm-full-parity-all-phases.sh with amounts set.
A5 Ensure token-aggregation indexes DODO on 138 Op/Code Set CHAIN_138_DODO_PMM_INTEGRATION in env; run indexer so GET /api/v1/quote returns DODO quotes.
A6 Expose token-aggregation API for dApps/Snap Op Proxy /api/v1/* (e.g. from explorer.d-bis.org) to token-aggregation service; or set GATSBY_SNAP_API_BASE_URL.
A7 (Optional) Deploy EnhancedSwapRouter on 138 Op/Def Only after Uniswap/Balancer pools exist on 138; configure quoter and pool IDs.
A8 (Optional) Add N-hop quote/pathfinding Code Token-aggregation today is single-hop only; add graph-based A→B→C pathfinding if needed.

Flow B: Bridge from Chain 138 (no destination swap)

Goal: User can get bridge routes → (optional) resolve token mapping → send bridge tx 138 → destination.

# Task Type Notes
B1 Ensure CCIP bridges on 138 configured and funded Op CCIPWETH9Bridge, CCIPWETH10Bridge; destinations set; bridges funded with LINK. CONFIG_READY_CHAINS_COMPLETION_RUNBOOK.
B2 Run bridge destination config (138 ↔ Gnosis/Cronos/Celo/Wemix etc.) Op complete-config-ready-chains.sh; fund remote bridges with LINK (fund-ccip-bridges-with-link.sh, check-link-balance-config-ready-chains.sh).
B3 Ensure relay (138→Mainnet) operational if using relay path Op Relay service running; Mainnet CCIPRelayBridge funded with WETH.
B4 Token-aggregation: GET /api/v1/bridge/routes returns correct Chain 138 bridges Code/Op Set BRIDGE_LIST_JSON_URL or built-in routes; verify response has chain138Bridges.
B5 Token mapping API for 138↔destination Code/Op GET /api/v1/token-mapping, token-mapping/resolve; ensure token-mapping-multichain.json or loader includes 138 and target chains.
B6 Frontend/dApp: wire Bridge UI to routes + token mapping Code Use /api/v1/bridge/routes and /api/v1/token-mapping/resolve; show supported tokens and destination addresses.
B7 Test 138→destination and destination→138 with small amounts Op Run T1_2_BRIDGE_RESOLUTION_TASKS § Task 3.5; document tx hashes.

Flow C: Swap on 138 → bridge → swap on destination

Goal: User gets full quote (source swap + bridge + destination swap), then executes (or coordinator does in one tx).

# Task Type Notes
C1 Complete Flow A (liquidity and quote on 138) Prerequisite: swap on 138 must work.
C2 Complete Flow B (bridge configured and funded) Prerequisite: bridge must work.
C3 Orchestration: POST /api/bridge/quote returns sourceSwapQuote and destinationSwapQuote Code/Op Set BRIDGE_REGISTRY_ADDRESS; optional ENHANCED_SWAP_ROUTER_ADDRESS (source), DESTINATION_RPC_URL, DESTINATION_SWAP_ROUTER_ADDRESS. QuoteService already supports optional swap quotes.
C4 (Optional) Deploy SwapBridgeSwapCoordinator on-chain Op One tx: swap (source) → bridge → swap (destination). DODO_PMM_NEXT_STEPS; deploy when full E2E on-chain flow is required.
C5 Destination-chain DEX/aggregator for destinationSwapQuote Code/Op Ensure destination chain has DEX or aggregator API; wire QuoteService to it for destinationSwapQuote.
C6 Frontend: “Get full path quote” and execute (or submit coordinator tx) Code Call POST /api/bridge/quote; display minReceived, sourceSwapQuote, destinationSwapQuote; button to execute steps or coordinator.
C7 E2E test: swap on 138 → bridge → swap on destination Op/Auto Automated or manual test; document success and tx hashes.

Cross-cutting (all flows)

Infrastructure and verification

# Task Type Notes
X1 RPC 2101 (Core) writable and healthy Op RPC_2101_READONLY_FIX; health-check-rpc-2101.sh.
X2 On-chain contract verification (Blockscout) Op run-contract-verification-with-proxy.sh from LAN; DEPLOY_CONFIRM_AND_FULL_E2E_RUNBOOK §2.
X3 E2E routing (DNS + HTTPS + RPC) Auto verify-end-to-end-routing.sh; fix 502s from LAN if needed. TASKS_TO_COMPLETE_AND_FIX.
X4 Explorer E2E (homepage, API, SPA) Auto explorer-monorepo/scripts/e2e-test-explorer.sh; DEPLOY_CONFIRM_AND_FULL_E2E_RUNBOOK §5.
X5 Token-aggregation health and DB Op PostgreSQL/TimescaleDB; indexer running; GET /health and /api/v1/chains succeed.
X6 TransactionMirror (if used) deployed and address in .env Op Deploy via deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh; set TRANSACTION_MIRROR_ADDRESS.
X7 Deployer/admin funded on 138 and on destination chains (for deploy/tests) Op Gas tokens; LINK where needed for bridge fees.

Token list and discovery

# Task Type Notes
X8 Public token list URL for Chain 138 (MetaMask, dApps) Op/Code GET /api/v1/report/token-list?chainId=138 or static list; point MetaMask/dApp to this URL. TOKEN_LIST_AUTHORING_GUIDE.
X9 Canonical token addresses in config and .env Op ADDRESS_MATRIX_AND_STATUS; reconcile config/smart-contracts-master.json and .env.

Multichain (extend flows to L2s)

# Task Type Notes
X10 Deploy cUSDT/cUSDC on each target L2 Op NEXT_STEPS_PMM_FULL_PARITY Phase 2; deploy-cusdt-cusdc-all-chains.sh.
X11 Deploy DODOPMMIntegration + pools + provider + liquidity on each L2 Op deploy-pmm-all-l2s.sh; create pools; deploy provider; register; add liquidity. Enables Flow A and C on L2s.
X12 Token-aggregation and bridge quote support for new chains Code/Op Add chain IDs and RPCs; token mapping for 138↔L2; bridge routes for new chains.

Documentation and runbooks

# Task Type Notes
X13 Update PMM_DEX_ROUTING_STATUS when pools + liquidity are live Doc Set “pools created” and “liquidity added”; update CONTRACT_ADDRESSES / ADDRESS_MATRIX if new addresses.
X14 Runbooks for operator: swap, bridge, swap-bridge-swap Doc Point operators to DEX_AND_AGGREGATORS_CHAIN138_EXPLAINER, CONFIG_READY_CHAINS_COMPLETION_RUNBOOK, NEXT_STEPS_PMM_FULL_PARITY.

Summary by flow

Flow Description Key tasks
A Swap on Chain 138 only A1A6 (RPC, pools, liquidity, token-aggregation, API exposure); A7A8 optional.
B Bridge from 138 B1B7 (CCIP config, funding, relay, routes API, token mapping, UI, test).
C Swap → bridge → swap C1C7 (depends on A+B; quote API with swap quotes; optional coordinator; destination DEX; E2E test).
Cross-cutting Infra, tokens, multichain, docs X1X14.

Execution order (suggested)

  1. Gates: X1 (RPC), X6 (TransactionMirror if needed), X7 (fund deployer).
  2. Flow A: A1 → A2 → A3 → A4 → A5 → A6; then A7A8 if desired.
  3. Flow B: B1 → B2 → B3 → B4 → B5; B6 (frontend); B7 (test).
  4. Flow C: C1, C2 → C3 → C5, C6 → C4 (optional) → C7.
  5. Cross-cutting: X2X5, X8X9 (any time); X10X12 (multichain when ready); X13X14 (docs).

Parallel: A2A4 can use run-pmm-full-parity-all-phases.sh (Phase 1). B1B2 and bridge funding can run per chain in parallel where scripts support it.


Full Parallel execution (waves)

Run all items in a wave in parallel; then run the next wave. Script: ./scripts/run-e2e-flow-tasks-full-parallel.sh (from repo root).

Wave Tasks (run in parallel) Notes
E0 — Gates X1, X6, X7; A1 RPC writable, TransactionMirror, deployer funded; Core RPC reachable. Operator.
E1 — Flow A (Chain 138 DEX) A2, A3, A4 Create pools, register, add liquidity: run-pmm-full-parity-all-phases.sh Phase 1 (internal parallel: pool create, then register, then add).
E2 — Flow B (bridge) B1, B2 CCIP config + destinations; fund bridges: complete-config-ready-chains.sh, fund-ccip-bridges-with-link.sh. Per-chain parallel where supported.
E3 — Code/config (no LAN) A5, B4, B5, C3, X8 Token-aggregation env (CHAIN_138_DODO_PMM_INTEGRATION); bridge routes API; token mapping; quote API; token list URL; reconcile .env.
E4 — Infra/verify X2, X3, X4, X5 Blockscout verify; E2E routing; explorer E2E; token-aggregation health. Operator/LAN.
E5 — Multichain X10, X11, X12 Deploy cUSDT/cUSDC + PMM on L2s; token-aggregation + bridge for new chains. run-pmm-full-parity-all-phases.sh Phase 2 (parallel per chain).
E6 — Frontend + test B6, B7, C5, C6, C7 Wire Bridge UI; test 138↔dest; destination DEX; full path quote UI; E2E test.
E7 — Docs X13, X14 Update PMM_DEX_ROUTING_STATUS; runbooks.

Automated (script): E1 (Phase 1), E2 (per-chain scripts), E3 (env/config edits), E5 (Phase 2). E0, E4, E6 require operator/LAN where indicated.


References

Doc Content
DEX_AND_AGGREGATORS_CHAIN138_EXPLAINER Flows A, B, C and routing
NEXT_STEPS_PMM_FULL_PARITY_AND_ALL_POOLS PMM pools and liquidity
CONFIG_READY_CHAINS_COMPLETION_RUNBOOK CCIP bridge config and LINK
DEPLOY_CONFIRM_AND_FULL_E2E_RUNBOOK Deploy, verify, E2E tests
E2E_COMPLETION_TASKS_DETAILED_LIST Full E2E task breakdown (waves)
PMM_DEX_ROUTING_STATUS DEX/PMM status
scripts/run-e2e-flow-tasks-full-parallel.sh Run E2E flow tasks by wave (full parallel); --dry-run, --wave E1