Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
batchRoyaltyDistribution+pendingWithdrawals+claimPayments(matches the actual MUSD contract)DepegGuardNormal/Caution/Hard state machine with the in-tree defaults (cautionBps=50, hardBps=200, hardRedeemHaltSeconds=12h)ComplianceModule.checkCompliancewith ISO bytes2 codes ('KP' restricted, 'US' allowed)ReserveManager.pullPorReserveagainst Chainlink PoR +getReserveRatioBpsvs totalSupplyTrackedPalette: 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):
DepegGuarddefaults,ComplianceModuleflow,Minterpipeline,ReserveManager.pullPorReserve, MUSD pull-payment pattern.lab/SCENES.md(107 lines) documents the scene contract. JS syntax checked.