Compare commits
3 Commits
sync/curre
...
devin/1777
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ebb056869 | ||
|
|
9286a95fce | ||
|
|
9e0795dbc4 |
@@ -10,9 +10,23 @@ alwaysApply: true
|
||||
- **cUSDT:** `0x93E66202A11B1772E55407B32B44e5Cd8eda7f22` (6 decimals)
|
||||
- **cUSDC:** `0xf22258f57794CC8E06237084b353Ab30fFfa640b` (6 decimals)
|
||||
|
||||
**DODOPMMIntegration:** `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` — reconciled with `docs/11-references/ADDRESS_MATRIX_AND_STATUS.md` (on-chain verification 2026-03-26); `compliantUSDT()` / `compliantUSDC()` return the canonical cUSDT/cUSDC above.
|
||||
**DODOPMMIntegration (live, traded):** `0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895` — confirmed live via on-chain probe (2026-04-22): `compliantUSDT()` / `compliantUSDC()` return the canonical cUSDT/cUSDC above; `pools[][]` mapping resolves to the live funded pool set below; `isRegisteredPool` is TRUE for all 8 pools listed under "PMM pools (live, traded)". `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` is a parallel deployment of the same source with different immutables and seeded but un-traded pools — do not wire dApps or routers to it.
|
||||
|
||||
**PMM pools (live funded public):** cUSDT/cUSDC `0xff8d3b8fDF7B112759F076B69f4271D4209C0849` | cUSDT/USDT `0x6fc60DEDc92a2047062294488539992710b99D71` | cUSDC/USDC `0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263` — see `docs/11-references/ADDRESS_MATRIX_AND_STATUS.md` / `PMM_DEX_ROUTING_STATUS.md`.
|
||||
**DODOPMMProvider (ILiquidityProvider, live):** `0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e` — `dodoIntegration() == 0x86ADA6Ef…`, `providerName() == "DODO PMM"`, `isKnownPool` TRUE for all 8 live pools. Use this address as `dodoLiquidityProvider` when deploying `EnhancedSwapRouter`; see `docs/11-references/PMM_DEX_ROUTING_STATUS.md`.
|
||||
|
||||
**PMM pools (live, traded — 2026-04-22 on-chain probe):**
|
||||
- cUSDT/cUSDC `0x9e89bAe009adf128782E19e8341996c596ac40dC` (~983k cUSDT / ~1.016M cUSDC, asymmetric — actively traded)
|
||||
- cUSDT/USDT `0x866Cb44b59303d8dc5f4F9E3E7A8e8b0bf238d66` (~1M / ~1M)
|
||||
- cUSDC/USDC `0xc39B7D0F40838cbFb54649d327f49a6DAC964062` (~1M / ~1M)
|
||||
- cBTC/cUSDT `0x67049e7333481e2cac91af61403ac7bddfab7bcd` (10k cBTC base / 9M cUSDT quote)
|
||||
- cBTC/cUSDC `0x72f1a0794153c3b8a1e8a731f1d8e1a52cb10dc5` (10k cBTC base / 9M cUSDC quote)
|
||||
- WETH/USDC `0xb53a0508940b1ff90f1aad4f6cb50a7012fe5593` (~10.1M USDC quote)
|
||||
- WETH/USDT `0xe227f6c0520c0c6e8786fe56fa76c4914f861533` (~10.1M USDT quote)
|
||||
- cBTC/cXAUC `0xf3e8a07d419b61f002114e64d79f7cf8f7989433` (10k cBTC base / 1.7k cXAUC quote)
|
||||
|
||||
The earlier rule's pool addresses (`0xff8d3b8f…`, `0x6fc60D…`, `0x9f74Be…`) belong to the **parallel** integration `0x5BDc62f1…` (Stack B) and are seeded 10M/10M flat or 0/0 — they are not the live PMM trading set. Source-of-truth corrections to follow in `ADDRESS_MATRIX_AND_STATUS.md` and `PMM_DEX_ROUTING_STATUS.md`.
|
||||
|
||||
**cBTC:** `0xe94260c555ac1d9d3cc9e1632883452ebdf0082e` (8 decimals) — base token of the three cBTC pools above.
|
||||
|
||||
**cXAUC / cXAUT (XAU):** `0x290E52a8819A4fbD0714E517225429aA2B70EC6b`, `0x94e408E26c6FD8F4ee00b54dF19082FDA07dC96E` (6 decimals). **1 full token = 1 troy ounce Au** — not USD face value; see `EXPLORER_TOKEN_LIST_CROSSCHECK.md` section 5.1.
|
||||
|
||||
|
||||
210
.gitea/workflows/bootstrap-phoenix-deploy-api.yml
Normal file
210
.gitea/workflows/bootstrap-phoenix-deploy-api.yml
Normal file
@@ -0,0 +1,210 @@
|
||||
name: Bootstrap Phoenix Deploy API
|
||||
|
||||
# Reinstalls phoenix-deploy-api on the dev VM (CT 5700) with the latest server.js
|
||||
# from master. This is the missing link between "code on master is the real
|
||||
# implementation" and "running service on CT 5700 still has the stub". Run this
|
||||
# workflow_dispatch job whenever phoenix-deploy-api/server.js, deploy-targets.json
|
||||
# or related scripts change and you need the running service to pick up the change
|
||||
# without a manual LAN visit.
|
||||
#
|
||||
# Required Gitea repo secrets (Settings -> Secrets):
|
||||
# PHOENIX_PVE_HOST PVE node IP that hosts CT 5700 (e.g. 192.168.11.12)
|
||||
# PHOENIX_PVE_USER SSH user on the PVE node (default: root)
|
||||
# PHOENIX_PVE_SSH_KEY Private SSH key (PEM, OpenSSH format) authorised on the PVE node
|
||||
# PHOENIX_PVE_KNOWN_HOSTS Pre-populated known_hosts entry for the PVE node (avoids strict-host prompt)
|
||||
# PHOENIX_DEV_VM_VMID Container VMID (default: 5700)
|
||||
# PHOENIX_DEPLOY_DEV_VM_IP IP of the dev VM for the post-install health check (default: 192.168.11.59)
|
||||
# PHOENIX_DEPLOY_URL Phoenix deploy webhook URL (already used by deploy job)
|
||||
# PHOENIX_DEPLOY_TOKEN Bearer token for the webhook (already used by deploy job)
|
||||
#
|
||||
# Trigger only via Gitea UI (Actions tab -> "Bootstrap Phoenix Deploy API" -> Run
|
||||
# workflow). NOT triggered on push: reinstalling the deploy service is sensitive
|
||||
# enough that we want it gated behind a manual click.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
verify_only:
|
||||
description: "If true, only run the post-install /health + auth probe and skip the reinstall step."
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
bootstrap:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout proxmox repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Validate repo layout
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -d phoenix-deploy-api || { echo "phoenix-deploy-api/ missing" >&2; exit 1; }
|
||||
test -f phoenix-deploy-api/server.js
|
||||
test -f phoenix-deploy-api/scripts/install-systemd.sh
|
||||
test -f phoenix-deploy-api/deploy-targets.json
|
||||
# Manifest is optional; warn if missing but do not fail.
|
||||
if [ ! -f config/public-sector-program-manifest.json ]; then
|
||||
echo "::warning::config/public-sector-program-manifest.json missing — install will warn on CT"
|
||||
fi
|
||||
# Make sure the running master implementation is NOT the stub message
|
||||
# that triggered this whole bootstrap thread.
|
||||
if grep -q "Deploy request queued (stub)" phoenix-deploy-api/server.js; then
|
||||
echo "phoenix-deploy-api/server.js still contains the stub string — refusing to bootstrap." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install SSH key for PVE access
|
||||
if: ${{ github.event.inputs.verify_only != 'true' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p "$HOME/.ssh"
|
||||
chmod 700 "$HOME/.ssh"
|
||||
umask 077
|
||||
printf '%s\n' "${{ secrets.PHOENIX_PVE_SSH_KEY }}" > "$HOME/.ssh/id_pve"
|
||||
chmod 600 "$HOME/.ssh/id_pve"
|
||||
if [ -n "${{ secrets.PHOENIX_PVE_KNOWN_HOSTS }}" ]; then
|
||||
printf '%s\n' "${{ secrets.PHOENIX_PVE_KNOWN_HOSTS }}" > "$HOME/.ssh/known_hosts"
|
||||
chmod 644 "$HOME/.ssh/known_hosts"
|
||||
else
|
||||
# Fall back to accept-new on first connect; subsequent connects pin.
|
||||
touch "$HOME/.ssh/known_hosts"
|
||||
chmod 644 "$HOME/.ssh/known_hosts"
|
||||
fi
|
||||
|
||||
- name: Build deploy bundle
|
||||
if: ${{ github.event.inputs.verify_only != 'true' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p .out
|
||||
if [ -f config/public-sector-program-manifest.json ]; then
|
||||
tar czf .out/pda-deploy-bundle.tar.gz \
|
||||
phoenix-deploy-api \
|
||||
config/public-sector-program-manifest.json
|
||||
else
|
||||
tar czf .out/pda-deploy-bundle.tar.gz phoenix-deploy-api
|
||||
fi
|
||||
ls -lh .out/pda-deploy-bundle.tar.gz
|
||||
|
||||
- name: scp bundle to PVE host
|
||||
if: ${{ github.event.inputs.verify_only != 'true' }}
|
||||
env:
|
||||
PVE_HOST: ${{ secrets.PHOENIX_PVE_HOST }}
|
||||
PVE_USER: ${{ secrets.PHOENIX_PVE_USER }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
: "${PVE_HOST:?PHOENIX_PVE_HOST not set in repo secrets}"
|
||||
PVE_USER_VAL="${PVE_USER:-root}"
|
||||
KNOWN_HOSTS_OPT="-o UserKnownHostsFile=$HOME/.ssh/known_hosts"
|
||||
if [ ! -s "$HOME/.ssh/known_hosts" ]; then
|
||||
KNOWN_HOSTS_OPT="$KNOWN_HOSTS_OPT -o StrictHostKeyChecking=accept-new"
|
||||
else
|
||||
KNOWN_HOSTS_OPT="$KNOWN_HOSTS_OPT -o StrictHostKeyChecking=yes"
|
||||
fi
|
||||
scp -i "$HOME/.ssh/id_pve" $KNOWN_HOSTS_OPT \
|
||||
-o ConnectTimeout=20 \
|
||||
.out/pda-deploy-bundle.tar.gz \
|
||||
"${PVE_USER_VAL}@${PVE_HOST}:/tmp/pda-deploy-bundle.tar.gz"
|
||||
|
||||
- name: pct push + install-systemd on CT
|
||||
if: ${{ github.event.inputs.verify_only != 'true' }}
|
||||
env:
|
||||
PVE_HOST: ${{ secrets.PHOENIX_PVE_HOST }}
|
||||
PVE_USER: ${{ secrets.PHOENIX_PVE_USER }}
|
||||
VMID: ${{ secrets.PHOENIX_DEV_VM_VMID }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
: "${PVE_HOST:?PHOENIX_PVE_HOST not set in repo secrets}"
|
||||
PVE_USER_VAL="${PVE_USER:-root}"
|
||||
VMID_VAL="${VMID:-5700}"
|
||||
KNOWN_HOSTS_OPT="-o UserKnownHostsFile=$HOME/.ssh/known_hosts"
|
||||
if [ ! -s "$HOME/.ssh/known_hosts" ]; then
|
||||
KNOWN_HOSTS_OPT="$KNOWN_HOSTS_OPT -o StrictHostKeyChecking=accept-new"
|
||||
else
|
||||
KNOWN_HOSTS_OPT="$KNOWN_HOSTS_OPT -o StrictHostKeyChecking=yes"
|
||||
fi
|
||||
ssh -i "$HOME/.ssh/id_pve" $KNOWN_HOSTS_OPT \
|
||||
-o ConnectTimeout=20 \
|
||||
"${PVE_USER_VAL}@${PVE_HOST}" "VMID=${VMID_VAL} bash -s" <<'REMOTE_EOF'
|
||||
set -euo pipefail
|
||||
: "${VMID:?}"
|
||||
# Verify CT exists and is running.
|
||||
if ! pct status "${VMID}" >/dev/null 2>&1; then
|
||||
echo "CT ${VMID} not found on this PVE node." >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! pct exec "${VMID}" -- true 2>/dev/null; then
|
||||
echo "CT ${VMID} not running. Start it first: pct start ${VMID}" >&2
|
||||
exit 1
|
||||
fi
|
||||
STAGE="/tmp/proxmox-pda-stage"
|
||||
pct push "${VMID}" /tmp/pda-deploy-bundle.tar.gz /root/pda-deploy.tar.gz
|
||||
pct exec "${VMID}" -- bash -c "
|
||||
set -euo pipefail
|
||||
rm -rf '${STAGE}'
|
||||
mkdir -p '${STAGE}'
|
||||
tar xzf /root/pda-deploy.tar.gz -C '${STAGE}'
|
||||
cd '${STAGE}'
|
||||
bash phoenix-deploy-api/scripts/install-systemd.sh
|
||||
rm -f /root/pda-deploy.tar.gz
|
||||
"
|
||||
rm -f /tmp/pda-deploy-bundle.tar.gz
|
||||
REMOTE_EOF
|
||||
|
||||
- name: Health check (no auth)
|
||||
env:
|
||||
DEV_VM_IP: ${{ secrets.PHOENIX_DEPLOY_DEV_VM_IP }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
IP="${DEV_VM_IP:-192.168.11.59}"
|
||||
# Service may take a moment to come up after install; retry briefly.
|
||||
for i in 1 2 3 4 5 6; do
|
||||
if curl -sSf -m 5 "http://${IP}:4001/health" -o /tmp/health.json; then
|
||||
echo "Health check OK on attempt ${i}"
|
||||
cat /tmp/health.json || true
|
||||
echo
|
||||
break
|
||||
fi
|
||||
echo "Health check attempt ${i}/6 failed; sleeping 3s"
|
||||
sleep 3
|
||||
if [ "${i}" = "6" ]; then
|
||||
echo "Phoenix Deploy API /health unreachable after install." >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Auth + non-stub probe (POST with bogus target)
|
||||
env:
|
||||
PHOENIX_DEPLOY_URL: ${{ secrets.PHOENIX_DEPLOY_URL }}
|
||||
PHOENIX_DEPLOY_TOKEN: ${{ secrets.PHOENIX_DEPLOY_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
: "${PHOENIX_DEPLOY_URL:?}"
|
||||
: "${PHOENIX_DEPLOY_TOKEN:?}"
|
||||
# POST a bogus target. The post-bootstrap server should:
|
||||
# - accept the bearer token (NOT 401)
|
||||
# - reject the unknown target with a non-stub error
|
||||
# The pre-bootstrap stub returned 202 with "Deploy request queued (stub)"
|
||||
# for ANY target. So we explicitly check the response body does NOT
|
||||
# contain that stub phrase.
|
||||
BODY="$(curl -sS -m 10 -X POST "${PHOENIX_DEPLOY_URL}" \
|
||||
-H "Authorization: Bearer ${PHOENIX_DEPLOY_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"repo":"d-bis/proxmox","sha":"HEAD","branch":"master","target":"__bootstrap_probe__"}' || true)"
|
||||
echo "Response body:"
|
||||
echo "${BODY}"
|
||||
if echo "${BODY}" | grep -q 'Deploy request queued (stub)'; then
|
||||
echo "::error::Phoenix Deploy API still returning stub response — bootstrap did not take effect."
|
||||
exit 1
|
||||
fi
|
||||
if echo "${BODY}" | grep -qi 'unauthorized\|invalid token\|401'; then
|
||||
echo "::error::Phoenix Deploy API rejected the bearer token. PHOENIX_DEPLOY_TOKEN is out of sync with PHOENIX_DEPLOY_SECRET on the CT."
|
||||
exit 1
|
||||
fi
|
||||
echo "Phoenix Deploy API is post-stub and authenticating correctly."
|
||||
|
||||
- name: Cleanup secrets
|
||||
if: always()
|
||||
run: |
|
||||
rm -f "$HOME/.ssh/id_pve" "$HOME/.ssh/known_hosts" || true
|
||||
@@ -119,6 +119,40 @@ For webhook signing, the bootstrap/helper path also expects:
|
||||
|
||||
Do not enable both repo Actions deploys and webhook deploys for the same repo unless you intentionally want duplicate deploy attempts.
|
||||
|
||||
### 3a. Bootstrap workflow secrets (one-time per CT)
|
||||
|
||||
The reinstall workflow `.gitea/workflows/bootstrap-phoenix-deploy-api.yml`
|
||||
ships the latest `phoenix-deploy-api/` from `master` to CT 5700 via
|
||||
scp + `pct push` and re-runs `install-systemd.sh`. This is the path you
|
||||
take when the running service on the CT is older than the code on
|
||||
`master` (e.g. it still returns the "Deploy request queued (stub)"
|
||||
message). Trigger via the Gitea Actions UI → "Bootstrap Phoenix Deploy
|
||||
API" → Run workflow.
|
||||
|
||||
Required secrets (in addition to the deploy secrets above):
|
||||
|
||||
- `PHOENIX_PVE_HOST` — PVE node IP that hosts CT 5700 (e.g.
|
||||
`192.168.11.12` for `r630-02`).
|
||||
- `PHOENIX_PVE_USER` — SSH user on the PVE node (default `root`).
|
||||
- `PHOENIX_PVE_SSH_KEY` — Private SSH key (OpenSSH format) authorised
|
||||
on the PVE node. Use a dedicated deploy key, not your personal key.
|
||||
- `PHOENIX_PVE_KNOWN_HOSTS` — Pre-populated `known_hosts` line for the
|
||||
PVE host (skip strict-host-key prompt). Optional; if absent the
|
||||
workflow uses `accept-new` on first connect.
|
||||
- `PHOENIX_DEV_VM_VMID` — Container VMID (default `5700`).
|
||||
- `PHOENIX_DEPLOY_DEV_VM_IP` — IP of the dev VM for the post-install
|
||||
health check (default `192.168.11.59`).
|
||||
|
||||
After a successful run the workflow performs a non-stub probe: it POSTs
|
||||
`{ "target": "__bootstrap_probe__" }` with the deploy bearer token and
|
||||
fails the workflow if the response body still contains
|
||||
`Deploy request queued (stub)` or any auth-rejection signal. That gives
|
||||
you an unambiguous "the running service on CT 5700 is now post-stub"
|
||||
signal in CI logs.
|
||||
|
||||
The workflow only triggers on `workflow_dispatch` (never on push) so
|
||||
deploy-service reinstalls remain a deliberate manual step.
|
||||
|
||||
## Adding more repos or VM targets
|
||||
|
||||
Extend [deploy-targets.json](/home/intlc/projects/proxmox/phoenix-deploy-api/deploy-targets.json) with another entry.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Address Matrix and Status — Correlated Reference
|
||||
|
||||
**Last Updated:** 2026-03-26
|
||||
**Purpose:** Single correlated matrix of all existing contract, token, and pool addresses with deployment status. **On-chain verification (2026-03-26):** corrected Chain 138 PMM stack verified at `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`; desired-state inventory is fully reconciled with `104` existing pools and `104` aligned routes.
|
||||
**Last Updated:** 2026-04-22
|
||||
**Purpose:** Single correlated matrix of all existing contract, token, and pool addresses with deployment status. **On-chain verification (2026-04-22):** the **live, traded** Chain 138 PMM stack is `DODOPMMIntegration=0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895` + `DODOPMMProvider=0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e`. A second parallel deployment (`DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` + `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`) exists with seeded but un-traded pools — do not wire dApps or routers to it. Earlier docs that cited the `0x5BDc62f1…` stack as canonical were superseded by this re-verification.
|
||||
**Sources:** CONTRACT_ADDRESSES_REFERENCE, CHAIN138_TOKEN_ADDRESSES, LIQUIDITY_POOLS_MASTER_MAP, DEPLOYED_COINS_TOKENS_AND_NETWORKS, env examples, PRE_DEPLOYMENT_CHECKLIST.
|
||||
|
||||
---
|
||||
@@ -108,12 +108,22 @@
|
||||
|
||||
| Contract / pool | Address | Status | Notes |
|
||||
|-----------------|---------|--------|-------|
|
||||
| DODOPMMIntegration | `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` | ✅ | Corrected canonical integration; full JSON desired-state reconciled |
|
||||
| DODOPMMProvider | `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381` | ✅ | Corrected canonical provider; 104 aligned routes |
|
||||
| DODOPMMIntegration (Stack A, live) | `0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895` | ✅ | Live, traded integration; backs all 8 active PMM pools (2026-04-22 on-chain probe) |
|
||||
| DODOPMMProvider (Stack A, live) | `0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e` | ✅ | `dodoIntegration() == 0x86ADA6Ef…`, `providerName() == "DODO PMM"`, `isKnownPool` TRUE for all 8 Stack A pools |
|
||||
| DODOPMMIntegration (Stack B, parallel) | `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` | ⚠ | Same source, different immutables; pools seeded but un-traded — do not wire dApps/routers to it |
|
||||
| DODOPMMProvider (Stack B, parallel) | `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381` | ⚠ | Pairs with the Stack B integration; superseded by Stack A for canonical use |
|
||||
| PrivatePoolRegistry | `0xb27057B27db09e8Df353AF722c299f200519882A` | ✅ | Live private XAU pool registry |
|
||||
| Pool cUSDT/cUSDC | `0xff8d3b8fDF7B112759F076B69f4271D4209C0849` | ✅ | Funded live |
|
||||
| Pool cUSDT/USDT (official mirror) | `0x6fc60DEDc92a2047062294488539992710b99D71` | ✅ | Intended funded canonical pool; integration/provider mapping must be repointed if still on older empty pool |
|
||||
| Pool cUSDC/USDC (official mirror) | `0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263` | ✅ | Canonical corrected-stack pool |
|
||||
| Pool cUSDT/cUSDC (Stack A, traded) | `0x9e89bAe009adf128782E19e8341996c596ac40dC` | ✅ | Live, asymmetric balances (≈983.9k cUSDT / ≈1.016M cUSDC) — actively traded |
|
||||
| Pool cUSDT/USDT (Stack A) | `0x866Cb44b59303d8dc5f4F9E3E7A8e8b0bf238d66` | ✅ | Live (≈1M / ≈1M) |
|
||||
| Pool cUSDC/USDC (Stack A) | `0xc39B7D0F40838cbFb54649d327f49a6DAC964062` | ✅ | Live (≈1M / ≈1M) |
|
||||
| Pool cBTC/cUSDT (Stack A) | `0x67049e7333481e2cac91af61403ac7bddfab7bcd` | ✅ | Live (10k cBTC / 9M cUSDT) |
|
||||
| Pool cBTC/cUSDC (Stack A) | `0x72f1a0794153c3b8a1e8a731f1d8e1a52cb10dc5` | ✅ | Live (10k cBTC / 9M cUSDC) |
|
||||
| Pool WETH/USDC (Stack A) | `0xb53a0508940b1ff90f1aad4f6cb50a7012fe5593` | ✅ | Live (≈10.1M USDC quote) |
|
||||
| Pool WETH/USDT (Stack A) | `0xe227f6c0520c0c6e8786fe56fa76c4914f861533` | ✅ | Live (≈10.1M USDT quote) |
|
||||
| Pool cBTC/cXAUC (Stack A) | `0xf3e8a07d419b61f002114e64d79f7cf8f7989433` | ✅ | Live (10k cBTC / 1.74k cXAUC) |
|
||||
| Pool cUSDT/cUSDC (Stack B, seeded) | `0xff8d3b8fDF7B112759F076B69f4271D4209C0849` | ⚠ | 10M / 10M flat — not traded; superseded by Stack A pool above |
|
||||
| Pool cUSDT/USDT (Stack B, seeded) | `0x6fc60DEDc92a2047062294488539992710b99D71` | ⚠ | 10M / 10M flat — not traded; superseded by Stack A pool above |
|
||||
| Pool cUSDC/USDC (Stack B, empty) | `0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263` | ⚠ | 0 / 0 zero liquidity; superseded by Stack A pool above |
|
||||
| Pool cUSDT/cXAUC (public) | `0x1AA55E2001E5651349AfF5A63FD7A7Ae44f0F1b0` | ✅ | Funded live |
|
||||
| Pool cUSDC/cXAUC (public) | `0xEA9Ac6357CaCB42a83b9082B870610363B177cBa` | ✅ | Funded live |
|
||||
| Pool cEURT/cXAUC (public) | `0xbA99bc1eAAC164569d5AcA96C806934DDaF970Cf` | ✅ | Funded live |
|
||||
@@ -121,7 +131,7 @@
|
||||
| Pool cUSDC/cXAUC (private) | `0x7867D58567948e5b9908F1057055Ee4440de0851` | ✅ | Funded live |
|
||||
| Pool cEURT/cXAUC (private) | `0x505403093826D494983A93b43Aa0B8601078A44e` | ✅ | Funded live |
|
||||
| LiquidityPoolETH (trustless) | — | ❌ | Placeholder 0x0 |
|
||||
| EnhancedSwapRouter | — | ❌ | Not deployed |
|
||||
| EnhancedSwapRouter | `0xE6Cc7643ae2A4C720A28D8263BC4972905d7DE0f` | ✅ | Deployed 2026-04-22 (Phase 3, EVM Paris). UniV3 + Balancer + DODO Stack-A wired; Curve disabled; 1inch slot inert. 11 DODO pools registered in `dodoPoolAddresses[tokenA][tokenB]` bidirectionally — 8 at deploy, 3 cBTC pools (cBTC/cUSDT, cBTC/cUSDC, cBTC/cXAUC) added Phase 3j (2026-04-22) via `setDodoPoolAddress(...)`. Balancer pool ids still pending per-pair config. |
|
||||
|
||||
### 1.7 TransactionMirror / deployer
|
||||
|
||||
@@ -193,8 +203,8 @@ Bridges (CCIPWETH9 / CCIPWETH10) and LINK funding per runbook. Addresses in `smo
|
||||
|
||||
| Env variable (Chain 138) | Canonical address |
|
||||
|--------------------------|-------------------|
|
||||
| DODO_PMM_INTEGRATION_ADDRESS | `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` |
|
||||
| DODO_PMM_PROVIDER_ADDRESS | `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381` |
|
||||
| DODO_PMM_INTEGRATION_ADDRESS | `0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895` (Stack A, live) |
|
||||
| DODO_PMM_PROVIDER_ADDRESS | `0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e` (Stack A, live) |
|
||||
| PRIVATE_POOL_REGISTRY | `0xb27057B27db09e8Df353AF722c299f200519882A` |
|
||||
| POOL_CUSDTCUSDC | `0xff8d3b8fDF7B112759F076B69f4271D4209C0849` |
|
||||
| POOL_CUSDTUSDT | `0x6fc60DEDc92a2047062294488539992710b99D71` |
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
# PMM Liquidity Pools & DEX/DeFi Routing — Full System Status
|
||||
|
||||
**Last Updated:** 2026-03-26
|
||||
**Last Updated:** 2026-04-22
|
||||
**Purpose:** Single reference for DEX/DeFi and PMM liquidity pool routing — what is designed, deployed, and in use.
|
||||
|
||||
---
|
||||
|
||||
## Executive summary (updated 2026-03-26)
|
||||
## Executive summary (updated 2026-04-22)
|
||||
|
||||
- **DODOPMMIntegration** is **deployed** on Chain 138 at `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`. The corrected canonical stack now has **104 desired-state pools aligned**.
|
||||
- **DODOPMMProvider** is **deployed** at `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381` with **104/104 provider routes aligned** to the integration.
|
||||
- **Live funded public pools** are: cUSDT/cUSDC (`0xff8d3b8fDF7B112759F076B69f4271D4209C0849`), cUSDT/USDT (`0x6fc60DEDc92a2047062294488539992710b99D71`), cUSDC/USDC (`0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263`), cUSDT/cXAUC (`0x94316511621430423a2cff0C036902BAB4aA70c2`), cUSDC/cXAUC (`0x7867D58567948e5b9908F1057055Ee4440de0851`), cEURT/cXAUC (`0x505403093826D494983A93b43Aa0B8601078A44e`).
|
||||
- **EnhancedSwapRouter** is **not deployed**; multi-provider DEX routing (Uniswap/Balancer/Curve/1inch) is not live.
|
||||
- **Two parallel DODOPMM deployments exist on Chain 138.** On-chain probe (2026-04-22) shows the **live, traded** stack is **Stack A**:
|
||||
- **DODOPMMIntegration (Stack A)** `0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895` — 8 registered, actively-traded pools.
|
||||
- **DODOPMMProvider (Stack A)** `0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e` — wired to Stack A integration; `isKnownPool` TRUE for all 8 Stack A pools.
|
||||
- The **Stack B** stack (`DODOPMMIntegration=0x5BDc62f1…` / `DODOPMMProvider=0x5CAe6Ce1…`) is a parallel deployment with seeded but un-traded pools (10M/10M flat, cUSDC/USDC at 0/0). Do **not** wire dApps or routers to Stack B. Earlier docs that cited Stack B as canonical were superseded by this re-verification.
|
||||
- **Live funded, traded Stack-A pools (2026-04-22 probe):** cUSDT/cUSDC `0x9e89bAe0…`, cUSDT/USDT `0x866Cb44b…`, cUSDC/USDC `0xc39B7D0F…`, cBTC/cUSDT `0x67049e73…`, cBTC/cUSDC `0x72f1a079…`, WETH/USDC `0xb53a0508…`, WETH/USDT `0xe227f6c0…`, cBTC/cXAUC `0xf3e8a07d…`. The funded XAU pools `0x9431…`/`0x7867…`/`0x5054…` remain live but on the legacy XAU registry, not the Stack A integration.
|
||||
- **EnhancedSwapRouter** is **deployed** at `0xE6Cc7643ae2A4C720A28D8263BC4972905d7DE0f` on Chain 138 (Phase 3, 2026-04-22, EVM version Paris per `[profile.chain138]` in `smom-dbis-138/foundry.toml`). Wired immutables: UniV3 `0xde9cD8ee…`, Dodoex `0x86ADA6Ef…` (Stack A), Balancer `0x96423d7C…`, 1inch `0x500B84b1…`, Curve disabled. `dodoLiquidityProvider = 0x3f729632…`. **11 DODO pools registered** in `dodoPoolAddresses[tokenA][tokenB]` bidirectionally (8 at deploy + 3 cBTC pools added Phase 3j 2026-04-22). Curve and 1inch slots remain inert; Balancer wiring is configured but functional pool ids must be set per-pair via `setBalancerPoolId(...)` before Balancer routing engages.
|
||||
- **Phase 1 / 2 dApp work (2026-04-22):** the atomic-swap dApp at `https://atomic-swap.defi-oracle.io/` was failing because its quote handler ignored 4 of 6 protocols. PR #2 (mobile bridge + max-approve) and PR #4 (routing-honesty + protocol/executor mismatch chip) addressed the UI side; this stack-A canonicalization addresses the on-chain side.
|
||||
- **Token-aggregation** service is implemented and runnable (single-hop quotes; can index DODO pools). **Bridge quote API** (swap+bridge+swap) is implemented.
|
||||
- **Full system status:** PMM liquidity and DODOPMMProvider routing are **deployed and in use** on Chain 138. Remaining: add liquidity to pools as needed; optionally deploy EnhancedSwapRouter when other DEX pools exist on 138.
|
||||
- **Optional items completed (2026-02-27 / 2026-03-01):** DeployCompliantFiatTokens (10 tokens on 138); Blockscout verification run; MCP allowlist-138 (`ai-mcp-pmm-controller/config/allowlist-138.json`); add-liquidity runbook ([ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK](../03-deployment/ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md)); token-aggregation canonical fallbacks for cEURC/cEURT/cGBP*/cAUDC/cJPYC/cCHFC/cCADC/cXAU*; ENV_EXAMPLE_CONTENT + CREATE2_FACTORY_ADDRESS; E2E routing verification run.
|
||||
@@ -45,10 +48,13 @@
|
||||
|
||||
| Component | Status | Address / Notes |
|
||||
|-----------|--------|------------------|
|
||||
| **DODOPMMIntegration** | Deployed | `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` — corrected canonical integration. |
|
||||
| **PMM pools (desired-state)** | **104 aligned** | Full desired-state JSON reconciled; live funded public pools are listed in [LIQUIDITY_POOLS_MASTER_MAP](LIQUIDITY_POOLS_MASTER_MAP.md). |
|
||||
| **DODOPMMProvider** | **Deployed** | `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`; 104/104 routes aligned to the corrected integration. |
|
||||
| **EnhancedSwapRouter** | Not deployed | Deploy when Uniswap/Balancer pools exist on 138; configure quoter and Balancer poolId. |
|
||||
| **DODOPMMIntegration (Stack A, live)** | Deployed | `0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895` — canonical, actively traded; backs all 8 Stack-A pools. |
|
||||
| **DODOPMMProvider (Stack A, live)** | Deployed | `0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e`; `isKnownPool` TRUE for all 8 Stack-A pools; use as `dodoLiquidityProvider` for `EnhancedSwapRouter`. |
|
||||
| **DODOPMMIntegration (Stack B, parallel)** | Deployed | `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` — same source, different immutables; pools seeded but un-traded; do not wire to it. |
|
||||
| **DODOPMMProvider (Stack B, parallel)** | Deployed | `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381` — pairs with Stack B integration; superseded by Stack A. |
|
||||
| **PMM pools (Stack A, traded)** | Live | 8 pools registered + traded. See [ADDRESS_MATRIX_AND_STATUS](ADDRESS_MATRIX_AND_STATUS.md) §1.6. |
|
||||
| **PMM pools (Stack B, seeded)** | Live but un-traded | 3 pools at flat 10M/10M (or 0/0). Superseded by Stack A. |
|
||||
| **EnhancedSwapRouter** | Deployed | `0xE6Cc7643ae2A4C720A28D8263BC4972905d7DE0f` on Chain 138 (Phase 3, 2026-04-22, EVM Paris). UniV3 + Balancer + DODO Stack A wired; Curve/1inch slots inert; 11 DODO pools registered (8 at deploy + 3 cBTC pools Phase 3j). Balancer pool ids still pending per-pair `setBalancerPoolId(...)`. |
|
||||
| **LiquidityPoolETH** (trustless bridge) | Placeholder | Not deployed; config uses `0x0`. |
|
||||
|
||||
**Doc note:** [LIQUIDITY_POOLS_MASTER_MAP.md](LIQUIDITY_POOLS_MASTER_MAP.md) and [ADDRESS_MATRIX_AND_STATUS.md](ADDRESS_MATRIX_AND_STATUS.md) list pool and DODOPMMProvider addresses. DEX_AND_CROSS_CHAIN_CONTRACTS_NEEDED reflects DODOPMMIntegration deployed and pools created.
|
||||
@@ -59,7 +65,7 @@
|
||||
|-----------|--------|--------|
|
||||
| **Token-aggregation service** | Implemented & runnable | Indexes UniswapV2/V3 and DODO when `CHAIN_138_DODO_PMM_INTEGRATION` is set (set in smom-dbis-138/.env). Single-hop quote only; no N-hop pathfinding. |
|
||||
| **Orchestration QuoteService** | Implemented | `POST /api/bridge/quote` with optional source/destination swap quotes; requires bridge registry and optional EnhancedSwapRouter addresses. |
|
||||
| **Liquidity Engine (backend)** | Implemented | Depends on EnhancedSwapRouter being deployed; not usable for routing until router is live. |
|
||||
| **Liquidity Engine (backend)** | Implemented | EnhancedSwapRouter is now deployed; backend can resolve DODO-registered pairs through `swapTokenToToken(...)`. Multi-provider routing (UniV3 / Balancer / 1inch) needs per-pair pool/quoter config before it engages. |
|
||||
|
||||
### 2.3 Swap–bridge–swap & trustless stack
|
||||
|
||||
@@ -82,7 +88,7 @@
|
||||
| Capability | Available? | Where |
|
||||
|------------|------------|--------|
|
||||
| Single-hop quote (API) | Yes | `GET /api/v1/quote` (best direct pool for tokenIn/tokenOut) |
|
||||
| Multi-provider choice (one leg) | No (router not deployed) | EnhancedSwapRouter would provide WETH↔stable across Uniswap/Dodo/Balancer/Curve/1inch |
|
||||
| Multi-provider choice (one leg) | Partial — router deployed, only DODO Stack-A active | EnhancedSwapRouter `0xE6Cc7643…` exposes `swapTokenToToken(tokenIn,tokenOut,amountIn,minOut)`; routes for the 11 registered DODO pairs work today. UniV3 / Balancer / 1inch slots wired but not yet driving liquidity (no pools / no pool ids). |
|
||||
| N-hop path (A→B→C on one chain) | No | No graph-based multi-hop swap API or on-chain pathfinder |
|
||||
| Swap–bridge–swap (cross-chain) | Yes (orchestration) | QuoteService; on-chain coordinator deployable when needed |
|
||||
| DODO PMM on-chain swaps | **Yes** | Pools created; DODOPMMProvider deployed; use getQuote/executeSwap or DODOPMMIntegration swap functions. |
|
||||
@@ -94,16 +100,16 @@
|
||||
| Area | Ready? | In use? |
|
||||
|------|--------|--------|
|
||||
| **PMM liquidity pools (Chain 138)** | **Yes** | Corrected canonical stack deployed; 104 desired-state pools aligned; live funded public stable/XAU pools available. |
|
||||
| **DEX routing (EnhancedSwapRouter)** | No | Contract not deployed; no Uniswap/Balancer pools on 138. |
|
||||
| **DEX routing (EnhancedSwapRouter)** | Partial | Contract deployed at `0xE6Cc7643…`; DODO Stack-A path live for 11 pairs; UniV3/Balancer/1inch slots wired but inactive (no native pools / no pool ids on 138). |
|
||||
| **Token-aggregation API** | Yes | Service can run; single-hop quotes; can index DODO pools once DODOPMMIntegration has pools. |
|
||||
| **Bridge quote (swap+bridge+swap)** | Partial | QuoteService implemented; coordinator and router optional; not full E2E flow. |
|
||||
| **Liquidity Engine (decision logic)** | No | Depends on EnhancedSwapRouter. |
|
||||
| **Liquidity Engine (decision logic)** | Partial | Router deployed; decision logic can drive DODO Stack-A leg today. UniV3 / Balancer / 1inch arms inactive until pools/quoter/poolId are configured. |
|
||||
| **Cross-chain cW* PMM mesh** | No | Design/simulation only; edge pools and bots not deployed. |
|
||||
|
||||
**Conclusion:** PMM liquidity and DODOPMMProvider routing **are** deployed and in use on Chain 138. What is in place:
|
||||
|
||||
- **Live:** DODOPMMIntegration (Mock DVM), **three PMM pools created**, **DODOPMMProvider deployed** with pools registered, token-aggregation service, bridge/orchestration quote API.
|
||||
- **Remaining:** Add liquidity to pools as needed; deploy EnhancedSwapRouter when Uniswap/Balancer pools exist on 138.
|
||||
- **Remaining:** Configure Balancer pool ids per pair (`setBalancerPoolId(...)`) and add UniV3/1inch-routable native pools on Chain 138 to activate the non-DODO arms of the router.
|
||||
- **Optional / later:** Full trustless stack (LiquidityPoolETH, etc.), cross-chain cW* edge pools and bots.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user