Module Deep DivesAsset Layer
SampleStablecoin
Minimal token primitive for mint/burn paths in the sample architecture.
What It Does
SampleStablecoin is a minimal ERC-20 used by the collateral workflow.
It exposes:
setMinter(address,bool)for owner-managed minter authorizationmint(address,uint256)for authorized minters onlyredeem(uint256)for self-burn by token holders
Design intent: keep token mechanics narrow while policy decisions remain in manager and risk modules.
Runtime Behavior
- owner updates mint authority via
setMinter - unauthorized mint attempts revert with
UnauthorizedMinter - redemptions burn caller balance and emit
Redeemed - minter changes emit
MinterUpdated
Recommended Deployment Pattern
- Deploy
SampleStablecoinwith an admin owner. - Authorize
CollateralManageras minter (and avoid broad multi-minter setups unless required). - Monitor
MinterUpdatedandRedeemedevents as supply-control telemetry.
Key Invariants
- mint authority is explicit and revocable
- redemption path cannot burn more than caller balance
- policy and oracle logic do not live in token internals