LogoLogo
  • 🪙Midas
    • The Midas (MDS) Ecosystem
    • MDS Smart Contract: Step by Step How To
    • Multi-collateral MDS & Supported collections
    • Price Stability Mechanisms
    • Oracle Price Feeding
    • Risk management of the MDS platform
    • veinHades Governance of the MDS platform
    • Liquidations of risky assets & Collateral Cashback
    • External Participants
  • 🌊Hadeswap
  • Why hadeswap?
    • DCA* in and out of collections
    • two-sided liquidity pools
    • positive impacts
    • is it risky?
  • Providing Liquidity: How does it work?
    • liquidity pools and bonding curves
    • buy NFTs
    • sell NFTs
    • two-sided liquidity pools
    • pool settings in practice
    • collect trading fees
    • modify my existing liquidity pool
  • user generated educational material
    • How To Guide by TokenGuy.sol
    • Hadeswap explained by krysmatic.me
  • Hall Of Fame
    • the concept
    • Discord/Twitter bot
    • First educational video
  • Technical Documentation
    • coming soon
  • WHITEPAPER
    • $HADES Tokenomics
      • Bonding: Protocol Owned Liquidity
      • $HADES - The Governance Token
      • $HADES - Emission Schedule & Use case
  • ❓FAQs
    • FAQ April 2023
    • FAQ May 2023 (Office Hour Summary)
  • Bounty Program
Powered by GitBook
On this page
  • The MDS interaction process
  • Step 1: Creating the vault and depositing collateral
  • Step 2: Generating MDS from the collaterized assets
  • Step 3: Paying down the debt
  • Step 4: Withdrawing collateral and closing the vault
  1. Midas

MDS Smart Contract: Step by Step How To

PreviousThe Midas (MDS) EcosystemNextMulti-collateral MDS & Supported collections

Last updated 1 year ago

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.

🪙