Forging

➡️ Forging (Minting & Redeeming) is a swap between a whitelisted bAsset and its mAsset at a 1:1 ratio.

Minting

Each mAsset will use a smart contract to facilitate minting and redemption and hold its collateral.

  • To mint an mStable asset, a user calls the mint function of that mAsset contract.

  • The user then sends any of the underlying whitelisted tokens to the smart contract of that asset.

    • For the USD asset, the underlying bAssets could be USDC, TUSD, USDT, USDC, GUSD, DAI, and so on.

  • A mint is valid if it does not push any of the bAsset collateral levels past their predefined maximum weight.

Minting a mAsset offers optionality and immediate, low gas, 1:1 (0% slippage) conversion of bAssets into their corresponding mAsset.

For example, if you send 100 DAI to the mUSD contract, you will receive 100 redeemable mUSD back. Minting costs you nothing — in fact you will be rewarded for doing this (more, later).

The newly minting mAsset is more secure than the corresponding bAsset as it is backed by several other assets as well as by the mStable system token MTA.

The mAsset is ERC20 compliant and the user is able to redeem it for any of the underlying bAssets at any time.

Redeeming

In reverse, users redeem their mAsset by calling a redeem function on the mAsset contract.

  • The user is able to specify which bAsset they wish to receive in return for an equivalent amount of their mAsset (which is then burned).

  • A redemption is valid so long as the given bAsset(s) does not push any of the other bAssets over their max weight.

During redemption, a fee (paid in MTA) is required. This is calculated as a percentage of the redemption amount. Over time, this fee will be become very low (circa 10 basis points) to encourage use of the system.

Arbitrage

The mint and redeem functions can be used when a spread exists:

  • between bAssets; or

  • between the mAsset and one or several of its bAssets

Straightforward arbitrage yields that the price of the mAsset will track the value of the basket of underlying assets. Arbitrage will drive stability for all underlying assets as well as for the mAssets.

DEX Integrations

To provide further optionality during the Forging process, we can capitalise on existing on-chain exchanges (or “DEX”). These exchanges can facilitate minting across a broad variety of assets, which will then be used to purchase the most optimal bAsset for minting.

The same mechanism can be used in the redemption process wherein the user may wish to receive a particular output token(s). The mAsset can be redeemed for a particular array of tokens. These tokens would then be traded on a DEX before ultimately returning the output to the user. This can be enabled in one transaction.

Examples

The Basic Process of Minting an mAsset

Assume there exists an mAsset called mExample, which has a basket with max weights defined as 20% Asset A, 40% Asset B, 40% Asset C, 30% Asset D and 10% Asset E, with a total max-weighting of 140.

To mint a single unit of mExample:

  • Call the smart contract’s mint function;

  • Supply a quantity of bAsset (here, 100 of Asset A).

The smart contract will validate that accepting 100 of Asset A will not push the total quantity of Asset A past its predefined max weight of 20%.

Asset A is then transferred from the senders address. If the transfer is successful, the smart contract would in turn mint 1 unit of mExample to the specified recipient.

The user is therefore swapping their Asset for an mAsset of equal or very similar value. To incentivise minting, Meta will be rewarded through mStable's open reward pool.

The Basic Process of Redeeming an mAsset

Assume there exists an mAsset called mExample, which has a basket with max weights defined as 20% Asset A, 40% Asset B, 40% Asset C, 30% Asset D and 10% Asset E, with a total max-weighting of 140.

To redeem 1000 mExample for 1000 of the underlying bAsset E:

  • Call the redeem function on the mExample smart contract;

  • Specify that 1000 of Asset E is desired as the redemption asset.

A redemption is only valid if:

  • It does not cause any of the other bAssets to rise above its max weighting.

  • There are a sufficient number Asset E to pay out.

If the redemption is deemed valid, the contract retrieves 1000 mExample, which is burned, and the sender is credited with 1000 Asset E.

Redemption incurs a fee (paid in MTA), and is calculated as a percentage of the redemption amount. Over time, this fee will be become very low (circa 10 basis points) to encourage use of the system.

Redemption during a re-balance

Governance is able to change bAsset max weightings. In the event that a bAsset's weight is over its max weight as a result of a change, redemption is confined exclusively to that bAsset. See Rebalancing.

The Forging process is the analogous for mGLD, mEUR, mBTC and so on.