MakerDAO Governance Vulnerability
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' and 'General Prevention' sections 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!
The MakerDAO smart contract, which had over $100m in assets, was at risk of being frozen if a malicious attacker wished to also sacrifice their own MKR to perform the attack.
Were this to have happened, there could have been a significant loss to the MKR holders. However, it was detected and a mitigation plan was put in place before anything was frozen.
This is a global/international case not involving a specific country.[1][2][3][4][5][6][7][8][9][10][11]
About MakerDAO
"The Maker Protocol, also known as the Multi-Collateral Dai (MCD) system, allows users to generate Dai by leveraging collateral assets approved by “Maker Governance.” Maker Governance is the community organized and operated process of managing the various aspects of the Maker Protocol. Dai is a decentralized, unbiased, collateral-backed cryptocurrency soft-pegged to the US Dollar. Resistant to hyperinflation due to its low volatility, Dai offers economic freedom and opportunity to anyone, anywhere."
"MakerDAO is known as the creator of dai (DAI), the decentralized stablecoin currently beloved by yield farmers. DAI is created with debt. Users put ETH or other crypto-assets up as collateral on the Maker platform to then withdraw a portion of the value of those assets in the form of brand-new DAI." "To get back their collateral, users must repay the DAI they borrowed plus whatever interest the loan has accrued (in MakerDAO parlance this is the “stability fee,” but it’s just a variable interest rate). MakerDAO enforces the DAI price by liquidating collateral if its value falls below the minimum threshold to maintain proper collateralization. For ETH, that’s 150%, but most users put in a lot more ETH than the minimum." "If the collateral value goes below a certain threshold, the loan is marked as undercollateralized, and liquidators can participate in an auction to liquidate the loan for a 13% reward."
"[T]he Decentralized Autonomous Organization (DAO) behind the DAI stablecoin, announced a critical security update to its governance contract in a Reddit thread published on May 6." "In partnership with Coinbase and Zeppelin, the Maker Foundation has been participating in a second round of audits of the Maker Voting Contract. During this process, we discovered the need to make a critical update."
"[T]he issue could allow someone to delete votes from the contract and freeze new participants out of the contract." "The crux of the issue rests on the fact that users can vote, through the vote(bytes32) function, for hashes that have not yet been etched. Normally, the addWeight and subWeight functions are balanced in the sense that approvals are either new, supported by freshly locked tokens, or taken from other proposals when a vote is changed. When a vote is cast for a hash not yet etched, however, the addWeight function will find no addresses associated with the hash, and thus no approvals will be added to the system, causing an imbalance in the system that an attacker can use maliciously."
"The MKR that is still deposited in the old contract is at risk of getting frozen if someone exploits the vulnerability. Due to the nature of the exploit however, the attacker would have to burn their own MKR to do this." "While the announcement claims that the tokens of users who have staked MKR tokens in the contract are not in danger, it also advises users to move them. Still, no action is required from users who are not in control of one of the ~190 addresses who have staked MKR in the current voting contract." "If we find MKR that has been frozen through the exploit, Maker has a contingency plan to reimburse the victim(s). More details about this will be released should we observe the exploit being used."
"A website with instructions has been created to help users with staked tokens move them out of the old voting smart contract, and chat assistance is offered to those who still find themselves confused about how to proceed." "The instance of this contract deployed at address0x8e2a84d6ade1e7fffee039a35ef5f19f13057152 was the core component of MakerDAO’s governance system, and had over $100 million in locked assets." "We’re happy to note that, of the original 138K MKR held in the old voting contract, only 2.4K MKR remain to be migrated."
"Per the announcement, during the second round of security audits part of the DAO’s partnership with crypto exchange Coinbase and smart contract security startup Zeppelin, a critical vulnerability had been discovered in the governance smart contract. Zeppelin also released an independent critical vulnerability notice."
"The verified source code of the new voting contract has now been added to Etherscan where the community can validate it. This code has been audited by our friends at Zeppelin who discovered the original vulnerability. A second, independent, audit on the new voting contract was conducted by PeckShield, further confirming that the deployed fix mitigates the vulnerability." "We would like to thank both Coinbase and Zeppelin for their strong commitment to due diligence and responsible disclosure as they worked with us to mitigate this issue."
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 |
---|---|---|
May 6th, 2019 | Main Event | Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here. |
Technical Details
This section includes specific detailed technical analysis of any security breaches which happened. What specific software vulnerabilities contributed to the problem and how were they exploited?
Total Amount Lost
The total amount lost has been estimated at $100,000,000 USD.
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?
General Prevention Policies
There were no user funds lost in this case.
In order to prevent the possibility of freezing funds, redundant signatures can be available in a multi-signature wallet. Complex smart contracts introduce the possibility not just of assets being taken but also of them being frozen and rendered inaccessible.
Individual Prevention Policies
No specific policies for individual prevention have yet been identified in this case.
For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.
Platform Prevention Policies
Policies for platforms to take to prevent this situation have not yet been selected in this case.
For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.
Regulatory Prevention Policies
No specific regulatory policies have yet been identified in this case.
For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.
References
- ↑ List of Ethereum Smart Contracts Post-Mortems - Security - OpenZeppelin Community (Jun 23, 2021)
- ↑ [NOTICE] Critical Update to Governance Voting Contract : MakerDAO (Jun 23, 2021)
- ↑ Technical Description of Critical Vulnerability in MakerDAO Governance – OpenZeppelin blog (Jun 23, 2021)
- ↑ DAO Behind DAI Stablecoin MakerDAO Announces Critical Vulnerability in Voting Contract (Jul 31, 2021)
- ↑ MakerDAO — Cantrillion (Jul 31, 2021)
- ↑ Mempool Manipulation Enabled Theft of $8M in MakerDAO Collateral on Black Thursday: Report - CoinDesk (Jul 27, 2021)
- ↑ Millions Lost: The Top 19 DeFi Cryptocurrency Hacks of 2020 | Crypto Briefing (May 22, 2021)
- ↑ DAO Behind DAI Stablecoin MakerDAO Announces Critical Vulnerability in Voting Contract (Jul 31, 2021)
- ↑ Maker discloses "critical update" to its governance voting contract (Jul 31, 2021)
- ↑ Maker price today, MKR live marketcap, chart, and info | CoinMarketCap (Jul 31, 2021)
- ↑ Technical Description of Critical Vulnerability in MakerDAO Governance – OpenZeppelin blog (Jul 31, 2021)