chore: update liquidity addition instructions and minting process in Chain 138 documentation
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- Enhanced the ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md with detailed minting instructions for cUSDT and cUSDC, including commands for minting and adding liquidity. - Updated TOKENS_AND_NETWORKS_MINTABLE_TO_DEPLOYER.md to reflect the new minting process for PMM liquidity. - Adjusted the amounts in the documentation to clarify base units for liquidity addition. Made-with: Cursor
This commit is contained in:
@@ -3,11 +3,33 @@
|
||||
**Purpose:** Add base/quote liquidity to the three DODO PMM pools on Chain 138 (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC).
|
||||
|
||||
**Prerequisites:**
|
||||
- Deployer has **cUSDT** and **cUSDC** (and optional official USDT/USDC) balance on Chain 138.
|
||||
- Deployer is **owner** of cUSDT and cUSDC contracts (to mint), or already has balance.
|
||||
- `smom-dbis-138/.env` has: `PRIVATE_KEY`, `RPC_URL_138`, `DODO_PMM_INTEGRATION_ADDRESS` (or `DODO_PMM_INTEGRATION`), pool addresses and amounts.
|
||||
|
||||
---
|
||||
|
||||
## 0. Mint tokens for liquidity (if deployer has no balance)
|
||||
|
||||
From `smom-dbis-138/`:
|
||||
|
||||
```bash
|
||||
source .env
|
||||
# Mint 1M cUSDT and 1M cUSDC to deployer (default)
|
||||
./scripts/mint-for-liquidity.sh
|
||||
|
||||
# Mint custom amounts (human units)
|
||||
MINT_CUSDT_AMOUNT=2000000 MINT_CUSDC_AMOUNT=2000000 ./scripts/mint-for-liquidity.sh
|
||||
|
||||
# Mint then add liquidity in one go (uses half of minted for cUSDT/cUSDC pool)
|
||||
./scripts/mint-for-liquidity.sh --add-liquidity
|
||||
```
|
||||
|
||||
Deployer must be the **owner** of both cUSDT and cUSDC contracts (onlyOwner can mint). Amounts use 6 decimals internally (1M tokens = 1_000_000 × 10^6 base units).
|
||||
|
||||
**If mint fails:** Ensure `RPC_URL_138` is reachable and deployer is owner (`cast call <CUSDT> "owner()(address)" --rpc-url $RPC_URL_138`). Alternative: use `./scripts/mint-to-750m.sh both <deployer_address>` to mint 749M each (one-time top-up to 750M supply).
|
||||
|
||||
---
|
||||
|
||||
## 1. Set pool addresses and amounts in .env
|
||||
|
||||
Add or set in `smom-dbis-138/.env`:
|
||||
@@ -18,9 +40,9 @@ POOL_CUSDTCUSDC=0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8
|
||||
POOL_CUSDTUSDT=0xa3Ee6091696B28e5497b6F491fA1e99047250c59
|
||||
POOL_CUSDCUSDC=0x90bd9Bf18Daa26Af3e814ea224032d015db58Ea5
|
||||
|
||||
# Amounts (6 decimals; e.g. 1000000 = 1 USDT/USDC)
|
||||
ADD_LIQUIDITY_BASE_AMOUNT=1000000
|
||||
ADD_LIQUIDITY_QUOTE_AMOUNT=1000000
|
||||
# Amounts in base units (6 decimals): 1M tokens = 1000000000000
|
||||
ADD_LIQUIDITY_BASE_AMOUNT=1000000000000
|
||||
ADD_LIQUIDITY_QUOTE_AMOUNT=1000000000000
|
||||
```
|
||||
|
||||
Optional per-pool overrides: `ADD_LIQUIDITY_CUSDTCUSDC_BASE`, `ADD_LIQUIDITY_CUSDTCUSDC_QUOTE`, etc.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
LISTEN 0 5 0.0.0.0:3000 0.0.0.0:* users:(("python3",pid=1013,fd=3))
|
||||
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=130,fd=14))
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"vmid": 10150,
|
||||
"hostname": "dbis-api-primary",
|
||||
"host": "r630-01",
|
||||
"host_ip": "192.168.11.11",
|
||||
"expected_ip": "192.168.11.155",
|
||||
"actual_ip": "192.168.11.155",
|
||||
"status": "running",
|
||||
"has_nginx": false,
|
||||
"service_type": "nodejs",
|
||||
"config_path": "3000",
|
||||
"public_domains": ["dbis-api.d-bis.org"],
|
||||
"services": [{"name":"nodejs-api","type":"systemd","status":"running"}],
|
||||
"listening_ports": [{"port":3000,"protocol":"tcp","process":"nodejs"}],
|
||||
"health_endpoints": [{"path":"http://192.168.11.155:3000","expected_code":200,"actual_code":000000,"status":"fail"}],
|
||||
"verified_at": "2026-03-02T14:22:03-08:00"
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
LISTEN 0 5 0.0.0.0:3000 0.0.0.0:* users:(("python3",pid=1017,fd=3))
|
||||
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=130,fd=14))
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"vmid": 10151,
|
||||
"hostname": "dbis-api-secondary",
|
||||
"host": "r630-01",
|
||||
"host_ip": "192.168.11.11",
|
||||
"expected_ip": "192.168.11.156",
|
||||
"actual_ip": "192.168.11.156",
|
||||
"status": "running",
|
||||
"has_nginx": false,
|
||||
"service_type": "nodejs",
|
||||
"config_path": "3000",
|
||||
"public_domains": ["dbis-api-2.d-bis.org"],
|
||||
"services": [{"name":"nodejs-api","type":"systemd","status":"running"}],
|
||||
"listening_ports": [{"port":3000,"protocol":"tcp","process":"nodejs"}],
|
||||
"health_endpoints": [{"path":"http://192.168.11.156:3000","expected_code":200,"actual_code":000000,"status":"fail"}],
|
||||
"verified_at": "2026-03-02T14:22:13-08:00"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=98,fd=14))
|
||||
LISTEN 0 511 0.0.0.0:80 0.0.0.0:* users:(("nginx",pid=204,fd=12),("nginx",pid=203,fd=12),("nginx",pid=202,fd=12),("nginx",pid=201,fd=12),("nginx",pid=200,fd=12))
|
||||
LISTEN 0 511 0.0.0.0:443 0.0.0.0:* users:(("nginx",pid=204,fd=14),("nginx",pid=203,fd=14),("nginx",pid=202,fd=14),("nginx",pid=201,fd=14),("nginx",pid=200,fd=14))
|
||||
LISTEN 0 511 127.0.0.1:8080 0.0.0.0:* users:(("nginx",pid=204,fd=18),("nginx",pid=203,fd=18),("nginx",pid=202,fd=18),("nginx",pid=201,fd=18),("nginx",pid=200,fd=18))
|
||||
LISTEN 0 100 127.0.0.1:25 0.0.0.0:* users:(("master",pid=302,fd=13))
|
||||
LISTEN 0 511 0.0.0.0:8443 0.0.0.0:* users:(("nginx",pid=204,fd=16),("nginx",pid=203,fd=16),("nginx",pid=202,fd=16),("nginx",pid=201,fd=16),("nginx",pid=200,fd=16))
|
||||
LISTEN 0 511 [::]:80 [::]:* users:(("nginx",pid=204,fd=13),("nginx",pid=203,fd=13),("nginx",pid=202,fd=13),("nginx",pid=201,fd=13),("nginx",pid=200,fd=13))
|
||||
LISTEN 0 4096 *:22 *:* users:(("systemd",pid=1,fd=31))
|
||||
LISTEN 0 511 [::]:443 [::]:* users:(("nginx",pid=204,fd=15),("nginx",pid=203,fd=15),("nginx",pid=202,fd=15),("nginx",pid=201,fd=15),("nginx",pid=200,fd=15))
|
||||
LISTEN 0 100 [::1]:25 [::]:* users:(("master",pid=302,fd=14))
|
||||
LISTEN 0 4096 *:9545 *:* users:(("java",pid=918,fd=355))
|
||||
LISTEN 0 511 [::]:8443 [::]:* users:(("nginx",pid=204,fd=17),("nginx",pid=203,fd=17),("nginx",pid=202,fd=17),("nginx",pid=201,fd=17),("nginx",pid=200,fd=17))
|
||||
LISTEN 0 4096 *:8546 *:* users:(("java",pid=918,fd=357))
|
||||
LISTEN 0 4096 *:8545 *:* users:(("java",pid=918,fd=356))
|
||||
LISTEN 0 4096 *:30303 *:* users:(("java",pid=918,fd=358))
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"vmid": 2101,
|
||||
"hostname": "besu-rpc-core-1",
|
||||
"host": "r630-01",
|
||||
"host_ip": "192.168.11.11",
|
||||
"expected_ip": "192.168.11.211",
|
||||
"actual_ip": "192.168.11.211",
|
||||
"status": "running",
|
||||
"has_nginx": false,
|
||||
"service_type": "besu",
|
||||
"config_path": "8545,8546",
|
||||
"public_domains": ["rpc-http-prv.d-bis.org","rpc-ws-prv.d-bis.org"],
|
||||
"services": [{"name":"besu-rpc","type":"direct","status":"running"}],
|
||||
"listening_ports": [{"port":8545,"protocol":"tcp","process":"besu"},{"port":8546,"protocol":"tcp","process":"besu"}],
|
||||
"health_endpoints": [{"path":"http://192.168.11.211:8545","expected_code":200,"actual_code":200,"status":"pass"}],
|
||||
"verified_at": "2026-03-02T14:21:42-08:00"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
LISTEN 0 100 127.0.0.1:25 0.0.0.0:* users:(("master",pid=269,fd=13))
|
||||
LISTEN 0 511 0.0.0.0:80 0.0.0.0:* users:(("nginx",pid=3598,fd=6),("nginx",pid=3597,fd=6),("nginx",pid=3596,fd=6),("nginx",pid=3595,fd=6),("nginx",pid=123,fd=6))
|
||||
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=102,fd=14))
|
||||
LISTEN 0 100 [::1]:25 [::]:* users:(("master",pid=269,fd=14))
|
||||
LISTEN 0 4096 *:22 *:* users:(("systemd",pid=1,fd=37))
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"vmid": 7810,
|
||||
"hostname": "mim-web-1",
|
||||
"host": "r630-02",
|
||||
"host_ip": "192.168.11.12",
|
||||
"expected_ip": "192.168.11.37",
|
||||
"actual_ip": "192.168.11.37",
|
||||
"status": "running",
|
||||
"has_nginx": true,
|
||||
"service_type": "nginx",
|
||||
"config_path": "/etc/nginx/sites-available/mim4u",
|
||||
"public_domains": ["mim4u.org","www.mim4u.org","secure.mim4u.org","training.mim4u.org"],
|
||||
"services": [{"name":"nginx","type":"systemd","status":"active"}],
|
||||
"listening_ports": [],
|
||||
"health_endpoints": [{"path":"http://192.168.11.37:80","expected_code":200,"actual_code":200,"status":"pass"}],
|
||||
"verified_at": "2026-03-02T14:21:51-08:00"
|
||||
}
|
||||
@@ -42,16 +42,28 @@ On **Chain 138**, the deployer is **owner** of all compliant token contracts dep
|
||||
|
||||
### 1.2 How to mint on Chain 138
|
||||
|
||||
**Option A — cUSDT / cUSDC (existing script):**
|
||||
**Option A — Mint for PMM liquidity (recommended for add-liquidity):**
|
||||
|
||||
```bash
|
||||
cd smom-dbis-138
|
||||
source .env
|
||||
# Mint 1M cUSDT and 1M cUSDC to deployer (default)
|
||||
./scripts/mint-for-liquidity.sh
|
||||
# Custom amounts (human units)
|
||||
MINT_CUSDT_AMOUNT=2000000 MINT_CUSDC_AMOUNT=2000000 ./scripts/mint-for-liquidity.sh
|
||||
# Mint then add liquidity in one go
|
||||
./scripts/mint-for-liquidity.sh --add-liquidity
|
||||
```
|
||||
|
||||
See [ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK](../03-deployment/ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md) §0.
|
||||
|
||||
**Option A2 — cUSDT / cUSDC (top-up to 750M supply):**
|
||||
|
||||
```bash
|
||||
cd smom-dbis-138
|
||||
source .env
|
||||
# Mint 749M of each to deployer (or use custom amount/recipient)
|
||||
./scripts/mint-to-750m.sh both 0x4A666F96fC8764181194447A7dFdb7d471b301C8
|
||||
# Or per token:
|
||||
./scripts/mint-to-750m.sh usdt 0x4A666F96fC8764181194447A7dFdb7d471b301C8
|
||||
./scripts/mint-to-750m.sh usdc 0x4A666F96fC8764181194447A7dFdb7d471b301C8
|
||||
# Or per token: ./scripts/mint-to-750m.sh usdt <recipient> ./scripts/mint-to-750m.sh usdc <recipient>
|
||||
```
|
||||
|
||||
**Option B — Any compliant token via cast (owner = deployer):**
|
||||
|
||||
Reference in New Issue
Block a user