MakerDAO: Inception of financial infrastructure
Its May of 2022, $BTC is at $29k, markets are literally collapsing. MakerDAO, one of the early and battle-tested protocols is excelling among DeFi protocols with $9.74 billion total value locked.
Would you instead choose an asset that is volatile for exchange of value or an asset that is stable and have minimum volatility?
Of course, you would choose the latter one, I mean nobody would choose an asset like Bitcoin for buying goods.
You might remember a guy who spent 10,000 Bitcoins at a local pizza restaurant to buy himself two pizzas. Back then his Bitcoins were worth only $40.
MakerDAO does acknowledge and solves this issue in the crypto sphere with a non-volatile cryptocurrency that can be used for trading, almost similar to traditional fiat currency.
MakerDAO created a stable coin called $DAI backed by assets.
MakerDAO enables users to create stable currency ($DAI) in exchange for their other crypto assets, somewhat similar to a mortgage i.e. you deposit assets as collateral and borrow currency in exchange.
Leaving everything aside, let’s jump to a case where you want a $DAI stable coin to perform a complex strategy.
Assume you are bullish on $ETH and you are currently having 1 ETH worth $2000 and you want $1000 worth of $DAI stable coin for executing a strategy.
You will go to Oasis to get $DAI. Oasis is the app that lets you deploy your capital into the Maker Protocol for $DAI distribution.
In the inception phase of the Maker protocol, the stable coin was only backed by $ETH ($ETH was only supported as a collateral asset) so it was known as the single collateral Dai system back then. Now Maker protocol accepts any ETH-based ERC20 asset that is approved by Maker as collateral. This collateral is collected into Maker Vaults and is always higher in value than the value of $DAI in circulation.
Since you are bullish on $ETH you have no issue holding your 1 $ETH for the long term. You decide to get $DAI while keeping $ETH as collateral. This way you will be entitled to the gains made by $ETH over time and can also use $DAI to earn more.
The minimum collateral ratio is showing 170% when you reach out to deposit $ETH and withdraw $DAI.
what does that mean?
The collateral ratio is nothing but the Collateral value you need to deposit in order to get $1 worth $DAI.
Basically, 170% implies that to borrow 1 $DAI (1 $DAI = $1) you need to put $1.7 worth of assets as collateral.
You might think that you have 1 $ETH worth $2000 so you can get a maximum of $1176.47 worth of $DAI, correct?
Absolutely! But wait there is more to it.
You might notice two more terms, "Liquidation price", and "Liquidation penalty" when you will try to borrow $DAI.
If the price of the collateral asset goes below the Liquidation price, the collateral is liquidated. The liquidation price is calculated by multiplying the borrowed asset value by the minimum collateral ratio.
A liquidation penalty is a fee that is charged when a position is liquidated, and it is calculated on the outstanding $DAI value.
In our case: $1176.47 * 170% = $1999.99, the Liquidation price. If the price of $ETH goes below $1999.99, our debt position will get liquidated. Basically, the protocol will take your 1 $ETH to make up for your debt position.
You are smart and you know how to manage risk, you only borrowed $1000 $DAI in exchange for 1 $ETH as collateral. Bringing the Liquidation price to $1700.
You are pretty sure that $ETH will not go below $1700 any time soon. You currently are in the best scenario where you are gaining the appreciation on $ETH and also managing 1000 $DAI to generate more cash.
While you are printing money with that extra 1000 $DAI, let me explain how Maker protocol ensures that $DAI is pegged to 1 USD.
In the asset-backed stable coins like $DAI, the circulating value is almost held constant (remove $ETH from circulation and mint $DAI and supply it in the open market, making a net zero change in value), this factor alone can make sure that the $DAI is pegged to $1 but as there are volatile assets which can be used as collateral, it is in the best interest to keep the collateral value higher than circulating $DAI value, just to mitigate the risks.
If the Maker protocol's collateral value drop below the overall circulation of $DAI, sell pressure would increase for $DAI and the peg can be distorted. Thus Maker protocol needs to ensure that collateral value stays above the $DAI supply at any time.
I know you are still generating reaps of rewards with that 1000 $DAI
Marker protocol ensures that they have enough collateral to back their $DAI supply by their liquidation mechanism.
But how?
Coming back to the example, something happened and the $ETH price crashed below our liquidation price i.e. $1700.
You might think how did Maker protocol get to know what price was $ETH trading at?
Good question, Price feeds comes from Oracles.
These oracles provide real-time information about the market price of the collateral assets in a debt position.
The price feed from these oracles can be compromised and a potential fraud may take place. To mitigate a potential oracle attack the protocol has a layer of defense between the price feeds of oracles and the protocol itself.
Moving back to our example, the trading price / current price hit our liquidation price. Maker protocol will claim the ownership of our collateral asset and push it towards Collateral Auction.
Collateral auction: Internal market-based auction where the collateral is traded back for $DAI
The $DAI received from the collateral auction is then used to cover the corresponding debt position + liquidity penalty (again depending upon the collateral type).
If enough DAI is bid in the collateral auction to fully cover the debt position + liquidity penalty, the protocol then converts the collateral auction to a Reverse Collateral Auction.
Reverse Collateral Auction: An auction wherein the protocol attempts to sell as little collateral as possible and leftover collateral is returned to the original debt holder.
In our case, $ETH price is at $1700, out debt position was $1000, Liquidation penalty is 13%. In the best case scenario, Maker protocol will recover $1000 + 13% + 0.05% = $1130.5.
Maker protocol will return us $569.5 worth of our collateral through Reverse Collateral Auction.
What if the $ETH price keeps crashing and Maker protocol is no longer able to cover our debt position through liquidating our assets?
If the collateral auction is not able to cover the debt obligation fully, the remaining/balance/outstanding obligation is converted into protocol debt.
Protocol debt is covered by Maker Buffer; the remaining $DAI after squaring up the debt position is added to Maker Buffer. If there is not enough $DAI in Maker Buffer, the protocol triggers Debt Auction. During Debt Auction $MKR (governance token) is minted and sold to bidders for $DAI. (This process will dilute the $MKR value)
There is a fixed limit to Maker Buffer value (decided by Maker governance). If the $DAI accumulated in Maker Buffer surpasses the decided limit Surplus Auction will take place for the quantity of $DAI exceeding the limit of Maker Buffer.
The protocol will thrive for buying $MKR at best rates (for the amount of $DAI exceeding the limit) in the Surplus Auction in order to decrease the $MKR supply by burning the collected MKR tokens.
Coming back to the price stability of $DAI.
Keeper is an automated independent participant that is incentivized for arbitrage opportunities and it takes part in Surplus Auctions, Debt Auctions, and Collateral Auctions when debt positions are liquidated, altering the supply and demand for $DAI in order to maintain the peg.
$DAI holders can also lock their $DAI into the DSR smart contract which acts as a savings interest for holding $DAI. $DAI holders can earn savings automatically and natively while retaining control of their $DAI.
The protocol also has the power to alter the supply and demand for $DAI through varying the DSR (Dai Saving Rate: Incentive for holding $DAI) through the governance.
E.g. If $DAI is above $1, MKR holders may Decrease DSR, this results in an increased supply of $DAI in the market, thus pushing the price down and vice versa, if DAI is below $1.
As your debt position got liquidated, a follow-up question that might pop into your mind can be, Is there any way someone can avoid liquidation risk?
There are two simple ways that rely on maintaining the collateral ratio higher than the minimum stated collateral ratio (170% in our case):
Supplying more collateral whenever you feel like the collateral asset's price could drop (you could put more $ETH in collateral).
Supplying a portion of borrowed assets back to the protocol without withdrawing the collateral (you could deposit some $DAI from the 1000 $DAI that you borrowed).
Either of the ones will push your liquidation price lower and will build a cushion to protect you from liquidation risk.
I have covered almost all the mechanics that are related to the usability of the Maker protocol.
Here are the technical topics that are left uncovered
Price oracle system of Maker Protocol
MKR Governance mechanism