Maker and Dai — The Banana Paper

Michael Bogan
Jun 21, 2018 · 15 min read
https://makerdao.com/

This article is one in a series of my 🍌Banana Papers— blockchain whitepapers re-written in an easy to digest (like bananas!) manner. My goal is to help readers quickly understand and evaluate complex blockchain ideas with minimal pain.

Today we’ll take a look at Maker—one of the most prominent (and complicated) stablecoin projects in the ecosystem. Maker has great backing from Polychain Capital, Andreesson Horowitz, and others.

(Note: this is a rather long Banana Paper, which sort of goes against the principles of what I’m trying to do. But there are several pieces of important background information that are key to understanding Maker, so I spend a little time explaining these, namely stablecoins and margin trading. If you already understand these concepts, you can safely skip those sections.)

Maker and Dai — The Easy Explanation

Maker is a smart contract platform that generates, manages, and stabilizes Dai — a cryptocurrency stablecoin.

The Maker platform — through a financial instrument known as a CDP (Collateralized Debt Position) — allows users to borrow Dai against their crypto assets, effectively creating a decentralized margin-trading platform.

Maker and Dai — Detailed Overview

What are Stablecoins?

In order to understand Maker and Dai, you first need to understand stablecoins.

In your life, financial transactions are probably completed using fiat (legal currency backed by a government). Maybe you buy food with dollars or pay rent with euros. There are many reasons you can use your fiat for these purposes, such as fungibility (one unit of your money is exchangeable for any other similar unit), liquidity (others will accept your money), and limited supply. One of the most important reasons you can use your fiat is that it has a relatively stable value.

You wouldn’t want to spend your day creating widgets, only to be paid in a currency that drops half its value next week. You wouldn’t want to open a mortgage in a currency that becomes worthless by the time your first payment is due. Uncertainty in the future value of a currency makes that currency nearly impossible to use for normal transactions.

Many people feel that this lack of stability is one of the major blocks to mainstream adoption of cryptocurrency . Cryptocurrencies tend to have the opposite of stability — they have very high volatility. You may believe your favorite coin is going “to the moon” — but in reality, you don’t know what drastic changes in value will happen next month, next week, or even tomorrow. If there is to be mainstream adoption of cryptocurrencies, many believe there must be a currency — a stablecoin — that remains decentralized, but maintains a consistent value over time.

Maker is a smart contract platform that creates and manages such a stablecoin called Dai.

Maker and Dai

Dai is a cryptocurrency stablecoin that, initially at least, is stabilized by being pegged 1-to-1 to the US dollar, meaning the value of 1 Dai is created and exchanged at the same rate as 1 US dollar.

The Maker platform behind Dai has several functions. The Maker platform:

We’ll look at each of these in detail.

Creating and Borrowing Dai

Dai isn’t mined like Bitcoin. Instead Dai is dynamically created through loans over a smart contract. In the simplest flow, a user sends some type of collateral (in the form of a crypto asset) to the contract, and the contract returns to the user newly created Dai. The contract stores the collateral until the Dai is returned.

Here’s how a typical scenario might work (we’ll keep the values in dollars for simplicity). Note that you must deposit more collateral than the value of the Dai you get in return. In the below scenario, for example, Bob needs to send $150 worth of ETH to get $100 worth of Dai — a 150% deposit.

Bob can now do whatever he wants with the Dai, for however long he chooses. When he is finished with the Dai, the reverse flow happens:

The smart contract above is referred in the Maker platform as a Collateralized Debt Position (CDP).

Collateralized Debt Position

The smart contract is slightly more complicated than presented above. For example, Bob doesn’t pay back just the $100 in Dai. He must pay back slightly more — perhaps $100 in Dai plus an additional $1 — because the system charges a time-based Stability Fee to the CDP. You can think of this Stability Fee as an interest rate on Dai.

So why would Bob want to open a CDP and get Dai? There are several reasons. Here are a couple:

Let’s explore that second case, as it’s a major section of the Maker whitepaper.

(If you already understand margin trading, feel free to skip this next section and start again at Margin Trading with CDPs)

What is Margin Trading?

Traditional margin trading is a financial tool that increases the magnitude of your gains — and losses — by allowing you to borrow money to purchase an asset (such as stocks).

For example, if you have $2000, margin trading allows you to borrow an additional $2000 against your original $2000, and purchase a total of $4000 in a stock. In margin trading, you are borrowing money to increase your exposure — or, gains and losses. You margin trade because it gives you leverage — a magnitude increase of your gains and losses.

To margin trade, you:

Here is an example:

(There are interest and other fees involved here, but we’ll skip them for simplicity)

Of course, the opposite could also happen:

In fact, in the extreme case of this second example, if the value of the stock falls too low, and Bob no longer has the required maintenance margin in his account, the brokerage will issue a “margin call” which, depending on the rules of the account, either allows Bob to deposit more money to cover the needed margins, or simply closes his account and sells his collateral.

And worst of all, in this extreme case, Bob could end up owing money even after the margin call. If the value falls more than 50% — let’s say it falls 75% — Bob ends up losing not only his original $10,000, but still owes an additional $5,000 (plus the miscellaneous interest and commission fees).

Margin trading can be very lucrative — but can also cause heavy losses.

Margin Trading with CDPs

Margin trading with cryptocurrencies is a key feature of the Maker platform.

Margin Trading with CDPs

(There is a charge here similar to interest rate — the stability fee — which we ignore for simplicity)

But, just like with margin trading, the opposite can happen. If the price of ETH drops, Bob’s losses will be magnified. And again, just like with margin trading, if the value of ETH drops too low, and the value of Bob’s deposited ETH nears a value that no longer covers the cost of the Dai he has borrowed (Maker calls this value the liquidation ratio), the Maker platform will issue a margin call — in Maker’s case, they call this liquidating the CDP — and auction off the collateral to keep the system solvent.

One difference, however, of CDPs over margin trading — no matter how far the value of your collateral drops, you can never end up owing more money than you deposited. In margin trading you can end up owing large sums of money. But in CDPs, Maker caps your losses at the total value of your collateral. If the value of the collateral falls below the value of the borrowed Dai, the Maker platform and its governance covers that loss without charging you.

Note: Only ETH (actually, a variance called Pooled Ether, or PETH) is allowed as collateral in CDPs at the current time, though the whitepaper says more collateral types will be allowed in the near future.

OK, we’re back to the functions of the Maker platform. We covered the first two functions: creating Dai and allowing users to borrow against crypto assets. We also covered in detail CDPs and Margin Trading. Now, let’s cover the last two functions of the Maker platform: stabilizing Dai/Maker, and Governance.

Stabilize Dai and the Maker Platform

The Maker platform enables stability in three ways:

Debt Auctions

Note: For now, Maker has implemented a temporary mechanism for liquidating CDPs — the Maker platform itself acquires the CDP and sells the collateral, creating or burning more PETH as necessary to cover any losses or gains in the sale. Long term, when multiple types of collateral are accepted by Maker, they plan to implement a series of debt auctions, as outlined below.

Maker’s version of a margin call is the debt auction. Every CDP collateral type has a Liquidation Ratio. This liquidation ratio is used to decide when a CDP is at risk of defaulting, and when it should be margin called — or in the Maker world, liquidated.

For example, consider this CDP.

When a CDP drops below its liquidation ratio, Keepers (actors in the system that keep the system solvent) have the job of auctioning off the CDP. They immediately perform the following actions:

Let’s walk through an example flow, and see how this works in action.

Essentially, the platform found a CDP that was at risk of being worth less than the Dai that had been loaned out. These CDPs threaten the stability of the Maker platform. So the platform acts to eliminate this risk by auctioning off the CDP — removing it from Maker.

If the platform acts fast enough, the risk of the CDP is removed while the collateral still has value, and the auction even earns a slight gain as a liquidation penalty is paid by the holder of the CDP. When the MKR is burned in step (e), the supply of existing MKR decreases. A lower supply of MKR means a higher per-token price. In this way, correct management of the platform (through risk settings) by holders of MKR should increase the value of MKR tokens.

On the flip side — if the platform does not act fast enough, or if the liquidation ratio is set too low, the collateral will fall below the value of the loaned Dai. There won’t be enough Dai raised in the auction to buy back all the created MKR, which will cause a net increase of the amount of MKR in existence. A higher supply of MKR causes the value of MKR to decrease. In this way, poor management of the platform by the holders of MKR should cause the value of MKR to drop.

In summary: When the Maker platform discovers a CDP whose collateral value may soon drop below the value of the Dai created by that CDP, it acts quickly to auction off the CDP and remove it from the Maker platform. If the platform acts quickly enough, the holders of MKR are rewarded. If the platform is slow or inefficient, the holders of MKR are penalized.

Target Rate Feedback Mechanism

Another way Maker enforces stability is when the US dollar becomes unstable, the platform triggers the Target Rate Feedback Mechanism — an automatic function that removes the Dai peg to the US Dollar. Through the TRFM, Maker attempts to keep the value of Dai stable through market forces and a Target Price. The further from the Target Price Dai moves on the markets, the harder the platform pushes and pulls the creation cost of Dai in a newly opened CDP, working to bring the value of Dai back to the Target Price.

It’s a pretty complicated process, as illustrated below:

Target Rate Feedback Mechanism

Global Settlement

Global Settlement is the last way Maker enforces stability, and is used a last resort in the case of an extreme market emergency, such as hacking or security breaches of the Maker platform, or long-term market irrationality. Global Settlement is triggered by MKR holders (see below), and effectively “unwinds” the Maker platform, freezes prices, liquidates all assets, and returns them to their owners.

And finally, the last function of the Maker platform is providing a native governance token, MKR.

The MKR Token

The MKR token is the governance token of the Maker platform. MKR holders are responsible for the stability and integrity of the system, and they enforce those values by voting on, and setting, the risk parameters of the platform.

Here are some example parameters that holders of the MKR token can vote on:

Theoretically, if MKR holders do a good job governing the platform, the value of MKR goes up. If they do a poor job, the value of MKR goes down.

That was a long way to understanding Maker and Dai — but there are a lot of concepts in the platform. There are a few items we didn’t cover, such as Oracles (how Maker knows the market price for collateral), Keepers, and security. If you are interested in these, I suggest moving to the white paper.

Resources

The Maker whitepaper

The Maker website

Disclaimer — I’m long on MKR.

How about giving some claps?

If you enjoyed this article, feel free to clap many times or share with a friend. This lets me know my work is helping, and encourages me to write more.

Also — if you’d like to see more of these 🍌Banana Papers, comment below and let me know which blockchain projects you are interested in, and would like to understand a little better.

Michael Bogan is a tech enthusiast with 25 years of technical architecture, founding startups, product launches, and more. I write about blockchain, startups, and family.

Subscribe to my mailing list so you never miss a post!

Follow me on Medium.

Follow me on Instagram.

Follow me on Twitter.

Coinmonks

Coinmonks is a non-profit Crypto educational publication.

Coinmonks

Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project — https://coincodecap.com

Michael Bogan

Written by

25 years of startups, products, and software architecture. Currently run DevSpotlight — tech content for tech companies. michael@devspotlight.com.

Coinmonks

Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project — https://coincodecap.com