DAI Market Risk

The reason it only cost $21k to bid DAI up to $1.30 is because Compound’s oracle currently only tracks a single exchange Coinbase, accounting for only 2-7% of DAI’s daily volume. Had the oracle been tracking all trading environments (CEXs plus DEXs) and taken the volume weighted price (while removing fake volume), the cost of bidding the global price of DAI up to $1.30 would have been significantly more expensive than $21k.

Uniswap accounts for the vast majority of DAI’s liquidity (35-40% daily volume), but is only being used as a backstop and not as as source of price data (a source that can’t cryptographically sign data like the OOS requires). This is where data aggregators come into play, because taking the median across preselect centralized exchanges doesn’t take into account volume shifts or volume consolidations.

The global price of DAI wasn’t manipulated, a single lower liquidity exchange was, which is what makes this an oracle issue. It only becomes a liquidity issue once the global market wide price is manipulated, but that’s not what happened in this situation. Market coverage raises the costs of price oracle manipulation to highest possible degree, which is why Aave experienced no issues. Not just because of its lower DAI debt market size, but because it consumes the market wide price which was never above $1.04 per DAI during this event.

Also like you state, much of the DAI debt on Compound is from self-loopers meaning that 4,000% debt to volume ratio is artificially inflated by what I believe is quite a bit, though I would be interested to see this quantified to see by how much. The DAI parameters definitely need to be adjusted to reduce the amount of debt, reducing market risks, but I think it’s equal priority to ensure the Compound oracle tracks the market-wide price, and not just 3-7% of the DAI market as it does currently.

3 Likes

Had the oracle been tracking all trading environments (CEXs plus DEXs) and taken the volume weighted price (while removing fake volume),

The way to remove fake volume is by carefully selecting the set of markets to take any form of average or median from, and not include them in your price feed.

Uniswap accounts for the vast majority of DAI’s liquidity (35-40% daily volume), but is only being used as a backstop

True, this is probably a good opportunity to revise that. But it is not enough to resolve the DAI market risk issue. There simply isn’t enough liquidity globally, which is why there is also no oracle modification that would fix this issue.

which is why Aave experienced no issues

Aave has at the moment around 23M DAI borrows, vs 1.23B DAI borrows on Compound. So they do not face the same DAI market risk Compound is currently facing. It would be as dangerous for any money market to let it’s borrows exceed global market liquidity by such an enormous amount.

It’s sounds like we all agree there is too much DAI debt and too little market coverage. However, there seems to be a lack of attention to fixing the latter. Seriously, why haven’t we seen any proposals for updating the oracle alongside these DAI market proposals? I feel like we are just talking in circles about it.

5 Likes

If you have a full time monitoring team watching for data feed market coverage and various shifts across exchanges, this can be true, but for the Compound governance community, closely monitoring market coverage across each and every asset supported without external help from an external oracle project simply isn’t scalable when new collateral gets added to Compound to stay competitive in the money market space. Ensuring market coverage will continue to be a frequent pain point here, even when DAI’s market parameters are adjusted.

We’re talking about two different issues here. The first is the DAI debt market size and the second is oracle market coverage. Both the former and the latter need to be fixed to sufficiently raise the cost of protocol manipulation. The market wide price of DAI was simply never $1.30, using a single exchange lowered the cost of manipulation.

A protocol lacking market coverage is cheaper to manipulate than one without. If Compound and Aave both had equal sizes of outstanding DAI debt, the cost of manipulating and causing false liquidations on Aave would be higher than that of Compound because of the differences in the oracle’s market coverage. This is why I believe we need to solve both the DAI debt size issues and the market coverage issue in tandem for this issue to be resolved.

4 Likes

If Compound and Aave both had equal sizes of outstanding DAI debt, the cost of manipulating and causing false liquidations on Aave would be higher than that of Compound because of the differences in the oracle’s market coverage

We don’t know that this statement is true, since Chainlink’s oracle system includes middle layers (aggregators, and node operators) that are also possible points of attack without requiring manipulating market price directly, and it is not easy to determinate what the cost of performing such an attack would be. Regardless, the point is not which one is more expensive to attack, it’s that no money market should let their collateral or debts grow to a point where it becomes profitable to manipulate market price.

I honestly don’t understand why we are talking in circles here. Chainlink is clearly a better solution than using Coinbase Pro w/ Uniswap TWAP as a backstop. To use an unlikely hypothetical situation (that Chainlink’s extensive list of trusted data providers and node operators somehow engage in a large scale coordinated attack) to argue against fixing something we KNOW is an issue makes no sense to me. Even cursory research shows Chainlink goes to insane lengths to ensure data integrity, and they have proven performance during extremely volatile market situations.

Right now we are driving down the highway with a busted tire (faulty oracle) and broken brake pads (the DAI market parameters). Instead of sitting here arguing which is more dangerous, why don’t we fix both so we are as certain as possible we don’t crash again?

3 Likes

I think this is because a few accounts are incessantly shilling a non-solution to the problem at hand.

No. It’s because the so called “community” doesn’t take any action. Why don’t you just create a proposal to change some DAI market parameters? And let others, who think this isn’t enough, discuss about oracle changes?

An autonomous proposal to modify DAI market parameters has already been submitted https://compound.finance/governance/address/0x5576a4db81a44cb7158fc8d5ae752cb44f57be76

Some accounts are proposing oracle changes in a thread specifically created to discuss the DAI market risk, perhaps proposed oracle changes would be better addressed in a separate thread, there are already a few created by those same accounts to discuss that topic.

It looks like Yearn has started using a COMP farming strategy that should result in further increasing leveraged DAI already in the system.

2 Likes

@wario is correct @cryptix, we should keep the oracle discussion to a separate thread just so things are more siloed (don’t worry I’m guilty too haha).

Here is the thread on Integrating Chainlink Oracles, so we can continue conversing there.

3 Likes