Add mainnet cW remediation sequence helper
All checks were successful
Deploy to Phoenix / deploy (push) Successful in 10s

This commit is contained in:
defiQUG
2026-04-14 18:19:39 -07:00
parent 2acb6ed877
commit 1ba773ed93
3 changed files with 102 additions and 0 deletions

View File

@@ -78,6 +78,10 @@ though large parts of the deployment inventory exist.
- One-command wrapper for the same sequence:
- `bash scripts/deployment/run-mainnet-cw-micro-support-round.sh --dry-run`
- re-run with `--apply` only when you intentionally want to broadcast all four support swaps
- Higher-level operator wrapper for this entire Mainnet PMM lane:
- `bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --mode=full --dry-run`
- mode `micro` = only the four-leg support sweep
- mode `flash-plan` = only the `cWUSDC/USDC` flash quote-push planning branch
- `2026-04-14` dry-run outputs for those exact support sizes:
- `cwusdt-usdt` `8131` raw → `estimatedOut=4038`, `minOut=3997`
- `cwusdc-usdc` `575113` raw → `estimatedOut=159283`, `minOut=157690`

View File

@@ -277,6 +277,15 @@ This runs the currently validated tiny support swaps for `cwusdt-usdt`, `cwusdc-
Re-run with `--apply` only when you intentionally want to broadcast the full four-leg support round.
**Higher-level remediation sequence:**
```bash
bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --dry-run
```
Modes:
- `--mode=micro` for the four-leg support sweep only
- `--mode=flash-plan` for the `cWUSDC/USDC` flash quote-push plan only
- `--mode=full` for both
### 15. Mainnet DODO Wave 1 pool deploy helper
Repeatable helper for creating and seeding a first-tier Mainnet DODO PMM Wave 1 `cW* / USDC` pair.

View File

@@ -0,0 +1,89 @@
#!/usr/bin/env bash
set -euo pipefail
# High-level operator sequence for current Mainnet cW/USD PMM remediation.
#
# Modes:
# - micro: run the validated four-leg tiny support sweep
# - flash-plan: print the cWUSDC/USDC flash quote-push plan
# - full: do both in sequence
#
# Defaults to dry-run/operator-planning behavior.
#
# Usage:
# bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --dry-run
# bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --mode=flash-plan
# bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --mode=micro --apply
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROXMOX_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
MICRO_HELPER="${PROXMOX_ROOT}/scripts/deployment/run-mainnet-cw-micro-support-round.sh"
FLASH_PLAN="${PROXMOX_ROOT}/scripts/deployment/plan-mainnet-cwusdc-flash-quote-push-rebalance.sh"
PEG_READINESS="${PROXMOX_ROOT}/scripts/verify/check-mainnet-pmm-peg-bot-readiness.sh"
BOOTSTRAP_VERIFY="${PROXMOX_ROOT}/scripts/verify/check-mainnet-public-dodo-cw-bootstrap-pools.sh"
MODE="full"
APPLY=0
for arg in "$@"; do
case "$arg" in
--mode=*)
MODE="${arg#*=}"
;;
--dry-run)
APPLY=0
;;
--apply)
APPLY=1
;;
-h|--help)
sed -n '1,22p' "$0"
exit 0
;;
*)
echo "[fail] unknown arg: $arg" >&2
exit 2
;;
esac
done
case "$MODE" in
micro|flash-plan|full)
;;
*)
echo "[fail] unsupported mode: $MODE (use micro, flash-plan, or full)" >&2
exit 2
;;
esac
echo "=== Mainnet cW remediation sequence ==="
echo "mode=$MODE"
echo "apply=$APPLY"
echo
echo "== preflight =="
bash "$BOOTSTRAP_VERIFY"
echo
bash "$PEG_READINESS" || true
if [[ "$MODE" == "micro" || "$MODE" == "full" ]]; then
echo
echo "== micro-support sweep =="
if (( APPLY == 1 )); then
bash "$MICRO_HELPER" --apply
else
bash "$MICRO_HELPER" --dry-run
fi
fi
if [[ "$MODE" == "flash-plan" || "$MODE" == "full" ]]; then
echo
echo "== flash quote-push planning =="
bash "$FLASH_PLAN"
fi
echo
echo "== post-check =="
echo "bash scripts/verify/check-mainnet-pmm-peg-bot-readiness.sh"
echo "bash scripts/verify/check-mainnet-public-dodo-cw-bootstrap-pools.sh"