Made-with: Cursor
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 / USDTcUSDC / 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
cUSDTcUSDCcXAUCcXAUTDODOPMMIntegration- live funded
cUSDT / cUSDC - live funded XAU-side pools
Not present as live local ERC-20s
- a real local
USDTcontract for Chain 138 official-pair PMM use - a real local
USDCcontract 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
cUSDT / cUSDCcUSDT / USDTcUSDC / 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:
- stop relying on the stale Chain 138 placeholder addresses
- deploy explicit local quote-side mirror tokens
- redeploy PMM integration using those real local token addresses
- 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.