- Marked submodules ai-mcp-pmm-controller, explorer-monorepo, and smom-dbis-138 as dirty to reflect recent changes. - Updated documentation to clarify operator script usage, including dotenv loading and task execution instructions. - Enhanced the README and various index files to provide clearer navigation and task completion guidance. Made-with: Cursor
6.6 KiB
Smart Contracts and Blockchains for MCP Token/Pool Addresses
Purpose: What smart contracts must exist on which blockchains so the 5701 MCP hub can be given pool and token addresses in its allowlist.
MCP behavior: The MCP does not deploy contracts. It reads from existing contracts. You configure config/allowlist.json with one chain (e.g. arbitrum) and a list of pools; each pool has pool_address, base_token, quote_token, and profile. The MCP calls RPC on that chain to read pool state (getMidPrice, getOraclePrice, reserves, etc.) and token decimals. So every address in the allowlist must point to an already-deployed contract on the chosen chain.
1. What the MCP needs per pool
| Field | Meaning | Must exist on chain |
|---|---|---|
| pool_address | PMM pool contract (DODO-style: getMidPrice, getOraclePrice, getBaseReserve, getQuoteReserve, K, LP_FEE_RATE, etc.) | Yes — one contract per pool |
| base_token | Base asset (e.g. cWUSDT, cUSDT) — ERC-20 | Yes |
| quote_token | Quote asset (e.g. USDC, USDT) — ERC-20 | Yes |
The MCP supports one chain at a time via CHAIN and RPC_URL. To support multiple chains you run multiple MCP instances (or one allowlist per chain and switch config).
2. Chain 138 (SMOM-DBIS-138)
| Item | Status | Notes |
|---|---|---|
| DODOPMMIntegration | Deployed | 0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D — creates and owns PMM pools |
| Pools | Created via integration | Call createPool / createCUSDTCUSDCPool etc.; pool addresses from creation or pools(base, quote) |
| Base tokens (cUSDT, cUSDC, …) | Deployed (core) | e.g. cUSDT 0x93E66202A11B1772E55407B32B44e5Cd8eda7f22, cUSDC 0xf22258f57794CC8E06237084b353Ab30fFfa640b (see CHAIN138_TOKEN_ADDRESSES) |
| Quote tokens (USDT, USDC) | On-chain | Use addresses from Chain 138 config / token API |
Contracts you need to have (so the MCP has addresses):
- Already deployed: DODOPMMIntegration; core compliant tokens (cUSDT, cUSDC, etc.).
- You must do: Create pools via DODOPMMIntegration (
createCUSDTCUSDCPool,createPool(cUSDT, USDT, ...), etc.). Then put in the MCP allowlist: each pool’s address, and the base/quote token addresses used for that pool.
No additional smart contracts need to be deployed for the MCP beyond what already exists on 138; you only need to create pools from the existing integration and then configure the MCP allowlist with those pool and token addresses.
3. Other blockchains (public chains with cW* design)
The cross-chain-pmm-lps design assumes per-chain cW* (bridged) tokens and hub stables (USDC/USDT), with single-sided PMM pools (cW* / hub) on each chain. config/pool-matrix.json and config/deployment-status.json list the chains and pairs. Today deployment-status.json has no addresses filled for these chains (1, 56, 137, 10, 100, 25, 42161, 42220, 1111, 43114, 8453).
So that the MCP can have token and pool addresses on a given public chain, the following must exist (be deployed or already there):
| What | Who deploys / source | Notes |
|---|---|---|
| cW tokens* (cWUSDT, cWUSDC, …) | Bridge (e.g. CCIP) or custom wrapper | Bridged representation of Chain 138 compliant tokens; address per chain. |
| Hub stables (USDC, USDT, …) | Usually already exist | Native Circle/Tether (or chain canonical) deployments; use canonical address per chain. |
| PMM pool contracts (one per pair) | You or DODO | DODO-style pool with getMidPrice, getOraclePrice, reserves, k, fee. Either: (a) deploy your own PMM factory + pools (e.g. DODO Vending Machine–compatible or custom), or (b) use existing DODO deployments on that chain if they match the MCP’s dodo_pmm_v2_like profile. |
Blockchains in the design (pool-matrix / deployment-status):
- 1 — Ethereum Mainnet
- 10 — Optimism
- 25 — Cronos
- 56 — BSC (BNB Chain)
- 100 — Gnosis Chain
- 137 — Polygon
- 1111 — Wemix
- 8453 — Base
- 42161 — Arbitrum One
- 42220 — Celo
- 43114 — Avalanche C-Chain
For each chain where you want the MCP to work you need:
- Token contracts: Addresses for the cW* tokens (and any other base tokens) and for the hub quote tokens (USDC/USDT, etc.) on that chain.
- Pool contracts: At least one PMM pool per pair you want to manage (e.g. cWUSDT/USDC, cWUSDC/USDC). Each pool must expose the view functions expected by the MCP’s pool profile (e.g.
dodo_pmm_v2_like).
So: no new chain-specific contracts are “for the MCP” itself; the MCP only needs addresses of tokens and pools that already exist. On public chains those tokens and pools either must be deployed by you (or your bridge/PMM stack) or come from existing protocols (e.g. DODO) that match the MCP’s interface.
4. Summary table — “What must be deployed so the MCP has addresses”
| Blockchain | Smart contracts / actions needed so MCP has addresses |
|---|---|
| Chain 138 | DODOPMMIntegration already deployed. Create pools via it (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC, etc.). Use existing cUSDT/cUSDC and chain USDT/USDC addresses. No extra contract deployment required. |
| Ethereum (1), BSC (56), Polygon (137), Optimism (10), Gnosis (100), Cronos (25), Arbitrum (42161), Base (8453), Celo (42220), Wemix (1111), Avalanche (43114) | (1) cW token* addresses on that chain (via your bridge or wrapper). (2) Hub stable addresses (USDC/USDT — usually exist). (3) PMM pool contracts per pair (deploy DODO-style or use existing DODO on that chain). Until these exist and are recorded (e.g. in deployment-status or allowlist), the MCP has nothing to point at on that chain. |
5. References
- AI_AGENTS_57XX_MCP_ADDENDUM.md — Multi-chain MCP, Uniswap pool profile, dashboard/API alignment, automation triggers
- MCP allowlist shape:
ai-mcp-pmm-controller/config/allowlist.json - MCP pool profile (view methods):
ai-mcp-pmm-controller/config/pool_profiles.json - Chain 138 tokens:
docs/11-references/CHAIN138_TOKEN_ADDRESSES.md - Chain 138 DODO:
smom-dbis-138/docs/integration/DODO_PMM_INTEGRATION.md,smom-dbis-138/docs/deployment/DEPLOYED_CONTRACTS_OVERVIEW.md - Per-chain pool design:
cross-chain-pmm-lps/config/pool-matrix.json,cross-chain-pmm-lps/config/deployment-status.json - DEX/pool gaps:
docs/11-references/DEX_AND_CROSS_CHAIN_CONTRACTS_NEEDED.md