unpause.
The operator surface is the repo Makefile (wrapping the stellar CLI) plus configs/script.sh. The same sequence applies to testnet and mainnet; substitute testnet or mainnet for <network> below.
Source of truth
| File | Purpose |
|---|---|
configs/networks.json | Per-network RPC, passphrase, governance, controller, pool, aggregator, timelock delay, and WASM hashes. |
configs/mainnet_markets.json | Mainnet market definitions (asset, rate model, risk config). |
configs/testnet_markets.json | Testnet market definitions. |
configs/spokes.json | Spoke definitions and per-asset spoke memberships per network. |
configs/blend_pools.json | Approved Blend pool addresses for migration. |
Makefile | Build, deploy, configure, market setup, and inspection targets. |
Prerequisites
- The
stellarCLI andjq. - A Rust toolchain matching
rust-toolchain.toml. - A funded signing identity (default
deployer), orSIGNER=ledgerfor a ledger-backed signer.
Build artifacts
make deploy-artifacts produces governance.wasm, controller.wasm, and pool.wasm for upload.
Deploy and bring-up order
The order is load-bearing. Governance deploys first. The controller starts paused at construction with governance as owner. The pool deploys once for the whole protocol. Each asset registers on that shared pool through timelocked proposals.make setup-<network> runs the full sequence. The steps below show what each phase does.
Deploy governance
Uploads pool, controller, and governance WASM, then deploys governance with
__constructor(admin, min_delay). Governance grants PROPOSER, EXECUTOR, CANCELLER, and ORACLE to the admin. Writes governance id and timelock delay to configs/networks.json.Deploy the controller
Governance calls
deploy_controller(controller_wasm_hash) immediately (one-time, owner-gated). The controller constructor sets governance as owner, grants ORACLE to governance, and pauses the contract.Set pool template and deploy the central pool
Schedule and execute pool template registration, then pool deployment. Each step is timelocked in production.
configure-controller bundles template, pool deploy, aggregator, accumulator, and ORACLE role grant.Register each market on the shared pool
Per asset, governance schedules:
propose_approve_tokenpropose_create_liquidity_poolpropose_configure_market_oraclepropose_edit_asset_config
create_liquidity_pool registers the hub asset on the existing central pool. Price reads work only after AssetOracle(asset) is configured.create_liquidity_pool reverts with #30 PoolNotInitialized if deploy_pool has not run, #35 TokenNotApproved if the token was not approved, and #2 AssetAlreadySupported if already listed.Configure spokes and Blend pools
Spokes are configured from Blend migration pools are approved from
configs/spokes.json:configs/blend_pools.json:make setup-<network> chains: deploy-<network> → configure-controller → market, spoke, and Blend setup → unpause. Run individual targets only for partial deploys or recovery.Verification gates
Mainnet launch requires the acceptance matrix in the architecture reference: workspace tests, integration harness, fuzz targets, Certora profiles, external audit closure, 14-day testnet soak, and pause drill. Initial launch caps (ADR 0009): USD 250,000 total TVL, USD 100,000 total borrow, USD 100,000 per-market supply, USD 50,000 per-market borrow.Upgrades
| Target | Path | Effect |
|---|---|---|
make <network> upgradePoolTemplate | propose_set_pool_template → execute | Upload and register new pool WASM template. |
make <network> upgradePools | propose_upgrade_pool → execute | Upgrade the single central pool in place. |
make <network> upgradeController | propose_upgrade_controller → execute | Upgrade controller WASM (auto-pauses first). |
make <network> upgradeAll | template → controller → pool → unpause | Full upgrade then re-enable. |
propose_governance_upgrade → execute_governance_upgrade.
Smoke tests
make <network> getAllMarkets and make <network> getAllIndexes.
Next
Governance
Timelock roles and the propose/execute lifecycle.
Configuration
Validation rules for risk, oracle, and spoke parameters.
Addresses
Deployed contract addresses per network.

