Files
proxmox/docs/03-deployment/PMM_POOLS_FUNDING_PLAN.md
defiQUG dbd517b279 Sync workspace: config, docs, scripts, CI, operator rules, and submodule pointers.
- Update dbis_core, cross-chain-pmm-lps, explorer-monorepo, metamask-integration, pr-workspace/chains
- Omit embedded publish git dirs and empty placeholders from index

Made-with: Cursor
2026-04-12 06:12:20 -07:00

7.3 KiB

PMM Pools Funding Plan - Chain 138

Historical note (2026-04-02): this funding plan documents an earlier three-pool PMM phase. The live canonical Chain 138 PMM stack is DODOPMMIntegration=0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895 and DODOPMMProvider=0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e. Current public funded pool addresses are maintained in LIQUIDITY_POOLS_MASTER_MAP.md.

Purpose: Step-by-step plan to fund the three DODO PMM liquidity pools on Chain 138. Deployer: 0x4A666F96fC8764181194447A7dFdb7d471b301C8 Integration: DODOPMMIntegration at 0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895


1. The three pools

Pool Base token Quote token Pool address Fund when
1. cUSDT/cUSDC cUSDT cUSDC 0x9e89bAe009adf128782E19e8341996c596ac40dC Deployer has cUSDT + cUSDC (mintable)
2. cUSDT/USDT cUSDT USDT (official mirror) 0x866Cb44b59303d8dc5f4F9E3E7A8e8b0bf238d66 Deployer has cUSDT + official USDT mirror
3. cUSDC/USDC cUSDC USDC (official mirror) 0xc39B7D0F40838cbFb54649d327f49a6DAC964062 Deployer has cUSDC + official USDC mirror
  • Pool 1 uses only c* tokens; you can mint both on Chain 138 and fund fully.
  • Pools 2 and 3 need "official" USDT/USDC on 138 (set in DODOPMMIntegration at deploy time). If those are deployer-owned mocks, mint them too; otherwise fund only from existing balance.

2. Token addresses (Chain 138)

Token Address Mintable by deployer?
cUSDT 0x93E66202A11B1772E55407B32B44e5Cd8eda7f22 Yes (owner)
cUSDC 0xf22258f57794CC8E06237084b353Ab30fFfa640b Yes (owner)
Official USDT From integration: cast call INT "officialUSDT()(address)" Depends (check owner)
Official USDC From integration: cast call INT "officialUSDC()(address)" Depends (check owner)

3. Current state (as of 2026-03-02)

  • Pool 1 (cUSDT/cUSDC): Already funded with 500,000 cUSDT and 500,000 cUSDC (single addLiquidity tx).
  • Pools 2 and 3: Not funded yet (require deployer balance of official USDT/USDC on 138).
  • Deployer c supply:* 1M+ of each c* minted (including cUSDT, cUSDC) via mint-all-c-star-138.sh and earlier mints.

4. Funding plan options

Use only cUSDT and cUSDC; no official USDT/USDC needed.

Step Action Command / notes
1 Ensure deployer has enough cUSDT and cUSDC Mint if needed: ./scripts/mint-for-liquidity.sh or ./scripts/mint-all-c-star-138.sh [amount]
2 Decide amount per side (base units, 6 decimals) e.g. 1M each = 1000000000000 (1e12)
3 Approve integration to spend cUSDT and cUSDC See section 5 below (cast) or run add-liquidity script
4 Add liquidity to Pool 1 addLiquidity(POOL_CUSDTCUSDC, baseAmount, quoteAmount) via cast or Forge script

Plan B - Fund all three pools

Requires deployer to hold official USDT and USDC on Chain 138 (in addition to cUSDT/cUSDC).

Step Action Command / notes
1 Check deployer balances ./scripts/deployment/check-deployer-balance-chain138-and-funding-plan.sh
2 Mint cUSDT/cUSDC (and official USDT/USDC if deployer is owner) ./scripts/mint-for-liquidity.sh; mint official tokens if contracts allow
3 Set .env amounts ADD_LIQUIDITY_BASE_AMOUNT, ADD_LIQUIDITY_QUOTE_AMOUNT; optionally per-pool overrides
4 Add liquidity to all three pools Forge script (if it compiles) or three separate cast addLiquidity calls

Plan C - "Half of balance" rule (from existing doc)

Use 50% of deployer cUSDT and cUSDC for liquidity; keep the rest for gas/other use.

  1. Run: RPC_URL_138= ./scripts/deployment/check-deployer-balance-chain138-and-funding-plan.sh
  2. Copy the printed ADD_LIQUIDITY_BASE_AMOUNT and ADD_LIQUIDITY_QUOTE_AMOUNT (half of current balances) into smom-dbis-138/.env
  3. Add liquidity (Pool 1 only if you do not have official USDT/USDC) per section 5.

5. Commands to add liquidity

Prereqs: smom-dbis-138/.env with PRIVATE_KEY, RPC_URL_138. Deployer must hold at least the amounts you add.

Option 1 - Cast (reliable; use if Forge script fails)

From repo root, with smom-dbis-138/.env sourced:

cd smom-dbis-138 && source .env

INT=0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895
POOL1=0x9e89bAe009adf128782E19e8341996c596ac40dC
CUSDT=0x93E66202A11B1772E55407B32B44e5Cd8eda7f22
CUSDC=0xf22258f57794CC8E06237084b353Ab30fFfa640b
RPC="$RPC_URL_138"
MAX=0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

# Approve (once per token)
cast send "$CUSDT" "approve(address,uint256)" "$INT" "$MAX" --rpc-url "$RPC" --private-key "$PRIVATE_KEY" --legacy --gas-limit 100000
cast send "$CUSDC" "approve(address,uint256)" "$INT" "$MAX" --rpc-url "$RPC" --private-key "$PRIVATE_KEY" --legacy --gas-limit 100000

# Add liquidity to Pool 1 (amounts in base units, 6 decimals; e.g. 1M = 1000000000000)
BASE_AMOUNT=1000000000000
QUOTE_AMOUNT=1000000000000
cast send "$INT" "addLiquidity(address,uint256,uint256)" "$POOL1" "$BASE_AMOUNT" "$QUOTE_AMOUNT" --rpc-url "$RPC" --private-key "$PRIVATE_KEY" --legacy --gas-limit 500000

Option 2 - Forge script (if it compiles)

cd smom-dbis-138 && source .env
export POOL_CUSDTCUSDC=0x9e89bAe009adf128782E19e8341996c596ac40dC
export ADD_LIQUIDITY_BASE_AMOUNT=1000000000000
export ADD_LIQUIDITY_QUOTE_AMOUNT=1000000000000

forge script script/dex/AddLiquidityPMMPoolsChain138.s.sol:AddLiquidityPMMPoolsChain138 \
  --rpc-url "$RPC_URL_138" --broadcast --private-key "$PRIVATE_KEY" --with-gas-price 1000000000 --legacy

Option 3 - Mint and add in one go (Pool 1 only)

./scripts/mint-for-liquidity.sh --add-liquidity

Uses half of minted amounts for Pool 1; requires DODO_PMM_INTEGRATION and pool addresses set in smom-dbis-138/.env.


6. Suggested amounts (Pool 1)

Goal Base (cUSDT) Quote (cUSDC) Base units each (6 decimals)
Light 100,000 100,000 100000000000
Medium 500,000 500,000 500000000000
Heavy 1,000,000 1,000,000 1000000000000
Already added 500,000 500,000 (done)

You can run the Add liquidity step multiple times to add more (e.g. another 500k/500k for Pool 1).


7. Checklist summary

  • 1. Run check-deployer-balance-chain138-and-funding-plan.sh and note half-balance amounts.
  • 2. Mint cUSDT/cUSDC if needed: ./scripts/mint-for-liquidity.sh or ./scripts/mint-all-c-star-138.sh
  • 3. (Optional) If funding Pools 2 and 3: obtain or mint official USDT/USDC on 138; approve integration.
  • 4. Approve cUSDT and cUSDC to DODOPMMIntegration (see section 5 Option 1).
  • 5. Add liquidity to Pool 1 (and optionally Pools 2 and 3) via cast or Forge script.
  • 6. Verify on explorer: pool balances or LP tokens for deployer.

8. References

  • ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md - Add-liquidity runbook
  • docs/11-references/DEPLOYER_WALLET_FUNDING_PLAN_PMM_POOLS.md - Deployer balances and 50% rule
  • docs/11-references/LIQUIDITY_POOLS_MASTER_MAP.md - Pool addresses and status
  • docs/11-references/TOKENS_AND_NETWORKS_MINTABLE_TO_DEPLOYER.md - How to mint c* on 138