Add docs/bridge/trustless/PHASE4B_V2_DEPLOY_RUNBOOK.md mirroring the LAN deploy prompt for V2 (parallel infra to V1, doesn't change dApp routing until Phase 4c).
Flag both ADDRESS_MATRIX_AND_STATUS.md \u00a71.6 and PMM_DEX_ROUTING_STATUS.md \u00a72.1 with EnhancedSwapRouterV2 status "Pending Phase 4b" pointing at smom-dbis-138 PR #1 (deploy-script-only).
Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
2026-04-29 14:00:50 +00:00
3 changed files with 122 additions and 0 deletions
| **PMM pools (Stack A, traded)** | Live | 8 pools registered + traded. See [ADDRESS_MATRIX_AND_STATUS](ADDRESS_MATRIX_AND_STATUS.md) §1.6. |
| **PMM pools (Stack B, seeded)** | Live but un-traded | 3 pools at flat 10M/10M (or 0/0). Superseded by Stack A. |
| **EnhancedSwapRouter** | Deployed | `0xE6Cc7643ae2A4C720A28D8263BC4972905d7DE0f` on Chain 138 (Phase 3, 2026-04-22, EVM Paris). UniV3 + Balancer + DODO Stack A wired; Curve/1inch slots inert; 11 DODO pools registered (8 at deploy + 3 cBTC pools Phase 3j). Balancer pool ids still pending per-pair `setBalancerPoolId(...)`. |
| **EnhancedSwapRouterV2** | Pending — Phase 4b | Deploy script ready (`smom-dbis-138/script/bridge/trustless/DeployEnhancedSwapRouterV2.s.sol`, PR #1 on `Order-of-Hospitallers/smom-dbis-138`). Replaces V1's hardcoded provider enum with post-deploy `setProviderAdapter(...)` so adding a new DEX no longer requires a router redeploy. Pre-wires the same 11 DODO pairs as V1 + 6 `IRouteExecutorAdapter` contracts (Dodo / DodoV3 / UniswapV3 / Balancer / Curve / OneInch). Parallel infra — does NOT change V1 wiring or dApp routing until Phase 4c. Runbook: [docs/bridge/trustless/PHASE4B_V2_DEPLOY_RUNBOOK.md](../bridge/trustless/PHASE4B_V2_DEPLOY_RUNBOOK.md). |
**Doc note:** [LIQUIDITY_POOLS_MASTER_MAP.md](LIQUIDITY_POOLS_MASTER_MAP.md) and [ADDRESS_MATRIX_AND_STATUS.md](ADDRESS_MATRIX_AND_STATUS.md) list pool and DODOPMMProvider addresses. DEX_AND_CROSS_CHAIN_CONTRACTS_NEEDED reflects DODOPMMIntegration deployed and pools created.
| Per-provider executor | Inline in router; Curve + 1inch slots inert by design | Each provider has its own `IRouteExecutorAdapter` contract |
| Adding a new DEX | Requires V1 redeploy | Deploy a new adapter, call `setProviderAdapter(...)` — no router redeploy |
| DODO pools (Stack A) | 11 pools registered (8 at deploy + 3 cBTC Phase 3j) | 11 pairs wired in the V2 deploy script via `setProviderRoute` (matches V1 state) |
| Affects existing dApp wiring | n/a | **No.** V2 is parallel infra. dApp keeps using V1 until a separate Phase 4c PR opts traffic into V2 behind a feature flag. |
## What the deploy script does (`script/bridge/trustless/DeployEnhancedSwapRouterV2.s.sol`)
-`cBTC/cUSDT` → pool `0x67049E73…` (Phase 3j; added in PR #1)
-`cBTC/cUSDC` → pool `0x72F1A079…` (Phase 3j; added in PR #1)
-`cBTC/cXAUC` → pool `0xF3e8A07D…` (Phase 3j; added in PR #1)
-`WETH/USDT` → pool `0xe227F6C0…` (env-conditional)
-`WETH/USDC` → pool `0xb53A0508…` (env-conditional)
6. Optional: UniV3 / Balancer / DodoV3 routes if the corresponding env vars are set; otherwise the script disables the provider with `setProviderEnabled(provider, false)`.
7. Emits 8 `console.log` lines with the deployed addresses.
## Permanent rules being honored
-`[profile.chain138_legacy]` (or per-deploy `--evm-version paris`) — Chain 138 / Besu v25.12 is on Paris hard fork; default Cancun produces `PUSH0` opcodes that are `INVALID` on this chain (root cause of the 2026-04 V1 broadcast OOG).
- Stack-A integration `0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895` and provider `0x3f729632E9553EBacCdE2e9b4c8F2B285b014F2e` are the canonical DODO PMM stack for Chain 138 (Stack B at `0x5BDc62f1…` is unfunded — see `chain138-tokens-and-pmm.mdc`).
## Pre-flight + step-by-step LAN commands
The pasteable Cursor/Operator prompt is at `~/test-plans/phase4b-cursor-lan-prompt.md` on the Devin VM. Re-state for archival:
### Pre-flight
```bash
cd ~/projects/proxmox/smom-dbis-138
git checkout main && git pull --ff-only origin main
See full readout commands in `~/test-plans/phase4b-cursor-lan-prompt.md` Step 4 (provider enable bits, adapter mapping, `getProviderRoute` for 5 sample DODO pairs).
## What to hand back
1. The 8 deployed addresses (router, coordinator, 6 adapters).
If anything reverts, paste the failing tx receipt + the relevant log section. Do not retry-loop.
## What this does NOT do
- Does not change the dApp's route registry. V2 has no client traffic; that's Phase 4c.
- Does not affect V1. V1 keeps its 11 DODO pools + the existing `?useEnhancedRouter=1` dispatch path stays on V1 until Phase 4c.
- Does not wire Balancer pool ids on V2 — they need to be discovered (`BALANCER_WETH_USDT_POOL_ID`, `BALANCER_WETH_USDC_POOL_ID`) and either set on the env before the broadcast or via a follow-up `setProviderRoute(Provider.Balancer, …)` cast.
- Does not activate Curve or OneInch — both intentionally disabled.
## Follow-ups after broadcast
1. Update `docs/11-references/ADDRESS_MATRIX_AND_STATUS.md` and `PMM_DEX_ROUTING_STATUS.md` rows for `EnhancedSwapRouterV2` from "Pending — Phase 4b" to "Deployed at 0x… (11 pools wired)".
2. Phase 4c — small dApp PR: surface V2 in `live-route-registry.json` (disclosure-only, behind a flag); add a route-honesty chip if API selects a provider that V2 has wired but V1 doesn't.
3. (Stretch) discover Balancer pool ids on Chain 138 + wire `setProviderRoute(Provider.Balancer, …)` per pair.
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.