Compound Price Feed Error
Notice: This page is a freshly imported case study from the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' section to other sections, and add any missing information or sources you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.
Compound Finance relied on CoinBase for the price of DAI stablecoins. In a time of rapid market crash, the price on CoinBase went above $1.30 on CoinBase, while other services had prices around $1.03. This caused customers who had loans to fall below the required backing and get liquidated.
This is a global/international case not involving a specific country.
About Compound Finance
"Compound is an algorithmic, autonomous interest rate protocol built for developers, to unlock a universe of open financial applications."
"Lenders on decentralized finance (defi) protocol Compound on Thursday got liquidated for a massive $103 million, according to analytics provider Loanscan. This happened after what appears to be an oracle exploit on the Dai stablecoin."
"Compound's price feed error caused the liquidation of $90 million in assets. According to DeBank founder hongbo, the huge liquidation of Compound was caused by the dramatic fluctuations in the DAI price of the oracle information source Coinbase Pro. It is a typical oracle attack to manipulate the information source that the oracle relies on to perform short-term price manipulation to achieve misleading prices on the chain."
"An apparent error or malicious attack to the Dai-dollar-peg data supplied by the Coinbase oracle pushed the price of the stablecoin to about $1.30 – a premium of 30% – leaving some users on Compound under-collateralized."
"When traders rush for the exits, the price of stablecoins generally increase as the demand for stability rises. In today’s crash, however, the effect became particularly pronounced on Dai, which briefly traded for $1.3 between 7 am and 8 am UTC."
"The Compound protocol uses Coinbase Oracle 69 for account liquidity calculations, anchored to within 20% of the Uniswap time-weighted average price. Any Ethereum address can post the signed/reported price on-chain, which allows for a permissionless and autonomous price feed 18 that rapidly de-risks accounts."
"From approximately 12:00am to 1:00am PT on Thanksgiving morning, the price of DAI on Coinbase Pro began trading at increasing prices and volume across the DAI/USDC, DAI/USD, and ETH/DAI pairs, reaching as high as $1.30. This coincided with a decline in ETH prices globally, of approximately 8% during the same time period."
"Most notably, Dai traded at this inflated valuation only on Coinbase and Uniswap, while other exchanges including Kraken and Bitfinex seem to have maintained a relatively stable price." "Coinbase and Uniswap are the two exchanges used by Compound’s Open Price Feed oracle. The former acts as the baseline, while the latter is used as a sanity check and anchor. Nonetheless, it appears that Uniswap failed in its function and also posted a much higher price than normal."
"[T]his Dai price spike, combined with an acutely falling ETH price, pushed some Dai positions on DeFi lending protocol Compound into being undercollateralized and thus capable of being liquidated." "The so called “DAI liquidation event” has shown, that the open oracle, which is used by Compound, has weaknesses. The root cause is, that the oracle uses only one price source, which is Coinbase. The effect is, that the Coinbase prices are used in Compound, even if they deviate largely from the rest of the market. The Uniswap price is used to define a +/- 20% bounding, but as seen, this doesn’t solve the problem."
“From what I’ve heard, the compound liquidations would have been much worse without the addition of [Uniswap] TWAPs to the Compound oracle … While the Coinbase oracle price spiked, Uniswap TWAPs did not increase much, causing the most extreme prices to be rejected.”
"Not only should most of these liquidations not have happened, folks that had non-DAI collateral lost ~30% of value of their collateral in the liquidation process due to the erroneous oracle allowing the collateral to be seized at an adverse and improper exchange rate."
"[I]t does not seem like the big compound liquidation was an oracle problem. [T]he market price of DAI was $1.30 in a real market with real trading."
"This morning, $DAI prices on Coinbase Pro escalated rapidly, leading to the liquidation (repayment) of 85.2M DAI borrowed from Compound."
"124 of 225,793 users were impacted; there are no under-collateralized accounts, and all markets are healthy."
"Fundamentally, the protocol and price feed performed as designed; real trading, on America’s largest exchange, was used to aggressively reduce the risk of borrowers in the protocol. What was unexpected was the adverse market condition that occurred, how quickly it occurred, and for many users, that it could occur at all."
This is a global/international case not involving a specific country.
The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.
Include:
- Known history of when and how the service was started.
- What problems does the company or service claim to solve?
- What marketing materials were used by the firm or business?
- Audits performed, and excerpts that may have been included.
- Business registration documents shown (fake or legitimate).
- How were people recruited to participate?
- Public warnings and announcements prior to the event.
Don't Include:
- Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
- Anything that wasn't reasonably knowable at the time of the event.
There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.
The Reality
This sections is included if a case involved deception or information that was unknown at the time. Examples include:
- When the service was actually started (if different than the "official story").
- Who actually ran a service and their own personal history.
- How the service was structured behind the scenes. (For example, there was no "trading bot".)
- Details of what audits reported and how vulnerabilities were missed during auditing.
What Happened
The specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.
| Date | Event | Description |
|---|---|---|
| November 26th, 2020 12:00:00 AM | First Event | This is an expanded description of what happened and the impact. If multiple lines are necessary, add them here. |
Total Amount Lost
The total amount lost is unknown.
How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?
Immediate Reactions
How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?
Ultimate Outcome
What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?
Total Amount Recovered
It is unknown how much was recovered.
What funds were recovered? What funds were reimbursed for those affected users?
Ongoing Developments
What parts of this case are still remaining to be concluded?
Prevention Policies
References
SlowMist Hacked - SlowMist Zone (May 17)
Fix the Compound oracle problem - Ideas - Compound Community Forum (Jul 23)
$100 Million Liquidated on Defi Protocol Compound Following Oracle Exploit – News Bitcoin News (Jul 23)
Compound (Jul 23)
Compound liquidator makes $4M as oracles post inflated Dai price (Jul 23)
To Chainlink? That's the DeFi Question: Exploring the Recent Compound Liquidations (Jul 23)
@scott_lew_is Twitter (Jul 23)
@rleshner Twitter (Jul 23)
DAI Liquidation Event - Compound Community Forum (Jul 23)
DAI Liquidation Event - #4 by cryptoguy123 - Compound Community Forum (Jul 23)
DAI Liquidations - Google Sheets (Jul 23)
$103 Million Liquidated on DeFi Protocol Compound After DAI Price Rise | Cryptoglobe (Jul 23)
@arbingsam Twitter (Jul 23)
Rekt - Coinbase & The Oracle (Sep 22)