Your Guide to Making Stablecoins on Polygon

QiDao Protocol
4 min readMay 2, 2021

--

In this post, we’ll be providing a step-by-step guide on how to make stablecoins backed by token collateral, 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 MAI(a stablecoin with a soft peg to the US dollar). Learn more here.

How to Borrow MAI (previously miMatic)

To make MAI 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 MAI borrowed, providing a value cushion to account for price fluctuations in the collateral. There is currently a 100,000 MAI debt ceiling on the Protocol. That means that the protocol can only make a max of 100,000 MAI stablecoins. This limit will increase as the Protocol grows.

1. There are many tokens that will be able to back the value of MAI. By locking accepted collateral tokens, you will be able to borrow MAI.

2. Visit our app site at app.mai.finance. This is your one-stop shop for minting collateral-backed stablecoins!

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

4. Choose a collateral type (Matic, camMatic, etc.)

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

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

7. You now have your own vault! Select that vault under “Your Vaults”.

8. Decide how much collateral to deposit. Make sure that you have clicked “deposit” and enter an amount in the field pointed out below. MetaMask will prompt you to confirm the transaction. Click confirm.

You should now see the amount of collateral you deposited in the “Collateral” line under “Vault Info”.

8. Once you have deposited an amount, you’ll be able to borrow MAI (the stablecoin backed by collateral). The “available to borrow” number represents the highest amount of MAI you can borrow without hitting the liquidation ratio limit.

9. First, select “borrow” under “manage”. Then enter an amount that doesn’t exceed the available to borrow amount. Click on “borrow MAI” to finalize the borrowing. Confirm the MetaMask transaction.

How to Repay MAI Debt

To redeem the collateral in a vault, users have to return the MAI that the collateral is backing. Even if the price of MAI diverges slightly from the 1-dollar peg, the tokens will have the same repayment effect when paid back. This is because the debt i denominated in MAI. When returning MAI, users pay a small closing fee that is sent to the network’s community fund for network upgrades and maintenance. This fee is paid in collateral tokens. After repayment, the collateral can be withdrawn from the vault.

1. Click on your vault and then on “Repay”.

2. Indicate the amount you want to pay back in the field directly under “repay MAI debt”, then click “Repay MAI”. Confirm the MetaMask transaction.

3. Please note that repaying MAI debt comes with a 0.5% repayment fee. This fee is charged once and it does not accrue while you hold your MAI. The fee, which is paid with the collateral token, will be sent to the community treasury, where the community will be able to vote on how to manage those funds. The community treasury also serves as a backstop for bad debt.

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

--

--