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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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?