Curve Finance SUSD 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!
Curve Finance is a decentralized smart contract to enable easy switching from one stablecoin to another.
As part of the exchange setup, liquidity pools are required. These were stored in a smart contract hot wallet, and an exploit was found.
However, the exploit was found by an honest white hacker who returned the funds, and the contract liquidity pool was relaunched with a new smart contract.
This is a global/international case not involving a specific country.[1][2][3][4][5][6][7][8][9][10][11][12][13]
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." "Curve smart contracts were audited by Trail of Bits but it’s worth noting that audits don’t eliminate risks entirely."
"Providing liquidity on Curve doesn't come without risks. Before making a deposit, it is best to research and understand the risks involved."
"In March, a sUSD incentivized pool was launched with Synthetix. The trial was overwhelmingly successful as, while having smaller value in the pool, the pool was providing a much deeper liquidity than sETH/ETH Uniswap pool."
"[T]here is a possibility for the contract could potentially be slowly drained. In fact, we've drained 0.1 cent from it (and returned back)."
"The vulnerability in this call wasn't introduced by the changes in this function: it was introduced by the lack of those. A reader could notice that everything in exchange_underlying() works while using rate_i and rate_j, however those shouldn't be used when one of the coins is Y token which cannot be "unwrapped" into one single stablecoin. Using exchange_underlying() could lead to getting more coins than expected by factor of virtual_price which was about 1.014 at the time. This haven't been noticed before because iearn's zap which was used for exchanges used safe exchange() method."
"As soon as we've noticed the issue, we've contacted Synthetix team and quickly shut down the pool using the available kill_me() method. The kill_me() method is usable only during the first 2 months from the pool launch, and that time is supposed to be used for extensive safety tests."
"Critical vulnerability found by Curve team in sUSD contract. All the vulnerable methods are disabled: funds are safe, no loss has happened. Please withdraw your funds and wait for a new contract to be deployed, and the changes to be audited." "The Curve team has paused the pool so no funds are at risk."
"If anything, this really wasn't a miss by @trailofbits - those were few unaudited lines which caused the issue in the place where there were no changes."
"The pool was relaunched in a different format - a very more simple contract, fully audited by Trail of Bits (no changes after audit), and no lending."
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 |
|---|---|---|
| April 19th, 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
In this case, no user funds were lost.
In general, simpler multi-signature setups are more secure than complex smart contracts. When funds are stored "online", they can more easily be taken. There has been minimal exploits of offline multi-signature wallets.
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)
- ↑ @CurveFinance Twitter (Jun 22, 2021)
- ↑ sUSD withdraw - YouTube (Jun 22, 2021)
- ↑ How Curve hacked Curve (Jul 29, 2021)
- ↑ sUSD Curve pool vulnerability & next steps (Jul 29, 2021)
- ↑ FYI: Critical vulnerability found in CURVE sUSD pool contract - no fund loss - pool frozen - If you were in, WITHDRAW ASAP : synthetix_io (Jul 29, 2021)
- ↑ Curve.fi (Jul 29, 2021)
- ↑ What Is Curve Finance (May 25, 2021)
- ↑ What Is Curve Finance (CRV)? A Look At Ethereum's Latest DeFi Token (May 25, 2021)
- ↑ Trail Of Bits Audit Report Curve Finance (Jul 29, 2021)
- ↑ Trail Of Bits Audit Report - Wayback Machine (Jul 29, 2021)
- ↑ Security - Curve Finance (Jul 29, 2021)
- ↑ Security Risks in Ethereum DeFi | ConsenSys Codefi (Nov 15, 2023)