Curve Drainable Hack: 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/curvedrainablehack.php}} thumb|Curve FinanceAn original version of the Curve Finance protocol had an exploit which would allow the protocol to be drained by an attacker. This was not exploited, but instead was caught before the contract was deployed. This is a global/international case not involving a specific country. == About Curve Finance == "Curve is a decentralized...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/curvedrainablehack.php}}
{{Imported Case Study 2|source=https://www.quadrigainitiative.com/casestudy/curvedrainablehack.php}}
{{Unattributed Sources}}


[[File:Curvefinance.jpg|thumb|Curve Finance]]An original version of the Curve Finance protocol had an exploit which would allow the protocol to be drained by an attacker. This was not exploited, but instead was caught before the contract was deployed.
[[File:Curvefinance.jpg|thumb|Curve Finance]]An original version of the Curve Finance protocol had an exploit which would allow the protocol to be drained by an attacker. This was not exploited, but instead was caught before the contract was deployed.


This is a global/international case not involving a specific country.
This is a global/international case not involving a specific country.<ref name="curveblog-1154" /><ref name="curvefinancetwitter-1211" /><ref name="decrypt-1212" /><ref name="coincap-1213" /><ref name="openzeppelinforum-1155" /><ref name="peter4205medium-1214" />


== About Curve Finance ==
== About Curve Finance ==
Line 37: Line 38:


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 58: Line 58:
!Description
!Description
|-
|-
|January 25th, 2020 12:00:00 AM
|January 25th, 2020
|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 66:
|
|
|}
|}
== 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 ==
== 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 83: Line 82:


== 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 89: Line 88:
== Ongoing Developments ==
== Ongoing Developments ==
What parts of this case are still remaining to be concluded?
What parts of this case are still remaining to be concluded?
 
== General Prevention Policies ==
== Prevention Policies ==
Decentralized Finance will eventually tend towards full security. However, like hot wallets, it is impossible to have certainty of fund security when stored in a smart contract.
Decentralized Finance will eventually tend towards full security. However, like hot wallets, it is impossible to have certainty of fund security when stored in a smart contract.


Line 96: Line 94:


In our framework, we have proposed a unique insurance model which protects investors through a collective insurance fund.
In our framework, we have proposed a unique insurance model which protects investors through a collective insurance fund.
== Individual Prevention Policies ==
{{Prevention:Individuals:Placeholder}}
{{Prevention:Individuals:End}}
== Platform Prevention Policies ==
{{Prevention:Platforms:Placeholder}}
{{Prevention:Platforms:End}}
== Regulatory Prevention Policies ==
{{Prevention:Regulators:Placeholder}}
{{Prevention:Regulators:End}}


== References ==
== References ==
[https://blog.curve.fi/vulnerability-disclosure/ Vulnerability disclosure: the discovery and the rescue] (Jun 21)
<references><ref name="curveblog-1154">[https://blog.curve.fi/vulnerability-disclosure/ Vulnerability disclosure: the discovery and the rescue] (Jun 22, 2021)</ref>


[https://twitter.com/curvefinance/status/1251987199320395781?lang=en @curvefinance Twitter] (May 24)
<ref name="curvefinancetwitter-1211">[https://twitter.com/curvefinance/status/1251987199320395781?lang=en @curvefinance Twitter] (May 25, 2021)</ref>


[https://decrypt.co/56948/curve-finance-shuts-down-yv2-pool-after-finding-vulnerability Curve Finance Shuts Down yv2 Pool After Finding Vulnerability - Decrypt] (May 24)
<ref name="decrypt-1212">[https://decrypt.co/56948/curve-finance-shuts-down-yv2-pool-after-finding-vulnerability Curve Finance Shuts Down yv2 Pool After Finding Vulnerability - Decrypt] (May 25, 2021)</ref>


[https://coincap.com.au/curve-finance-shuts-down-yv2-pool-after-finding-vulnerability-decrypt/ Curve Finance Shuts Down yv2 Pool After Finding Vulnerability – Decrypt – CoinCap] (May 24)
<ref name="coincap-1213">[https://coincap.com.au/curve-finance-shuts-down-yv2-pool-after-finding-vulnerability-decrypt/ Curve Finance Shuts Down yv2 Pool After Finding Vulnerability – Decrypt – CoinCap] (May 25, 2021)</ref>


[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)
<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 23, 2021)</ref>


[https://medium.com/@peter_4205/curve-vulnerability-report-a1d7630140ec Curve Vulnerability Report] (May 24)
<ref name="peter4205medium-1214">[https://medium.com/@peter_4205/curve-vulnerability-report-a1d7630140ec Curve Vulnerability Report] (May 25, 2021)</ref></references>

Latest revision as of 13:29, 1 May 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' 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!

Curve Finance

An original version of the Curve Finance protocol had an exploit which would allow the protocol to be drained by an attacker. This was not exploited, but instead was caught before the contract was deployed.

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

About Curve Finance

"Curve is a decentralized, UniSwap-like exchange for stablecoins. By focusing on stablecoins, it’s able to offer traders extremely low slippage, and liquidity providers enjoy little-to-no impermanent loss." "As is the case with many other decentralized finance protocols, Curve wasn’t fully decentralized at launch, run by the Curve team, led by Michael Egorov, the founder of NuCypher with a Ph.D. in Physics."

"Curve supports DAI, USDC, USDT, TUSD, BUSD and sUSD, as well as BTC pairs, and it lets you trade between these pairs extremely quickly and efficiently. When stablecoins or stable assets are involved, Curve’s prices are usually the best in the business."

“The key aspect of Curve is its market-making algorithm, which can provide 100-1000 times higher market depth than Uniswap or Balancer for the same total value locked. This dynamic helps both traders and liquidity providers because fundamental returns for those are higher than on Uniswap and alike by the same factor as the market depth.”

"Curve’s stablecoin swapping mechanism and yield integration mechanism has been audited by Trail of Bits."

"[T]he Curve contract had a critical (but not exploited) vulnerability which allowed anyone to drain the smart contract." "[S]ubmitting an exchange of some asset into the same asset, essentially, drains this asset. Anyone could do it."

"In this situation, it was decided to deploy a new version (which was brewing anyway) with newer and better parameters and other good changes, such as more advanced logging, and the fix in question, however without disclosing the fix in question publicly on github. Or, at least, before LPs migrate the funds. As most trades were going from 1inch.exchange, they were able to switch to the new contract within 10 minutes, leaving the old, vulnerable, contract without profits beyond Compound interest."

"Immediately after deploying the new contract and UI, more than 50% of funds were migrated over even before the official announcement. The rest of the migration took 3 days."

"In conclusion, the contract was fixed."

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 - Curve Drainable Hack
Date Event Description
January 25th, 2020 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

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?

General Prevention Policies

Decentralized Finance will eventually tend towards full security. However, like hot wallets, it is impossible to have certainty of fund security when stored in a smart contract.

Finding potential issues may be possible with audits, and it's also possible to insure assets via smart contract insurance platforms. However, at the moment, these insurance platforms have also fallen victim to being exploited themselves multiple times.

In our framework, we have proposed a unique insurance model which protects investors through a collective insurance fund.

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