DDEX Exchange Price Manipulation: Difference between revisions

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Jump to navigation Jump to search
(Created page with "{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/ddexexchangepricemanipulation.php}} thumb|DDEXThe DDEX originally launched their lending platform with a vulnerability which would have allowed an attacker to manipulate the price of funds, which could have been used to empty the exchange platform. The issue was fixed before it resulted in any loss to any users. This is a global/international case not involving a specific count...")
 
No edit summary
Line 1: Line 1:
{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/ddexexchangepricemanipulation.php}}
{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/ddexexchangepricemanipulation.php}}
{{Unattributed Citations}}


[[File:Ddex.jpg|thumb|DDEX]]The DDEX originally launched their lending platform with a vulnerability which would have allowed an attacker to manipulate the price of funds, which could have been used to empty the exchange platform.
[[File:Ddex.jpg|thumb|DDEX]]The DDEX originally launched their lending platform with a vulnerability which would have allowed an attacker to manipulate the price of funds, which could have been used to empty the exchange platform.
Line 6: Line 7:


This is a global/international case not involving a specific country.
This is a global/international case not involving a specific country.
<ref name="openzeppelinforum-1155" /><ref name="ddexmedium-2019" /><ref name="samczsun-2020" /><ref name="ddex-2021" /><ref name="etherscan-2022" />


== About DDEX ==
== About DDEX ==
Line 35: Line 37:


Don't Include:
Don't Include:
* Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
* 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.
* Anything that wasn't reasonably knowable at the time of the event.
Line 57: Line 58:
|-
|-
|September 18th, 2019 12:00:00 AM
|September 18th, 2019 12:00:00 AM
|First Event
|Main Event
|This is an expanded description of what happened and the impact. If multiple lines are necessary, add them here.
|Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here.
|-
|
|
|
|-
|-
|
|
Line 70: Line 67:


== Total Amount Lost ==
== Total Amount Lost ==
The total amount lost is unknown.
No funds were lost.


How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?
How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?
Line 81: Line 78:


== Total Amount Recovered ==
== Total Amount Recovered ==
It is unknown how much was recovered.
There do not appear to have been any funds recovered in this case.


What funds were recovered? What funds were reimbursed for those affected users?
What funds were recovered? What funds were reimbursed for those affected users?
Line 92: Line 89:


== References ==
== References ==
[https://forum.openzeppelin.com/t/list-of-ethereum-smart-contracts-post-mortems/1191 List of Ethereum Smart Contracts Post-Mortems - Security - OpenZeppelin Community] (Jun 22)
<references><ref name="openzeppelinforum-1155">[https://forum.openzeppelin.com/t/list-of-ethereum-smart-contracts-post-mortems/1191 List of Ethereum Smart Contracts Post-Mortems - Security - OpenZeppelin Community] (Jun 22, 2021)</ref>


[https://medium.com/ddex/fixed-potential-vulnerability-in-contract-used-during-private-beta-217c0ed6f694 Fixed Potential Vulnerability In Contract Used During Private Beta] (Jun 22)
<ref name="ddexmedium-2019">[https://medium.com/ddex/fixed-potential-vulnerability-in-contract-used-during-private-beta-217c0ed6f694 Fixed Potential Vulnerability In Contract Used During Private Beta] (Jun 22, 2021)</ref>


[https://samczsun.com/taking-undercollateralized-loans-for-fun-and-for-profit/ Taking undercollateralized loans for fun and for profit] (Jun 22)
<ref name="samczsun-2020">[https://samczsun.com/taking-undercollateralized-loans-for-fun-and-for-profit/ Taking undercollateralized loans for fun and for profit] (Jun 22, 2021)</ref>


[http://ddex.io/ DDEX - Decentralized Margin Exchange] (Jun 23)
<ref name="ddex-2021">[http://ddex.io/ DDEX - Decentralized Margin Exchange] (Jun 23, 2021)</ref>


[https://etherscan.io/address/0xeB1f1A285fee2AB60D2910F2786E1D036E09EAA8 DaiPriceOracle | 0xeB1f1A285fee2AB60D2910F2786E1D036E09EAA8] (Jun 23)
<ref name="etherscan-2022">[https://etherscan.io/address/0xeB1f1A285fee2AB60D2910F2786E1D036E09EAA8 DaiPriceOracle | 0xeB1f1A285fee2AB60D2910F2786E1D036E09EAA8] (Jun 23, 2021)</ref></references>

Revision as of 11:11, 17 February 2023

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.

Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!

DDEX

The DDEX originally launched their lending platform with a vulnerability which would have allowed an attacker to manipulate the price of funds, which could have been used to empty the exchange platform.

The issue was fixed before it resulted in any loss to any users.

This is a global/international case not involving a specific country. [1][2][3][4][5]

About DDEX

"DDEX is a decentralized exchange platform but are in the process of expanding into decentralized lending so that they can offer their users the ability to create leveraged long and short positions. They're currently beta testing their decentralized margin exchange."

"On 12:54 am September 18th, the security researcher samczsun notified us of a potential vulnerability on a contract we used to beta test margin and lending functionality."

"By relying on an on-chain decentralized price oracle without validating the rates returned, DDEX and bZx were susceptible to atomic price manipulation. This would have resulted in the loss of liquid ETH in the ETH/DAI market for DDEX, and loss of all liquid funds in bZx. Fortunately, no funds were actually lost."

"In the case of DDEX and bZx, it was possible to take out a loan that appeared to be sufficiently collateralized, but was in fact undercollateralized."

"The exploit worked by drastically altering the DAI price of uniswap and eth2dai, the two projects we used to source DAI price. In a simulated contract call, samczsun used approximately 25000 of ETH to drastically alter the price of DAI, which allowed borrowing to occur with very little actual collateral, resulting in a profit of approximately 70 ETH. Samczsun’s excellent post provides more detail."

"The fix was deployed and verified at 5:50 am September 18th. No funds were lost." "The DDEX team fixed this by deploying a new oracle which places sanity bounds on the price of DAI, currently set to 0.95 and 1.05." "We are extremely impressed with and grateful of samczsun’s research and disclosure, and are rewarding this find with a bug bounty of $10,000."

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.

Key Event Timeline - DDEX Exchange Price Manipulation
Date Event Description
September 18th, 2019 12:00:00 AM Main Event Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here.

Total Amount Lost

No funds were lost.

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

There do not appear to have been any funds recovered in this case.

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

No user funds were lost in this case.

References