DAI Market Risk

This is a dedicated thread for the community to discuss potential changes to the Compound DAI market. See the main thread for information and analysis of the liquidation event.

Background
The DAI market on Compound has been growing for months as a result of the COMP Distribution; it currently accounts for 309,178 of 427,880 COMP distributed to users.

With 1.56 billion DAI supplied to the protocol, and 1.20 billion DAI borrowed, the Compound Dai market eclipses both the underlying DAI market, the liquidity on exchanges, and the global trading volume of DAI by a vast margin.

The Gauntlet Market Risk Assessment analyzes markets as a function of total outstanding debt relative to daily trading volume–Compound’s DAI market is literally off the charts of any scope considered in the report, which likely contributed to the DAI liquidation event.

The community may want to consider changes to limit the market risk of DAI. Here is a summary of the ideas and levers that have been discussed in Discord so far:

1. Disable DAI’s COMP Distribution
By disabling the distribution of COMP to the DAI market, the incentive to use DAI over another stablecoin like USDC would be reduced, and market size may shift between markets quickly. The COMP Distribution could be re-activated once the market risk has been reduced, or other changes are implemented.

2. Increase DAI Reserve Factor
Increasing the Reserve Factor of DAI would decrease the attractiveness of DAI relative to other stablecoins, but in a significantly less material fashion than disabling the COMP Distribution. Usage of DAI may shift much more slowly.

Reserves would also build more quickly, benefitting the protocol & user-base.

3. Set a DAI Borrowing Cap
Setting a Borrowing Cap would limit the market size of DAI; this would prevent new usage, while preserving the economics of existing users.

A Borrowing Cap could be set relative to the amount of DAI outstanding (1/3 would be 300 million), or as a function of daily trading volume (300%, the high end of the risk assessment, would be 300 million).

This can be implemented with the Community Multi-Sig, which sets Borrowing Caps, without requiring a governance proposal (fast solution).

4. Lower DAI Collateral Factor
Lowering the Collateral Factor would decrease the leverage of users supplying DAI, and the attractiveness to “yield farm” with the asset, but would likely not change borrowing demand for DAI. Alternatively, the Collateral Factor of another stablecoin (e.g. USDC) could be increased, lowering DAI’s Collateral Factor on a relative basis.

5. Supply Cap
The cDAI contract could be upgraded to implement a Supply Cap, which is an alternate approach to limit market size. This would require development resources (slow solution).

Other Ideas
All other ideas are encouraged – and the community may decide / believe that the market doesn’t need to be modified. To expedite the conversation, a quick poll:

Which solutions (if any) do you support?
  • Disable COMP Distribution
  • Raise Reserve Factor
  • Set Borrowing Cap
  • Lower Collateral Factor
  • Create Supply Cap
  • Other Ideas (Please comment below)
  • No Changes

0 voters

6 Likes

While it’s true that DAI market size is a direct result of COMP distribution and early imbalances, which led to it being Dai and not something else. While DAI market looks huge, it’s just accounting, and there is not even 500M of actual DAI inside the protocol, as Supplied Dai and Borrowed Dai are in majority very same Dai often supplied and borrowed at same time by same accounts. Risks are generally concentrated in that accounts and for that accounts, rather than for protocol in general.

I also believe that current COMP distribution model isn’t really that great, and certanly should be adjusted, but i think disabling it completely for Dai market is somewhat unfair and too radical. Though i do think it’s also bad design to be able to capture majority of distribution in one particular market, bleeding other ones off initiative. What i would prefer to see is more complex model, where every single market couldn’t get less than certain percent of daily distribution. Like not less than 5% of daily COMP distribution, which will stimulate usage of other markets and somewhat balance out distribution.

As for Reserve Factor, that is certanly too low for DAI market size, and i believe it should be at least 10%, if not 20% until Reserves for Dai market reach at least 1% of Supplied. Currently they are not even at 0.1%

I don’t like ideas of borrowing or supply caps, as it’s somewhat temporary patch rather than solution. If it works, it should work on any scale, if not, than it should be fixed, caps don’t fix anything but just create a false feeling of safety. And it’s also a competetive disadvantage, as if users can’t execute their strategy because of caps, they might go to other platform without such restrictions, and possibly even stay there.

If we look at Collateral factor on relative basis, like what is suggested with USDC, it’s probably possible as well, but i don’t see much margin there unfortunately. USDC collateral factor could be increaset to like 80%, but the higher we go, the more risk could potentially be generated for market, which in combination with generally low reserves everywhere aside of BAT market could be a recipe fo disaster in future. Reserves should be created before and far ahead of any potential accident and i strongly believe Reserve Factor should be increased overall, not only for Dai market. Actually it should be done “yesterday”.

For our current dai market situation i would suggest:

increase Reserve Factor for Dai to 20%
increase Collateral Factor for usdc to 80%
possibly decrease Collateral factor for Dai to 70%

Observe the results. In meantime think about improvement to the Comp distribution model.

1 Like

Overall, I don’t think we should make adjustments to the Dai market unless it is a temporary change before an oracle update can be put in place.

My opinion is that the primary issue here is not risk parameters of the Dai market but a rather brittle oracle design. The oracle did perform as intended which is great but unfortunately we now understand it’s possible for the oracle to perform as intended and for it also not to accurately reflect the fair market price of Dai (I’m basing this assertion on my understanding that Coinbase Dai price was a major outlier).

3 Likes


These are the current outstanding total debts per assets, normalized with today’s Messari’s 24 hour real volume.
As Robert notes, the Gauntlet risk assessment simulations find the “safe” limits somewhere around 300%, so DAI has clearly blown way passed the point of concern. It may be true that the collateral used for most of the DAI debt is DAI itself, instead of a more volatile asset like ETH, which would reduce the risk of the system becoming undercollateralized, as simulated by Gauntlet, but as we’ve seen with this liquidation incident, debt exceeding liquidity by such vast amounts carries other risks.

4 Likes

After analyzing the situation more in depth and reading some of Rob’s comments. It does seem most sensible to disable COMP distribution for Dai.

The core issue here is that the Dai market on Compound is so large in relationship to total Dai market cap that the market for it on Coinbase can be manipulated and therefore Coinbase is not acting reliably as a price oracle.

The reason the Dai market is so large is because the COMP disbursal skews borrowing / lending incentives. So I would be in favor of removing the COMP disbursal temporarily and putting it back in place when the oracle issue has been more deeply analyzed and addressed.

3 Likes

Raising DAI reserve factor seems like a win-win: reduces incentives to borrow and resupply DAI for COMP farming, while building up reserves to use in future drawdowns.

Disabling COMP rewards for DAI is a pretty drastic step, it will likely result in leveraged farming moving to other assets. Would Compound be better off with a massive amount of recursive USDC or ETH leverage for farming? These assets arguably have much worse supply elasticity (at least in the short term - minutes or hours), and could be more vulnerable to liquidity crises.

It would be slightly problematic if an issue that was (apparently?) caused by Coinbase deposit/withdrawal problems resulted in Compound increasing reliance on Coinbase’s USDC mint.

4 Likes

I’m sorry if this is a naive question, but why not just cap the amount of COMP going to any asset so that proportionality doesn’t continually shift from one to another?

Disabling COMP rewards for DAI is a pretty drastic step, it will likely result in leveraged farming moving to other assets. Would Compound be better off with a massive amount of recursive USDC or ETH leverage for farming?

Either of those seems preferable as they both have much more liquidity in markets than DAI. Though the current amount of DAI debt would probably be too much even for USDC markets. A drastic step is urgently required since DAI borrowers are at the moment at risk of the exact same market manipulation attack being repeated.

2 Likes

I think it’s not expedient to discuss specific changes to the DAI market, as the problem is not a specific DAI market problem.

The root cause is, that the open oracle, which Compound uses, has got only one source, which is Coinbase. This means, exactly the same problem can happen to any other Compound market (beside the the markets with a fixed USD value). Imo for that reason the solution can only be to fix the Compound oracle problem.

1 Like

No, that is a misunderstanding, exacerbated by some obvious shills. This was not an oracle issue, it was a market liquidity issue. As you can see from the table above, other assets are not at risk of the same market manipulation attack as it would not be profitable given the amount of debt and liquidity available for each specific asset.

Again, it doesn’t really matter if this was an attack or a liquidity crunch, the point is that changing the oracle by adding more markets does not address the vulnerability of DAI debt in the system exceeding all global DAI market liquidity by a fantastic amount, as you can see in the attached table. There is no magical price feed that can solve that fundamental problem, as long as the possible profits from off-price liquidations exceed the cost of moving the price, there will be a risk of market manipulation. The only realistic way to address this issue is by reducing DAI outstanding debt.

2 Likes

Reducing/capping Dai also allows other tokens to earn more comp. Some views would probably lean that way because the incentive is there to increase comp earnings of non-dai based depositors/borrowers.

Other assets have vastly more liquidity than DAI, as you can see from the attached table previously on this thread. So debt moving into other assets and away from DAI should be indeed the intention.

@wario What information do you have that shows it was an attack contrary to what oracle’s CTO says? Is this just conjecture?

Expanding a bit on why addressing the DAI market risk is of urgent necessity.
There are, at least, two important risks when we have an asset in the system in vast excess of what liquidity is available in the markets.

1) Risk of the system becoming under-collateralized: This is the issue addressed by the Gauntlet Risk analysis linked by @rleshner in the OP. The gist of this risk is that if we have collateral for an asset in excess of market liquidity available, in a situation of a sharp price drop for the asset, liquidators would not be able to sell the seizable assets quickly, and will likely not want to risk holding an asset that is falling in price either, so they would not perform liquidations and the system becomes under-collateralized

2) Risk of market manipulation: When outstanding debt of an asset exceeds market liquidity by a sufficient amount, it becomes profitable to artificially move the price of said asset with the intention of unfairly liquidating borrowers for a huge profit. This might or might not have been what happened with this event, but regardless, the cost of buying DAI up to $1.3 was in the order of 21k USD, and required under 400k USDC to perform. To put these numbers in context, the largest single liquidation during the event netted the liquidator in the order of 3M DAI.

DAI in the system is over 4000% global daily volume, according to Messaris’ data, so as mentioned several times, neither of these risks can be resolved by doing any kind of oracle change, though IMO discussions of oracle revamping are also worth having after we deal with this more pressing issue. The only realistic way to resolve these risks is by reducing the amount of DAI in the system by a great amount. I don’t really know which of the options laid out in the OP are the best ones to take, but I think it should be clear that the goal should be to select the ones that result in a swifter reduction of Compound’s present DAI market risk.

Some have commented, here and on the Discord, that these risks are mitigated because a lot of the largest DAI borrwers/depositors are “loopers”, that is to say, they recursively borrow and deposit DAI as a COMP farming strategy. This is definitely true, and for the ones that are “perfectly looped”, meaning they only borrow and supply one asset, these risks are nullified as their collateral and debts grow and shrink concurrently, not having an effect on their account’s health. However, it is definitely incorrect to assume that all the DAI in the system is “perfectly looped” as has been shown by the current event liquidations.

1 Like

Why other protocols did not have a “DAI event”?
Obviously, this is a flaw in the price discovery mechanism (oracle) in the Compound protocol.
And please maybe I missed something in Gauntlet researsch paper, but in simulation they write: “assuming that the price of DAI is stable” and use constant gas fee.
Is possible that liquidation event on compound had frontrunning factor? Because gas fee was 500gwei in moment.
My opinion is that COMP farming should be reduced only for stablecoin pairs.
Is there an advantage for the protocol in farming with stablecoin pairs (besides pumping volume)?
Only DAI market risk is biggest volume opposit to other assets because it is more suitable for manipulation.

3 Likes

Just want to highlight that DAI liquidity is qualitatively different than other assets. There is no possibility of a sell side liquidity crisis in the defi/dex context, Compound liquidators can always source DAI from MakerDAO at a $1 mark price. I don’t think it makes sense to compare trading volume on a like for like basis in this case.

4 Likes

Does being able to source DAI from maker DAO resolve the lack of market liquidity that liquidators require to sell seized assets, or the possibility of market manipulation to unfairly liquidate borrowers?

FYI: @kybx86 has created an Autonomous Proposal to increase the DAI Reserve Factor to 15%. You can delegate votes to 0x5576a4db81a44cb7158fc8d5ae752cb44f57be76 to support this change; if the proposal receives 100k votes, it will enter the formal voting process to upgrade the protocol.

1 Like

I agree that this was primarily a flaw in the price discovery mechanism. Namely its clear lack of market coverage, only pulling from CB Pro with Uniswap TWAP as a backstop. Aave, for example, didn’t experience anything similar because they are using Chainlink which pulls data from a range of aggregators, which is why several here have proposed that Compound integrate their price feeds to mitigate this risk in the near term.

3 Likes