# Priority: Obtain Liquid on Mainnet & Wire Off-Ramps / On-Ramps **Purpose:** Single priority plan: (1) get liquidity on Ethereum Mainnet so 138→mainnet flows complete, then (2) wire fiat off-ramps and on-ramps so users can move value in and out. **Status:** Operator-focused. Repo has scripts and contracts; execution depends on deployer mainnet balance and ramp API keys/partnerships. --- ## Priority 1 — Obtain liquid on Mainnet Without mainnet liquidity, users cannot receive value when bridging from Chain 138 to Mainnet. Two destinations need funding. ### 1.1 Trustless LiquidityPoolETH (Mainnet) **What it does:** Pays out ETH/WETH to users who lock on 138 and claim on Mainnet (trustless bridge). **Prerequisite:** Deployer must have **ETH (and optionally WETH)** on Ethereum Mainnet. | Step | Action | |------|--------| | 1 | Fund deployer on mainnet (exchange withdrawal, bridge from L2, or another wallet). See [FUNDING_AND_DEPLOYMENT_CHECKLIST](../03-deployment/FUNDING_AND_DEPLOYMENT_CHECKLIST.md) § Ethereum Mainnet. | | 2 | Set in `.env`: `LIQUIDITY_POOL_ETH_MAINNET` (or `LIQUIDITY_POOL`), `ETHEREUM_MAINNET_RPC`, `PRIVATE_KEY`. | | 3 | Run: `cd smom-dbis-138 && ./scripts/deployment/fund-mainnet-lp.sh --eth 1 --weth 0.5` (or interactive; use `--dry-run` first). | | 4 | Verify: `cast call $LIQUIDITY_POOL_ETH_MAINNET "totalLiquidity()" --rpc-url $ETHEREUM_MAINNET_RPC` (or use [live-test-trustless-bridge.sh](../../smom-dbis-138/scripts/deployment/live-test-trustless-bridge.sh) with `--check`). | **Scripts:** [fund-mainnet-lp.sh](../../smom-dbis-138/scripts/deployment/fund-mainnet-lp.sh), [FundMainnetLP.s.sol](../../smom-dbis-138/script/bridge/trustless/FundMainnetLP.s.sol). **Refs:** [LIQUIDITY_POOL_CONTROLS_RUNBOOK](../03-deployment/LIQUIDITY_POOL_CONTROLS_RUNBOOK.md), [trustless DEPLOYMENT_GUIDE](../../smom-dbis-138/docs/bridge/trustless/DEPLOYMENT_GUIDE.md). ### 1.2 Mainnet Relay Bridge (WETH9) — CCIP payouts **What it does:** Holds WETH9 on Mainnet so CCIP relay can complete 138→mainnet WETH transfers. **Prerequisite:** Deployer must have **WETH9** on Ethereum Mainnet. | Step | Action | |------|--------| | 1 | Ensure deployer has WETH on mainnet (swap ETH→WETH or receive WETH). | | 2 | Run: `./scripts/bridge/fund-mainnet-relay-bridge.sh [amount_wei]` (omit for full deployer WETH balance). Env: `PRIVATE_KEY`, `ETHEREUM_MAINNET_RPC` (or `RPC_URL_MAINNET`), `CCIP_RELAY_BRIDGE_MAINNET`. | | 3 | Verify bridge balance: `cast call 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 "balanceOf(address)(uint256)" 0xF9A32F37099c582D28b4dE7Fca6eaC1e5259f939 --rpc-url $ETHEREUM_MAINNET_RPC`. | **Refs:** [CCIP_BRIDGE_MAINNET_CONNECTION](../07-ccip/CCIP_BRIDGE_MAINNET_CONNECTION.md), [REMAINING_WORK_BREAKDOWN_AND_ANSWERS](REMAINING_WORK_BREAKDOWN_AND_ANSWERS.md) § 2.6. ### 1.3 One-line summary (Priority 1) 1. Fund deployer with ETH (and WETH) on mainnet. 2. Set `LIQUIDITY_POOL_ETH_MAINNET`, `ETHEREUM_MAINNET_RPC` in .env. 3. Run `fund-mainnet-lp.sh --eth 1 --weth 0.5`. 4. Run `fund-mainnet-relay-bridge.sh` if using CCIP relay. **Current operator target:** see [FINAL_UNBLOCK_CHECKLIST_MAINNET_BSC](../03-deployment/FINAL_UNBLOCK_CHECKLIST_MAINNET_BSC.md) for exact current-to-target top-up deltas. --- ## Priority 2 — Wire off-ramps and on-ramps Once mainnet has liquidity, 138→mainnet flows can complete. Next: connect fiat entry/exit (on-ramp = fiat→crypto, off-ramp = crypto→fiat). ### 2.1 Current wiring | Component | Location | Role | |-----------|----------|------| | **Ramp API** | `metamask-integration/src/ramps/` | `POST /ramps/on-ramp/session`, `POST /ramps/off-ramp/session`, `GET /ramps/quote`, `GET /ramps/providers`. | | **Providers** | MoonPay, Ramp Network, Onramper, Transak, Banxa, Coinbase, Stripe, Cybrid, Sardine, HoneyCoin | Require API keys; most support mainnet, not Chain 138. | | **Chain support** | MetaMask ramp partners | Typically Ethereum, BNB, Polygon, etc. **Chain 138 not natively supported** by most ramp partners. | **Refs:** [INTEGRATIONS_QUICK_REFERENCE](../../INTEGRATIONS_QUICK_REFERENCE.md), [MASTER_INDEX](../MASTER_INDEX.md) § Fiat On/Off Ramps, [METAMASK_BRIDGE_SWAP](../../smom-dbis-138/docs/operations/integrations/METAMASK_BRIDGE_SWAP.md). ### 2.2 On-ramp wiring (fiat → crypto) | Step | Action | |------|--------| | 1 | **Mainnet path (works today):** User buys ETH/tokens on a supported chain (e.g. mainnet) via ramp → then bridges to Chain 138. Document this path in companion/dApp and [METAMASK_BRIDGE_SWAP](../../smom-dbis-138/docs/operations/integrations/METAMASK_BRIDGE_SWAP.md). | | 2 | **Ramp API:** Ensure `metamask-integration` ramp server runs (`pnpm ramps:dev` or as part of app). Set API keys in .env: `MOONPAY_API_KEY`, `RAMP_NETWORK_API_KEY`, `ONRAMPER_API_KEY`, etc. See [MASTER_SECRETS_INVENTORY](../04-configuration/MASTER_SECRETS_INVENTORY.md), [API_KEYS_REQUIRED](../../reports/API_KEYS_REQUIRED.md). | | 3 | **Companion/dApp:** Call `POST /ramps/on-ramp/session` with `chainId: 1` (or supported chain); show widget; instruct user to bridge to 138 if target is 138. | | 4 | **Chain 138 native (future):** Partner with one or more ramp providers to add Chain 138. See [CONSENSYS_OUTREACH_PACKAGE](../../metamask-integration/docs/CONSENSYS_OUTREACH_PACKAGE.md), [ON_RAMP_INTEGRATION_GUIDE](../../metamask-integration/docs/ON_RAMP_INTEGRATION_GUIDE.md). | ### 2.3 Off-ramp wiring (crypto → fiat) | Step | Action | |------|--------| | 1 | **Mainnet path (works once liquid):** User bridges 138→mainnet (trustless or CCIP), then sells on mainnet via off-ramp. Ensure mainnet liquidity (Priority 1) so bridge payouts succeed. | | 2 | **Ramp API:** `POST /ramps/off-ramp/session` with `chainId: 1` (mainnet) and user’s mainnet address (or wallet that received bridged funds). | | 3 | **Companion/dApp:** After bridge, show “Sell” / off-ramp option targeting mainnet; link to ramp provider or use embedded widget. | | 4 | **Chain 138 native (future):** Same as on-ramp — partner with providers to support 138 for direct off-ramp from 138. | ### 2.4 Checklist — ramps - [ ] Deployer/mainnet funded → Priority 1 done. - [ ] Ramp API keys set in `metamask-integration/.env` (MoonPay, Ramp, etc.). - [ ] Ramp server reachable from companion/dApp (`/ramps/on-ramp/session`, `/ramps/off-ramp/session`). - [ ] Companion/dApp: on-ramp flow (buy on mainnet → bridge to 138) documented and linked → **[MAINNET_RAMP_USER_FLOWS.md](../04-configuration/MAINNET_RAMP_USER_FLOWS.md)**. - [ ] Companion/dApp: off-ramp flow (138 → mainnet bridge → sell on mainnet) documented and linked → **[MAINNET_RAMP_USER_FLOWS.md](../04-configuration/MAINNET_RAMP_USER_FLOWS.md)**. - [ ] (Optional) Outreach to ramp partners for Chain 138 support. --- ## Order of operations 1. **Obtain liquid on mainnet** — fund LiquidityPoolETH and (if used) Relay Bridge so 138→mainnet completes. 2. **Wire ramps to mainnet** — enable buy on mainnet (on-ramp) and sell on mainnet after bridge (off-ramp). 3. **Document user flows** — “Buy ETH on mainnet → bridge to 138” and “Bridge 138→mainnet → sell”. 4. **Later:** Ramp partner outreach for native Chain 138 on/off-ramp. --- ## Related - [MAINNET_RAMP_USER_FLOWS](../04-configuration/MAINNET_RAMP_USER_FLOWS.md) — on-ramp and off-ramp user flows (buy on mainnet → bridge to 138; 138→mainnet → sell). - [ALL_NEXT_STEPS_CURRENT](../../smom-dbis-138/docs/deployment/ALL_NEXT_STEPS_CURRENT.md) — runbook order (G4 fund mainnet LP is step 2). - [FUNDING_AND_DEPLOYMENT_CHECKLIST](../03-deployment/FUNDING_AND_DEPLOYMENT_CHECKLIST.md) — where to get ETH/WETH per network. - [LIQUIDITY_POOL_CONTROLS_RUNBOOK](../03-deployment/LIQUIDITY_POOL_CONTROLS_RUNBOOK.md) — LP controls and funding. - [CHAIN138_ONLY_TO_CANONICAL_OTHER_NETWORKS](../../smom-dbis-138/docs/bridge/CHAIN138_ONLY_TO_CANONICAL_OTHER_NETWORKS.md) — who prefunds (operator). - [OPERATOR_AND_EXTERNAL_COMPLETION_CHECKLIST](OPERATOR_AND_EXTERNAL_COMPLETION_CHECKLIST.md).