Minting & Burning Process
The creation (minting) and destruction (burning) of $M tokens are strictly controlled by the MinterGateway
.
Minting $M
The minting process is designed with security checkpoints involving a proposal, a delay, and execution:
-
Update Collateral (Prerequisite): Before proposing a mint, a Minter must have an up-to-date and sufficient verified collateral value on record.
-
Propose Mint: An active Minter initiates a mint request by calling
proposeMint()
: This creates a mint proposal with a uniquemintId_
. The proposal specifies the amount of $M to be minted and the recipient address. This step allows Validators to review pending mints.function proposeMint(uint256 amount, address destination) external returns (uint48 mintId_);
-
Delay Period: A mandatory delay period (
MINT_DELAY
), set by governance, must pass after a mint is proposed before it can be executed. This window allows Validators to intervene (e.g., cancel the mint or freeze the Minter) if they detect any issues. -
Execute Mint: After the
MINT_DELAY
has elapsed, and before the proposal expires (withinMINT_TTL
- Time To Live, also set by governance), the Minter can execute the mint by callingmintM()
: This function mints the specified amount of $M to the destination address, provided the proposal is still valid, hasn't been canceled, the Minter isn't frozen, and the mint doesn't violate collateralization requirements.function mintM(uint256 mintId) external;
The MINT_DELAY
and MINT_TTL
mechanisms create a secure time window for oversight, preventing immediate, unreviewed mints and ensuring proposals don't remain executable indefinitely.
Burning $M
$M tokens can be burned to reduce a Minter's outstanding debt. Any $M holder can initiate a burn against a specific Minter's debt:
function burnM(address minter, uint256 amount) external;
- For Active Minters: Burning $M reduces the principal of their interest-accruing debt (
activeOwedM
). - For Deactivated Minters: Burning $M reduces their fixed
inactiveOwedM
. This serves as an informal liquidation mechanism, allowing the market to help settle the obligations of a Minter who has exited the system. The_repayForDeactivatedMinter
internal function handles this logic.