• The Flip
  • Posts
  • Curation is Creation: The story of our latest Maker Schema

Curation is Creation: The story of our latest Maker Schema

How we curated data for our Elasticity Analysis of the ETH-B Vault

It took a month.

We poured over transaction traces, events, and logs. We grinded through documentation and used our connections to get direct access to the developers & data people at Maker. We learned a lot:

Being first means you don’t get the privilege of standards.

When MakerDAO launched in 2017, the ERC721 NFT standard was still a year away. Developers had agreed on the core parts of the ERC20 standard. “Tell people that you transferred tokens!”. But otherwise, Maker was trendsetting.

They made an early decision to separate from Traditional Finance as much as they could. Creating entirely new vocabulary for an entirely new way of generating stable value. The Accounting System was the Vat. Collateralized Debt Positions were Urns. Liquidations were Cat.Bite(). Price oracles were Spotters. 

My never finished cheat-sheet of Maker Vocabulary was still a useful exercise.

Besides the vocabulary, there were the interactions at play. To make the most time-resistant system possible meant that everything had to be modular. Who knows what collateral types (ilk) would be viable in the future? Who knows what contracts we’d need to enable to make (join) DAI?

Easy isn’t always possible

We learned the hard way that this wasn’t going to be a protocol where we could provide the standard curated tables. Our dream scenario would have been:

  • EZ_Vault_Creations: When did someone create a new urn, what collateral type was it, who made it?

  • EZ_Vault_Deposits: Who deposited what to which vault?

  • EZ_Vault_Withdraws: Who withdrew what from which vault?

  • EZ_DAI_Mints: Which vault minted how much DAI?

  • EZ_DAI_Repays: Who paid back which vault’s DAI debt & how much?

  • EZ_Liquidations: Which vaults were liquidated, how much collateral was bought, and for how many DAI repaid?

But modularity forced out hand.

Debt & Collateral could be moved between urns, this means you could have withdrawals without a corresponding deposit (at the Vault level).

Vaults can be co-owned, meaning owner was not a consistent address for 1 vault. You can interact with Maker via Proxies, the CDP Manager, or directly on the Vat. So the same action (deposit) could been done via slightly different functions on different contracts.

Some Collateral are special, like the Curve ETH/Staked ETH (CRVVETHSTETH-A) and real world assets (e.g., RWA-001), where DAI can be made by special powers without assigning debt to a specific Urn (It’s all direct to the Vat).

The Solution: Stick to the Facts

After finding exception after exception that tricked our curation models we realized the way forward was to stick with the facts.

If we can make the facts of the core components: the accounting system Vat, the main position manager CDP, the liquidation engines Cat (early engine) and Dog (The liquidation 2.0 engine) all available in SQL format. Then we can let analysts mix and match and combine these facts to fit their specific analysis. An analysis of a specific collateral type, (e.g., ETH-B), is going to need different components than an analysis of real world assets. And that is ok!

Real World Example: ETH-B Elasticity Report

To show off what’s possible (and help our amazing governance team get more MKR delegation) we did a deep dive on the Maker ETH-B “ETH Low Ratio” Vault to understand if users of the vault were elastic to the stability fee.

The full analysis is available on our research site and as always you can check the code & queries on our MKR-Elasticity-ETHB GitHub repo.

Step 1 was data. We used the new fact tables to grab all ETH-B Vault creations, ETH deposits, liquidations, DAI mints, DAI repayments, and ETH withdrawals on or before Block 16,400,000 (Jan 13th 2023).

Queries are timestamped for reproducibility!

We did a big exploratory data analysis looking at all of these values over time and comparing it to changes in the cost to mint DAI from this vault: the stability fee.

The natural assumption is: when something is more expensive (here, minting DAI), people will do it less. When something is less expensive, people will do it more.

The % change in an activity as a ratio to the % change in cost of that activity, is called elasticity.

This analysis had confounding factors, like the debt ceiling of 50M DAI before July 2021

Statistics has rules

Ultimately, we wanted to provide the Maker Risk Committee a direct finding. “Hey, you should make the stability fee X%. You should change it based on {A,B,C} reasons'“.

But this wasn’t possible. With only 13 fee changes in the Vault’s history, we didn’t have enough data. The fee went up most often during the first 7 months, where the debt limit of 50M DAI prevented the vault from finding an equilibrium amount of debt.

On top of that, ETH’s price (the amount of DAI you can mint given 1 ETH is proportional to this number) was swinging wildly over the time period. It went from $300 to $4,000 to $1,000 back all within 2 years. (As always, you can interact with these visuals directly on the research site)

Everyone’s a genius in a bull market.

Maker can’t control ETH’s price. With a quite high 0.494 correlation, that would be the dream. Simply keep the number going up and DAI will get minted. Alas, that isn’t possible.

What is possible is for Maker to maximize its revenue to then spend towards its goals regardless of ETH’s price.

Money Printing, a science

You may have heard of the Laffer Curve, a simplified model of how the government sets tax rates. The idea is that the government makes $0 at both 0% tax and 100% tax. Because 100% tax chokes out the entire economy.

Thus, there should be some middle tax rate that maximizes tax revenue without stifling the economy.

Thanks to Wikipedia for the transparent image

We didn’t have the data to argue that changing the stability fee meaningfully impacts DAI creation, one of Maker’s goals. The correlation was a measly 0.05 and the confounding factors (ETH’s price) was too messy to parse out given so few changes in the stability fee historically (only 13 total and exclusively downward since Dec 2021).

We instead looked at the very simple model:

implied_revenue = dai_outstanding * stability_fee

The more DAI in circulation from vaults, the more money Maker makes. The higher the fee, the more money they make (per DAI). But… how high can the fee be before it stops people from making DAI (which reduces revenue)?

Separating out pre- July 2021 (when the debt ceiling blocked DAI minting), we drew out the ETH-B Laffer Curve. DAI Outstanding fluctuated every single day, but drawing the boxplots and using locally estimated scatterplot smoothing (LOESS) we got the expected shape.

This, plus some other visuals led us to our informed conclusion.

Our Recommendation for Maker

The Laffer Curve for Maker’s ETH-B vault looked good and felt directionally accurate. But we knew too much about the confounding factors to trust it.

When you change the fee reactively to ETH’s price, that breaks statistics rules on calculating the effect of the fee on the supply of DAI.

The answer is more data, specifically, useful data. We proposed a natural experiment.

Create an unbiased fee strategy over a long enough time period, that changes to ETH’s price and other related factors can happen across different fee tiers. From there, you can do proper statistical analysis.

We will propose in the Maker Forums that the fee for ETH-B be raised from 3% today to 6.5%, 0.5% at a time on a defined schedule ignoring all other factors. From there, we can then go in reverse back to 3%. With these structured changes, knowing that ETH’s price will swing wildly regardless. We can come back and improve this Laffer Curve and other analysis (check the full report for more details).