Skip to content

feat(lab): CR8-USD + MUSD lifecycle interactive lab — 8 scenes#53

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

feat(lab): CR8-USD + MUSD lifecycle interactive lab — 8 scenes#53
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 (1305 lines) walking the stablecoin-toolkit primitives in 8 scenes. Sibling of Mixdown / Labelton / Meridian labs in the kcolbchain lab series.

Scenes:

  1. Mint with burn toll — 1% routed to treasury
  2. Redeem with burn toll — 0.5%
  3. Idle yield park — treasury float → Lucidly syUSD
  4. MUSD vs CR8-USD — side-by-side: MUSD no-toll micropayments rail vs CR8-USD burn-toll supply-discipline coin
  5. Pull-payment royalty — batchRoyaltyDistribution + pendingWithdrawals + claimPayments (matches the actual MUSD contract)
  6. Depeg circuit breaker — real DepegGuard Normal/Caution/Hard state machine with the in-tree defaults (cautionBps=50, hardBps=200, hardRedeemHaltSeconds=12h)
  7. Multi-geography compliance — ComplianceModule.checkCompliance with ISO bytes2 codes ('KP' restricted, 'US' allowed)
  8. Reserve audit — ReserveManager.pullPorReserve against Chainlink PoR + getReserveRatioBps vs totalSupplyTracked

Palette: ok-green primary (money rails feel), cyan for collateral/yield, gold for treasury, hot-red for compliance + depeg. Background a green-leaning near-black.

Real toolkit-repo references woven in (verified against in-tree source): DepegGuard defaults, ComplianceModule flow, Minter pipeline, ReserveManager.pullPorReserve, MUSD pull-payment pattern.

lab/SCENES.md (107 lines) documents the scene contract. JS syntax checked.

Single-file static HTML canvas demo at lab/index.html (1305 lines)
walking the stablecoin-toolkit primitives in eight scenes:

  1. Mint with burn toll          1% toll routed to treasury
  2. Redeem with burn toll        0.5% redemption toll
  3. Idle yield park              Treasury float → Lucidly syUSD
  4. MUSD vs CR8-USD              Side-by-side: MUSD no-toll
                                  micropayments rail vs CR8-USD
                                  burn-toll supply-discipline coin
  5. Pull-payment royalty         MUSD.batchRoyaltyDistribution +
                                  pendingWithdrawals + claimPayments
                                  pull pattern (matches actual contract)
  6. Depeg circuit breaker        Real DepegGuard state machine —
                                  Normal/Caution/Hard with cautionBps=50,
                                  hardBps=200, hardRedeemHaltSeconds=12h
                                  (matches in-tree defaults)
  7. Multi-geography compliance   ComplianceModule.checkCompliance with
                                  ISO bytes2 codes ('KP' restricted,
                                  'US' allowed) — real revert
                                  GeographyRestricted
  8. Reserve audit                ReserveManager.pullPorReserve against
                                  Chainlink PoR (POR_RESERVE_ID =
                                  bytes32(0)); getReserveRatioBps vs
                                  totalSupplyTracked

Palette: ok-green primary (money rails feel), cyan for collateral/yield,
gold for treasury, hot-red for compliance + depeg. Background a
green-leaning near-black (#050807).

Real toolkit-repo references woven in (verified against in-tree source):
  - DepegGuard state machine + defaults
  - ComplianceModule.checkCompliance flow + bytes2 geography codes
  - Minter compliance → reserve-check → fee-split pipeline
  - ReserveManager.pullPorReserve + getReserveRatioBps
  - MUSD pendingWithdrawals + claimPayments pull pattern from
    kcolbchain/muzix/src/MUSD.sol

The 1% / 0.5% tolls are framed as CR8-USD-specific parameterization
(existing toolkit defaults are 10 bps); scene captions call this out.

lab/SCENES.md (107 lines) documents the scene contract. JS syntax checked.
@abhicris abhicris merged commit 66edb27 into main May 25, 2026
1 check 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