Your Guide to Making Stablecoins with Matic [Testnet]

In this post, we’ll be providing a step-by-step guide on how to make stablecoins backed by Matic, using the QiDao Protocol.

Haven’t heard of QiDao? It’s a decentralized borrowing protocol that allows you to draw interest-free loans against accepted tokens used as collateral. Loans are paid out in miTokens (a stablecoin with a soft peg to the US dollar) and need to maintain a minimum collateral to debt ratio of 150%.

Currently, the Protocol is in its testnet phase, so the instructions below are only for testnet portal. Try it out — it’s free and easy to use!

How to Borrow miTokens

To make miToken stablecoins, you have to borrow them. This process involves locking collateral to back the value of the coins and then borrowing on that locked value. The value of the collateral is always more than the value of the miTokens borrowed, providing a value cushion to account for price fluctuations in the collateral.

1. Testnet Matic is the token used in the testnet version. By locking testnet Matic, you can borrow testnet miMatic. Don’t have testnet Matic? You can get some for free by following the instructions here (bottom on the page).

2. Visit our testnet site at https://mumbai.mai.finance/. This is your one-stop shop for minting Matic-backed stablecoins!

3. Click on “connect wallet” to pair your MetaMask browser extension.

4. Click on “create vault”. You have to create a vault to deposit your collateral and borrow tokens.

5. MetaMask will prompt you to confirm the vault-creation transaction. Click confirm.

6. Make sure that you have clicked on the “only my vaults” square to view only your vault.

7. Select the vault you’ve just created.

8. Now, you have to decide how much testnet Matic to deposit. Enter an amount in the “amount of MATIC to deposit” field and click deposit. MetaMask will prompt you to confirm the transaction. Click confirm.

9. Once you have deposited an amount, you’ll be able to borrow miMatic (the stablecoin backed by Matic). The “available to borrow” number represents the highest amount of miMatic you can borrow without hitting the liquidation ratio limit. Select an amount below the available to borrow amount. Click on borrow MI to finalize the borrowing.

How to Repay miToken Debt

To redeem the collateral in a vault, users have to return the miTokens that the collateral is backing. Even if the price of miTokens diverges slightly from the 1-dollar peg, the tokens will have the same repayment effect when paid back. This is because the debt is denominated in miTokens. After repayment, the collateral can be withdrawn from the vault.

1. Click on your vault and then on “Pay Back”.

2. Indicate the amount you want to pay back in the “amount of MI to pay back” field, then click “pay back MI”.

To learn more about the protocol behind miTokens, read our docs here.

When I let go of what I am, I become what I might be