Comment on page

MDS Smart Contract: Step by Step How To

Anyone who owns NFTs of any of the whitelisted collections can leverage them to generate MDS on the midas platform through our smart contract.
The CDPs, or vaults, hold collateral assets deposited by a user and enable this user to generate MDS, but generating also creates a debt. This debt effectively locks the deposited collateral assets (NFTs) inside the vault until it is later covered by paying back an equivalent amount of MDS, at which point the owner can again withdraw their collateral. Active vaults are always collaterized in (heavy) excess, meaning that the value of the collateral is much higher than the value of the debt.

The MDS interaction process

Step 1: Creating the vault and depositing collateral

The user picks the NFT asset(s) as well as the percentage of collateral taken to then initialize the transaction that will create the vault and store the asset(s) away.

Step 2: Generating MDS from the collaterized assets

The user then receives the amount of MDS tied to the collaterized assets put into the vault. There is a 1% emission/repay fee and that’s it. No penalty fee nor stability fee due to the nature of NFTs and the fact that we’re over-collaterizing assets by a considerable margin.

Step 3: Paying down the debt

When the user wants to retrieve their collateral, they have to pay down the debt in the vault. We’re also indicating the health of the current CDP as well as the liquidation price of the asset. Once the user sends the required MDS to pay off the debt, the vault becomes debt free. Please note that it is also possible to progressively repay debt if that’s the user’s wish.

Step 4: Withdrawing collateral and closing the vault

This happens simultaneously at the moment of paying off the debt. The user will be receiving the assets back on the same wallet that was used to first initiate the creation of the vault and mint MDS.