chore(sim): refresh deployment status, pool matrix, schemas, and scenario scripts
- deployment-status and pool-matrix snapshots aligned with validate-deployment-status.cjs. - Micro-trade / scorecard docs and run-scenario wiring. Made-with: Cursor
This commit is contained in:
@@ -22,9 +22,10 @@ For each epoch:
|
||||
2. **Compute candidate paths** (e.g. k-shortest paths or enumerate swap+bridge combos).
|
||||
3. **Allocate flow** by marginal-equalization heuristic (waterfilling): split volume across paths so marginal output equalizes.
|
||||
4. **Update PMM inventories** and implied prices (use inventory-sensitive depth D = D_0·min(1, I_T/I_T^*)).
|
||||
5. **Arb step (optional):** agents that trade toward oracle when profitable; update inventories again.
|
||||
6. **Bot intervention step:** apply policy from config (or keep exogenous); record intervention cost.
|
||||
7. **Emit scorecard** (or accumulate for end-of-run scorecard).
|
||||
5. **Micro-support step (optional):** run gas-budgeted support trades for selected rails (e.g. `cWUSDC`, `cWUSDT`) to model tiny turnover-seeding or inventory-corrective activity.
|
||||
6. **Arb step (optional):** agents that trade toward oracle when profitable; update inventories again.
|
||||
7. **Bot intervention step:** apply policy from config (or keep exogenous); record intervention cost.
|
||||
8. **Emit scorecard** (or accumulate for end-of-run scorecard).
|
||||
|
||||
---
|
||||
|
||||
@@ -46,9 +47,10 @@ AMM edges can be mocked (e.g. fixed 5 bps spread); relative behavior of PMM vs a
|
||||
- **PMM state:** Per-pool `I_T`, `D = D_0·min(1, I_T/I_T^*)`, sell/buy with documented formula; routing controls applied.
|
||||
- **Routing:** Candidate paths (same-chain, length ≤3), top-K by cost; waterfilling by chunk (5%), marginal-equalization.
|
||||
- **Arb step (PR#2):** Implied price (sell/buy probe) vs oracle P; deviation δ; if |δ| > DELTA_ARB_BPS, trade in corrective direction with size min(x_max, α·|δ|·I_T^*); profit gate (skip if profit ≤ 0). Tuning: `DELTA_ARB_BPS`, `ARB_ALPHA`, `ARB_MAX_FRACTION_OF_TARGET`.
|
||||
- **Micro-support step:** When `scenario.microTradePolicy` is enabled, run tiny support trades on selected cW rails before arb. Policy can prefer matched quotes (`cWUSDC/USDC`, `cWUSDT/USDT`), stay inside an inventory band, alternate when inside band, and clip the trade count by a per-epoch gas budget.
|
||||
- **Bot step (PR#2):** If I_T < 0.5·I_T^* inject; if I_T > 1.5·I_T^* withdraw; action clipped to `BOT_MAX_FRACTION_OF_TARGET`·I_T^*; intervention cost = |u|·(β+ρ)+γ (bridge params + latency ρ from scenario `latencyModel`).
|
||||
- **Bridge shock:** When `scenario.bridgeShock` is set, extra trades (sell cW on fromChain, buy cW on toChain) over `durationEpochs` at `magnitudeFraction` of baseline.
|
||||
- **Determinism:** RNG seeded from `scenario.seed` or hash of scenario name.
|
||||
- **Scorecard:** All PR#1 metrics plus `peak_deviation_bps`, `intervention_cost_*`, `arb_volume_total`, `arb_profit_total`.
|
||||
- **Scorecard:** All PR#1 metrics plus `peak_deviation_bps`, `intervention_cost_*`, `arb_volume_total`, `arb_profit_total`, and support-lane `micro_trade_*` metrics.
|
||||
|
||||
Tuning: see constants in script and [scripts/README.md](../scripts/README.md).
|
||||
|
||||
@@ -33,5 +33,6 @@ for each pool (cW* / quote):
|
||||
- **Bridge throttle**: If bridge backlog or risk flag, widen bands or skip trade.
|
||||
- **Global budget**: Before any trade, check per-token trade budget for current window; skip if exhausted.
|
||||
- **Min improvement**: Only trade if expected |δ| improvement net of fees ≥ minImprovementBps.
|
||||
- **Gas-budgeted micro-support**: For selected USD wrappers (especially `cWUSDC`, `cWUSDT`), allow tiny matched-quote trades (`cWUSDC/USDC`, `cWUSDT/USDT` when available) under a separate gas budget so wrappers stay economically live without converting the PMM into the destination venue.
|
||||
|
||||
Thresholds and bands from [../config/peg-bands.json](../config/peg-bands.json). Mesh reflexivity from [../docs/07-mesh-reflexivity.md](../docs/07-mesh-reflexivity.md).
|
||||
|
||||
Reference in New Issue
Block a user