Files
proxmox/docs/03-deployment/CHAIN138_OFFICIAL_STABLE_BLOCKER_REMOVAL_PATH.md
defiQUG 790e489538
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: FQDN matrix, public-sector baseline, Chain138 runbooks, eIDAS repo reference
Made-with: Cursor
2026-03-27 18:46:56 -07:00

4.5 KiB

Chain 138 Official Stable Blocker Removal Path

Purpose: Remove the last local PMM blocker on Chain 138 by replacing stale placeholder addresses with live quote-side ERC-20 contracts and then redeploying the integration against them.


1. The blocker, stated plainly

The current local PMM path for:

  • cUSDT / USDT
  • cUSDC / USDC

is blocked because the integration is wired to addresses that are not live ERC-20 contracts on Chain 138.

That means:

  • the pools may exist in metadata
  • the integration can still report those addresses
  • but liquidity add and swap flows will fail locally because the quote-side token has no bytecode

2. What is real in the repo today

Live on Chain 138

  • cUSDT
  • cUSDC
  • cXAUC
  • cXAUT
  • DODOPMMIntegration
  • live funded cUSDT / cUSDC
  • live funded XAU-side pools

Not present as live local ERC-20s

  • a real local USDT contract for Chain 138 official-pair PMM use
  • a real local USDC contract for Chain 138 official-pair PMM use

Not valid for this PMM blocker

  • MainnetTether.sol
    • this is a state anchor, not an ERC-20 token
  • StablecoinReserveVault.sol
    • this is for mainnet reserve custody/redemption, not a local Chain 138 quote token

3. Exact contract/deploy path

Step 1. Deploy local Chain 138 quote-side mirrors

Deploy these contracts:

These tokens are:

  • lightweight ERC-20s
  • 6 decimals
  • owner-mintable
  • meant only to provide live local quote-side assets for Chain 138 PMM pools

They are intentionally separate from the compliant token layer.

Step 2. Persist live addresses

Write these into smom-dbis-138/.env:

OFFICIAL_USDT_ADDRESS=0x...
OFFICIAL_USDC_ADDRESS=0x...

Step 3. Redeploy PMM integration against the live local quote assets

Use:

Important: this deploy script no longer falls back to stale hardcoded Chain 138 addresses. The operator must supply real addresses explicitly through env.

Step 4. Create the stable pools on the new integration

Use:

Step 5. Fund in this order

  1. cUSDT / cUSDC
  2. cUSDT / USDT
  3. cUSDC / USDC

Use:


4. Verification gates

Before PMM redeploy:

cast code "$OFFICIAL_USDT_ADDRESS" --rpc-url "$RPC_URL_138"
cast code "$OFFICIAL_USDC_ADDRESS" --rpc-url "$RPC_URL_138"
cast call "$OFFICIAL_USDT_ADDRESS" "symbol()(string)" --rpc-url "$RPC_URL_138"
cast call "$OFFICIAL_USDC_ADDRESS" "symbol()(string)" --rpc-url "$RPC_URL_138"

After PMM redeploy:

cast call "$DODO_PMM_INTEGRATION_ADDRESS" "officialUSDT()(address)" --rpc-url "$RPC_URL_138"
cast call "$DODO_PMM_INTEGRATION_ADDRESS" "officialUSDC()(address)" --rpc-url "$RPC_URL_138"

After pool creation:

cast call "$DODO_PMM_INTEGRATION_ADDRESS" "pools(address,address)(address)" \
  "$COMPLIANT_USDT_ADDRESS" "$OFFICIAL_USDT_ADDRESS" --rpc-url "$RPC_URL_138"

cast call "$DODO_PMM_INTEGRATION_ADDRESS" "pools(address,address)(address)" \
  "$COMPLIANT_USDC_ADDRESS" "$OFFICIAL_USDC_ADDRESS" --rpc-url "$RPC_URL_138"

After funding:

cast call "$OFFICIAL_USDT_ADDRESS" "balanceOf(address)(uint256)" "$POOL_CUSDTUSDT" --rpc-url "$RPC_URL_138"
cast call "$OFFICIAL_USDC_ADDRESS" "balanceOf(address)(uint256)" "$POOL_CUSDCUSDC" --rpc-url "$RPC_URL_138"

5. Recommendation

The safe path is:

  1. stop relying on the stale Chain 138 placeholder addresses
  2. deploy explicit local quote-side mirror tokens
  3. redeploy PMM integration using those real local token addresses
  4. create and fund the stable pools

That is the narrowest change that removes the blocker without redefining the compliant token layer or pretending a non-existent Chain 138 official stable already exists.