Files
proxmox/docs/runbooks/MAINNET_CWUSDC_USDC_REPEG_RUNBOOK.md
defiQUG dd02f4b59b
All checks were successful
Deploy to Phoenix / validate (push) Successful in 1m11s
Deploy to Phoenix / deploy (push) Successful in 43s
Deploy to Phoenix / deploy-atomic-swap-dapp (push) Successful in 1m32s
phoenix-deploy Deployed to cloudflare-sync
Deploy to Phoenix / cloudflare (push) Successful in 38s
Enhance .env configuration with Infura support and add new RPC endpoints for various networks. Update package.json with new deployment scripts for Engine X. Improve public LP compliance documentation in runbooks and scripts, including guidance for public pair repairs and funding strategies.
2026-05-07 18:19:37 -07:00

3.4 KiB

Mainnet cWUSDC/USDC Repeg Runbook

Purpose: Turn the latest read-only preflight into an exact inventory plan for restoring the Mainnet cWUSDC/USDC rail toward 1:1.
Scope: Defended DODO PMM reserve-gap sizing, public Uniswap V2 floor shortfalls, treasury-manager funding needs, and copy-paste operator commands.
Safety: The planner is read-only. It does not broadcast or move funds.

What this planner answers

  • How far the defended PMM is from simple 1:1 reserve parity
  • How much USDC is needed to fund one max-sized automated defense cycle
  • How far the public pair is below the current policy floor
  • Whether the current operator wallet can cover any of those gaps
  • Exact commands or guidance to fund the manager, top up the defended PMM, and repair the public pair once inventory exists

Prereqs

  • Run the preflight first:
bash scripts/verify/snapshot-mainnet-cwusdc-usdc-preflight.sh
  • cast installed
  • python3 installed
  • ETHEREUM_MAINNET_RPC available
  • Optional but useful:
    • PRIVATE_KEY or KEEPER_PRIVATE_KEY so the planner can inspect the current operator wallet

Command

Run from the repo root:

bash scripts/verify/plan-mainnet-cwusdc-usdc-repeg.sh

Artifacts

The wrapper writes:

  • reports/status/mainnet-cwusdc-usdc-repeg-plan-<UTC timestamp>.json
  • reports/status/mainnet-cwusdc-usdc-repeg-plan-latest.json

Key fields to inspect

  • defendedVenue.simpleReserveParity.addQuoteUnits
  • automation.managerFundingForOneMaxCycle.shortfallUnits
  • publicLane.policyFloorBaseShortfallUnits
  • publicLane.policyFloorQuoteShortfallUnits
  • holderState
  • holderFundingChecks
  • summary.publicIndexedLpComplianceStatus
  • summary.publicPairRepairRequiresQuoteSideAction
  • blockers
  • operatorCommands

Interpretation notes

  • The defended-pool 1:1 number is an inference from matched 6-decimal tokens and equal reserve targets.
  • DODO PMM price can still differ from reserve ratio because the PMM curve is not a constant-product pool.
  • When the public pair is asymmetric, a plain addLiquidity call follows the bad reserve ratio; repair the quote side first, then add balanced liquidity.
  • Aave flash liquidity can be used only as same-block working capital unless eligible collateral or credit delegation leaves a valid debt position. It cannot be counted as durable LP funding after the flash is repaid.
  • Re-run the preflight after every liquidity move. Treat the planner as a live calculator, not a one-time document.

Operator sequence once funding exists

  1. Fund the treasury manager with at least one max-sized automated tranche. Use operatorCommands.fundManagerUsdc.

  2. Sell the planned USDC amount into the defended PMM. Use operatorCommands.tradeDefendedPoolQuoteIn.

  3. Repair the public UniV2 pair if public routing / discovery should be healthy again. Use operatorCommands.publicPairRepairGuidance when only the quote side is short or the reserve-implied price is distorted. Use operatorCommands.reseedPublicPair only when both sides need balanced seeding and the price gate is already acceptable.

  4. Re-run both read-only checks.

bash scripts/verify/snapshot-mainnet-cwusdc-usdc-preflight.sh
bash scripts/verify/plan-mainnet-cwusdc-usdc-repeg.sh
  1. Only after the defended lane is re-funded should you consider a managed quote-push cycle.
bash scripts/maintenance/run-mainnet-cwusdc-usdc-support.sh --health-only