Skip to content

feat(lab): Meridian RWA market-making interactive lab — 8 scenes#40

Merged
abhicris merged 1 commit into
mainfrom
feat/lab
May 25, 2026
Merged

feat(lab): Meridian RWA market-making interactive lab — 8 scenes#40
abhicris merged 1 commit into
mainfrom
feat/lab

Conversation

@abhicris
Copy link
Copy Markdown
Contributor

Single-file static HTML canvas demo at lab/index.html (1212 lines) walking through the meridian autonomous RWA MM agent in 8 scenes. Sibling to the Mixdown lab at muzix.kcolbchain.com/mixdown.html.

Scenes:

  1. Oracle waterfall — Chainlink + rates + custodian feeds
  2. Fair value & spread — weighted-average fair value; geo-aware (US 5 bps / EM 30 bps / Restricted closed). Uses the real _geography_adjustment table from rwa_market_maker.py.
  3. Quotes go out — bid/ask posted, geo-gated
  4. Fill arrives — taker hits US bid, inventory shifts
  5. Inventory rebalance — +12% drift triggers resolver routing
  6. Idle yield park — idle CR8-USD float → Lucidly syUSD
  7. Circuit breaker — MeridianVault.setCircuitBreaker(true) on oracle staleness / 3-sigma divergence (real on-chain fn)
  8. End-of-cycle report — P&L per geo, fills, inventory delta, yield

Palette: cyan primary / gold secondary (flipped from Mixdown's warm amber); cool slate gradient.

New: drawGeoLanes() for US/EM/Restricted underlay, oracle and lucidly agent types. Real meridian-repo references woven in: OracleAdapter / StrategyExecutor / RiskManager modules; MeridianVault.setCircuitBreaker; rwa_market_maker.py geo-adjustment table.

lab/SCENES.md (109 lines) documents the scene contract.

Single-file static HTML canvas demo (lab/index.html, 1212 lines) walking
through the meridian autonomous RWA market-making agent in eight scenes:

  1. Oracle waterfall          Chainlink + rates + custodian feeds
                               arrive with confidence + freshness
  2. Fair value & spread       Weighted-average fair value; spread by
                               geography (US 5 bps, EM 30 bps, Restricted
                               closed). Uses the real _geography_adjustment
                               table from rwa_market_maker.py.
  3. Quotes go out             Bid/ask posted to maker venue,
                               geography-gated (Restricted gets null)
  4. Fill arrives              Taker hits the US bid; pool inventory
                               shifts; mid-price updates
  5. Inventory rebalance       RWA inventory drifts +12%; agent routes
                               through resolver to bring back to target
  6. Idle yield park           Idle CR8-USD float → Lucidly syUSD
  7. Circuit breaker           MeridianVault.setCircuitBreaker(true) on
                               oracle staleness or 3-sigma divergence —
                               uses the real on-chain function
  8. End-of-cycle report       P&L per geography, fills, inventory delta,
                               yield earned

Palette flipped from Mixdown: cyan primary, gold secondary; cool slate
gradient vs Mixdown's warm amber. Restricted-zone elements rendered in
'hot' red. CSS-var names unchanged so the engine code is byte-identical
to Mixdown — just swapped values.

New visual primitives:
  - drawGeoLanes() horizontal banded US/EM/Restricted underlay
  - oracle agent type (diamond/purple) — Chainlink/rates/custodian
  - lucidly agent type (green circle) — syUSD destination

Real meridian-repo references woven in:
  - OracleAdapter, StrategyExecutor, RiskManager (actual module names)
  - MeridianVault.setCircuitBreaker(bool) (actual on-chain function)
  - rwa_market_maker.py _geography_adjustment table values

Companion lab/SCENES.md (109 lines) documents the scene contract for
fork-and-extend.
@abhicris abhicris merged commit f73bb72 into main May 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant