Files
proxmox/docs/00-meta/MAINNET_LIQUIDITY_AND_RAMPS_PRIORITY.md
defiQUG b3a8fe4496
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
chore: sync all changes to Gitea
- Config, docs, scripts, and backup manifests
- Submodule refs unchanged (m = modified content in submodules)

Made-with: Cursor
2026-03-02 11:37:34 -08:00

7.7 KiB
Raw Blame History

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 § 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 with --check).

Scripts: fund-mainnet-lp.sh, FundMainnetLP.s.sol.

Refs: LIQUIDITY_POOL_CONTROLS_RUNBOOK, trustless DEPLOYMENT_GUIDE.

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 balance). Env: PRIVATE_KEY, ETHEREUM_MAINNET_RPC (or RPC_URL_MAINNET).
3 Verify bridge balance: cast call 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 "balanceOf(address)(uint256)" 0xF9A32F37099c582D28b4dE7Fca6eaC1e5259f939 --rpc-url $ETHEREUM_MAINNET_RPC.

Refs: CCIP_BRIDGE_MAINNET_CONNECTION, REMAINING_WORK_BREAKDOWN_AND_ANSWERS § 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.

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, MASTER_INDEX § Fiat On/Off Ramps, METAMASK_BRIDGE_SWAP.

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.
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, API_KEYS_REQUIRED.
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, ON_RAMP_INTEGRATION_GUIDE.

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 users 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.
  • Companion/dApp: off-ramp flow (138 → mainnet bridge → sell on mainnet) documented and linked → 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.