Maker DAO

This blog post is based on a presentation I gave on January 4th, 2016 at the Ethereum meetup in Seattle. The slides are available, as is a video of the event.

I’ve been working with Nexus, an Ethereum-centric blockchain development shop, on a decentralized cryptocurrency leveraging and stablecoin platform called Maker. There’s a whitepaper available for it, but some of the concepts can be tricky, so I’m writing this explanation to provide another resource for anyone trying to figure it out.

To start with a summary: Maker is a stablecoin and decentralized cryptocurrency leveraging platform built on the Ethereum blockchain. It is composed of three primary pieces.

1) The Decentralized Governance Model

This is fairly standard for this particular space. Maker has a governance token called Makercoin (MKR) which is used for voting on proposals. Voting is weighted based on MKR holdings, which ensures those who are most heavily invested in Maker’s success also have the most say in what it chooses to do.

There is some risk that comes with this privilege, as well as some reward. The risk is that MKR holders may see their holdings diluted if any debt crises that materialize. (I’ll cover this in more detail later.) The reward comes from weekly buy-and-burns, in which Maker uses its profits to buy back MKR from MKR holders. Any bought-back MKR gets destroyed, lowering the overall supply of MKR and driving up the price for those still holding.

MKR is distributed in batches via crowdsales on the Maker forums (there have already been a few batches sold) and as compensation to “dynasties.” (I.e., groups and individuals who have submitted a work proposal to Maker and had it approved.)

There are three channels of communication MKR holders use to discuss proposals:

  1. The Maker forums
  2. The Maker Slack chat
  3. The weekly Teamspeak call on Sundays, 11am PST

2) Keeper

Right now Keeper is nothing more than a Docker image with a few programs that help keep the Collateralized Debt Position engine running. In particular, Keeper provides price feeds for Maker and performs margin calls on undercollateralized debt positions. We also plan on adding programs to help maintain other DAOs, such as the Ethereum Alarm Clock.

Since Keepers are rewarded for these services, Keeper can be thought of as a sort of “meta-miner.” We eventually want to provide for sale a Raspberry Pi pre-loaded with the Keeper image to make the barrier to entry as low as possible, and to also help fund further Keeper development.

3) The Collateralized Debt Position Engine

The CDP engine helps dai maintain its peg with the IMF‘s Special Drawing Rights. It incentivizes untrusted, anonymous actors to drive the price of dai toward the price of SDRs. It also provides a platform by which those bullish on Maker-supported cryptocurrencies (such as ether or bitcoin) may take leveraged long positions on those currencies without having to trust an exchange.

Collateralized Debt Positions on the Ethereum blockchain consist of some locked amount of cryptocurrency and some amount of issued dai. When one opens a CDP, the CDP issues one an amount of dai of lesser value than the cryptocurrency one locks up in the CDP. If one provides 150 dai worth of bitcoin for a CDP at 150% collateralization, for example, the CDP will create 100 dai for one out of thin air.

One may then close out the CDP at any point in the future by paying in the amount of dai issued, which then returns to one the underlying collateral. To build on the previous example, 100 dai would release one’s bitcoin collateral. The 100 dai would then be destroyed.

One caveat: there is a 2% APR associated with CDPs. If one wishes to close out a CDP which issued one 500 dai a year ago, for example, one must provide 510 dai. The 500 dai is destroyed as usual, while the extra 10 dai goes into Maker’s profit reserves.

Required collateralization percentages for opening CDPs will differ from cryptocurrency to cryptocurrency as well. Currently there are two classes of cryptocurrencies one may use to open a CDP: standard volatility and high volatility. Standard volatility cryptocurrencies require 150% collateralization, while high volatility cryptocurrencies require 200% collateralization.

To ensure CDPs are closed out before they go underwater, Maker also allows others to “margin call” your CDPs by purchasing the underlying collateral at either a premium or a discount, depending on the collateralization of the CDP. From 125% up, they must pay a premium and may not purchase the whole collateral amount. If the dai paid covers the amount issued by the CDP, the CDP is closed and any collateral remaining reverts to the user who opened it. From 125% to 100%, however, others may buy the CDP’s collateral at a discount, with a peak effective discount of 20% at 120% collateralization. Any CDPs that fall below 100% collateralization are considered underwater and must be bailed out by Maker.

Here’s a chart from the Maker whitepaper illustrating this dynamic:

dai_graph

More Concretely…

Imagine we have a user named Foo. Our user wants to go long bitcoin and they want to leverage their position a bit. They open a CDP with 150 dai’s worth of bitcoin and are issued 100 dai in return. They then sell that dai for more bitcoin, giving them 250 dai’s worth of exposure to bitcoin backed by 150 dai’s worth of actual bitcoin. If they didn’t find this a leveraged-enough position, they could then open up a few more CDPs and increase their exposure. Conversely, they could have reduced their leverage (and thereby their risk) by collateralizing their CDP at above 150%.

Given this position of a CDP with 150 dai’s worth of bitcoin issuing 100 dai to Foo, though, there are a few ways this can play out.

┗(°0°)┛ “To da’ moon!”

Let’s say bitcoin doubles in value against SDR and Foo wants to close their position. They purchase 100 dai (plus enough to cover whatever interest has accrued) with the bitcoin they bought earlier and close out their CDP. Assuming the position has not been open for years and years, this only costs them about half of the bitcoin they had previously bought. They also receive back their original bitcoin collateral, which puts them at a profit of around 33% in terms of bitcoin.

/(─.─)\ “To da’ floor.”

Not every trade goes so well, though. Let’s say bitcoin drops 20% against SDR. Since 20% of 150 is 30, that leaves their 100 dai CDP, originally collateralized at 150%, at a 120% collateralization. Assuming nobody has already closed the debt position for a smaller profit margin, that leaves a 20% profit margin for our Keeper, who we’re going to name Bar. Bar purchases or issues 100 dai and claims the 120 dai’s worth of bitcoin in the CDP. Bar makes 20%. Foo loses their collateral and experiences a 33% loss in terms of bitcoin.

/(┬.┬)\ “To da’ floor.”

Finally, let’s imagine things go really bad. Let’s imagine a fundamental flaw is discovered in Bitcoin that renders the whole thing useless. The price of bitcoin goes to zero. Foo and Bar both do nothing, because neither has an interest in paying for worthless collateral. It’s up to Maker to bail out the position, as well as all the other positions backed with bitcoin. To do this, Maker begins pulling dai out of its profit reserve to close out CDPs. But what if the reserves run out before all the bad debt has been covered?

This is where risk of holding Makercoin is realized. If there are underwater CDPs and the profit reserves have been emptied, Maker begins creating new Makercoin and selling it for dai. The dai received is used to close out bad debt, and the sales continue until all the bad debt has been closed out.

The Peg

The effect of all this is to drive the price of 1 dai to be equal to the price of 1 SDR with as little variance as possible. If the price of dai, for example, drops against SDR by more than 5%, any CDPs with 150% collateralization become profitable to close out despite the nominal premium on the underlying collateral. This works because the CDPs assume 1 dai is worth 1 SDR. As the price of dai drops against the price of SDR, the collateralization level at which a Keeper may close out a CDP at a profit rises. This drives the purchase and destruction of dai via CDP closings, which pushes the price back up.

Likewise, if the price of dai rises it becomes profitable to either sell dai and buy back in when the peg is restored or to start opening CDPs and start selling the issued dai on the exchanges where the dai is over-valued. Both of these drive the price of dai back down to the value of the SDR. Thus the tightness of the dai’s peg to SDR is dependent on the tightness of the margins Keepers are willing to accept.

Back to Keepers

The success of Maker, then, will largely rely on the success of the Keepers. While we will be providing a stock Docker image, and eventually a plug-and-play Raspberry Pi, there will undoubtedly be some gain to be had for those who can customize their instances and find the Keeper setup best suited to themselves. In particular, there are many variables Keepers might want to keep track of to help improve their daemon’s decision-making skills. Here are a few off the top of my head, some of which may show up in the stock algorithm:

  1. The ratio of dai price to SDR price. If the peg is broken, there’s likely a profit to be had somewhere in the course of fixing it.
  2. CDP collateralization percentages in terms of dai. The CDP engine itself will base discounts and premiums based on collateralization in terms of SDR, but real profit will be determined by collateralization in terms of dai.
  3. The ratio of dai price to the prices of other trading currencies. If there is a discrepancy between the price of a trading currency in terms of SDR versus its price in terms of dai, that could also open a profitable arbitrage path.
  4. The ratio of profit reserve to outstanding debt. This can be used as an indicator of the existential risk Maker is currently exposed to. The bigger the reserve, the better Maker can handle debt crises.
  5. Volatility of debt collateral. Maker’s high collateralization requirements are supposed to provide enough buffer to prevent quick moves from forcing large numbers of CDPs underwater before Keepers can react. While Makercoin holders are incentivized to minimize this risk to Keepers, it is still possible to catch a falling knife and close out a profitable CDP only to see the profit evaporate before one can move it over to one’s preferred cryptocurrency. Keeping track of volatility may help minimize this risk

Recap

There are three parts to Maker: the Makercoin holders that make up its government, the Keepers who “mine” margin calls and arbitrage opportunities, and the CDP engine. Each piece supports the other to create the Maker leverage platform and its stablecoin, dai.

For information on Maker, including links to the whitepaper and forums, please visit https://makerdao.com. If you’re interested in working with Nexus, our website is at http://nexusdev.us. Finally, if you have any questions or comments, please contact me either via the comment box below or on Twitter.