From 6ae8590134bf89db82f12fa7ccdc5f4d797c0bac Mon Sep 17 00:00:00 2001 From: defiQUG Date: Tue, 14 Apr 2026 17:27:39 -0700 Subject: [PATCH] Tighten mainnet PMM bootstrap verification --- ...EV_CHAIN138_ALL_MAINNET_ROLLOUT_TRACKER.md | 6 +++ ...-mainnet-public-dodo-cw-bootstrap-pools.sh | 41 +++++++++++++++++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/docs/04-configuration/MEV_CHAIN138_ALL_MAINNET_ROLLOUT_TRACKER.md b/docs/04-configuration/MEV_CHAIN138_ALL_MAINNET_ROLLOUT_TRACKER.md index 0b447bd4..c957578f 100644 --- a/docs/04-configuration/MEV_CHAIN138_ALL_MAINNET_ROLLOUT_TRACKER.md +++ b/docs/04-configuration/MEV_CHAIN138_ALL_MAINNET_ROLLOUT_TRACKER.md @@ -44,6 +44,11 @@ It is intentionally split into: - Re-run result after the fix: - `cWUSDT/cWUSDC` now resolves and reads healthy reserves - readiness gate now ends with `4 hard failure(s), 0 warning(s)` +- `2026-04-14` `check-mainnet-public-dodo-cw-bootstrap-pools.sh` now passes after + downgrading operator-wallet balance shortages from false failures to warnings. +- Same bootstrap verifier surfaced one env/registry drift: + - registry-authoritative `cWUSDC/USDC` pool is `0x69776fc607e9edA8042e320e7e43f54d06c68f0E` + - some env/default flows still reference legacy pool `0xB227dDA4e89E2EA63A1345509C9AC02644e8d526` This means Mainnet public PMM operation is not yet in a fully healthy state even though large parts of the deployment inventory exist. @@ -146,6 +151,7 @@ though large parts of the deployment inventory exist. - rebalance `cWUSDC/USDC` - rebalance `cWUSDT/USDT` - rebalance `cWUSDC/USDT` + - reconcile remaining legacy `POOL_CWUSDC_USDC_MAINNET` env/default references with the registry-authoritative pool 6. Publish the final ALL Mainnet native venue matrix before trying to wire full MEV discovery there. ## Truthful Completion Condition diff --git a/scripts/verify/check-mainnet-public-dodo-cw-bootstrap-pools.sh b/scripts/verify/check-mainnet-public-dodo-cw-bootstrap-pools.sh index 7b8de094..84a8c9b3 100755 --- a/scripts/verify/check-mainnet-public-dodo-cw-bootstrap-pools.sh +++ b/scripts/verify/check-mainnet-public-dodo-cw-bootstrap-pools.sh @@ -53,6 +53,7 @@ pairs=( ) failures=0 +warnings=0 echo "=== Mainnet Public DODO cW Bootstrap Pools ===" echo "Integration: $INTEGRATION" @@ -92,13 +93,40 @@ for row in "${pairs[@]}"; do continue fi - dry_run_output="$( + dry_run_output="" + dry_run_status=0 + if ! dry_run_output="$( bash "${REPO_ROOT}/scripts/deployment/run-mainnet-public-dodo-cw-swap.sh" \ --pair="$pair" \ --direction="$direction" \ --amount="$amount" \ - --dry-run - )" + --dry-run 2>&1 + )"; then + dry_run_status=$? + fi + + if (( dry_run_status != 0 )); then + if grep -q 'insufficient input-token balance' <<<"$dry_run_output"; then + echo "- $pair" + echo " pool=$pool" + if [[ -n "$configured_pool" && "${configured_pool,,}" != "${pool,,}" ]]; then + echo " note=env_pool_overridden_by_registry" + echo " configuredPool=$configured_pool" + fi + echo " mappedPool=$mapped_pool" + echo " reserves=$base_reserve/$quote_reserve" + echo " dryRunDirection=$direction" + echo " dryRunAmount=$amount" + echo " warning=operator_wallet_lacks_input_balance_for_dry_run" + warnings=$((warnings + 1)) + continue + fi + + echo "[fail] $pair dry-run quote failed" >&2 + printf '%s\n' "$dry_run_output" >&2 + failures=$((failures + 1)) + continue + fi quote_source="$(printf '%s\n' "$dry_run_output" | awk -F= '/^quoteSource=/ {print $2}')" estimated_out="$(printf '%s\n' "$dry_run_output" | awk -F= '/^estimatedOut=/ {print $2}')" @@ -121,9 +149,14 @@ done if (( failures > 0 )); then echo - echo "[WARN] Bootstrap pool verification found $failures issue(s)." >&2 + echo "[WARN] Bootstrap pool verification found $failures issue(s) and $warnings warning(s)." >&2 exit 1 fi echo +if (( warnings > 0 )); then + echo "Result: all 11 recorded Mainnet public DODO cW bootstrap pools are mapped and funded; $warnings dry-run check(s) were skipped because the operator wallet lacked the input token." + exit 0 +fi + echo "Result: all 11 recorded Mainnet public DODO cW bootstrap pools are mapped, funded, and dry-run routable."