How to Use and Interact with Smart Contracts Effectively

Smart contracts on Ethereum platforms represent and manage tokens. The MakerDao protocol, for example, is the backbone of the DeFi sector. The project is a big part of the DeFi ecosystem because out of $1 billion of locked ETH in the DeFi market, 60% of ETH is held in MakerDAO.

DAI is the primary product of MakerDAO-a stablecoin pegged to 1 US dollar that maintains a consistent value via a system of price feeds and underlying collateral (ETH).

The project is deployed on the Ethereum blockchain and doesn’t need any intermediary to function. MakerDAO issues loans directly in the DAI stablecoin via Smart Contracts that control Collateralized Debt Positions (CDP). 

CDP allows borrowers to deposit a digital asset into a Smart Contract as collateral to take out a loan on MakerDAO’s platform. Once the asset is deposited, the conditions are written in a way that the CDP holds the assets and allows the borrowers to generate the equivalent of USD value in DAI to take out a loan.

Let’s look at how CDP- a type of Smart Contract works. 

  • A user deposits Ether to Maker’s Smart Contract, creating a CollateraliSed Debt Position, which will allow you to take out DAIs as per the collateralisation rate. 
  • Let’s say, you deposited 1 ETH (worth $1800), which will allow you to take up to 905 DAI at a collateralisation ratio of 200%
  • To take your Ether back, you would have to pay back the borrowed amount in DAI along with a stability minor fee which helps maintain the DAI peg to USD.

But, if the price of Ether goes down by an agreed amount, your CDP will automatically close. This provides a safety buffer to ensure against default on loans. 

To prevent this, you need to either take out less DAI or put in more Ether as collateral. The CDP smart contract ensures that the MakerDAO system always has enough capital locked against the borrowed amount. 

Other Conditions set by MakerDAO in CDP smart contract.

  1. If the price of a collateralised asset doesn’t change, users can pay back the borrowed amount along with the annual stability fee.
  2.  If the price of a collateralised asset drops, the CDP becomes under-collateralised, and a third-party will liquidate the collateralised CDP with a penalty. These third parties have various ways to profit from a liquidated position.
  3. If the price of collateralised assets increases, the collateralised ratio increases, allowing borrowers to draw extra DAIs against their collateralised asset, which eventually will bring the CDP ratio down. 

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *