DForce Network Reentrancy Vulnerability

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Revision as of 22:14, 3 May 2023 by Azoundria (talk | contribs) (Created page with "{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/dforcenetworkreentrancyvulnerability.php}} {{Unattributed Sources}} thumb|DForce NetworkdForce is a decentralized financial network that provides a complete set of DeFi protocols covering assets, lending, and trading. Its protocols are deployed on several blockchains, including Ethereum, Binance Smart Chain, Polygon, and KAVA. The reentrancy vulnerability in Curve has be...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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!

DForce Network

dForce is a decentralized financial network that provides a complete set of DeFi protocols covering assets, lending, and trading. Its protocols are deployed on several blockchains, including Ethereum, Binance Smart Chain, Polygon, and KAVA. The reentrancy vulnerability in Curve has been well-known, and the same vulnerability was exploited in an attack that netted $1.9M on Arbitrum and $1.7M on Optimism against DForce. The attack involved flash loaned funds being deposited into Curve's wstETH/ETH and then into dForce's wstETHCRV-gauge vault. The attacker then used the remove_liquidity function to manipulate the virtual price, which dForce uses as an oracle for the wstETHCRV-gauge tokens. dForce confirmed the incident, paused all vaults, and later announced that users' funds supplied to dForce Lending and other vaults were safe. The good news is that the exploiter returned all funds to dForce multisigs a few days later.

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

About DForce Network

"dForce advocates for building a complete set of DeFi protocols covering assets, lending, and trading, serving as DeFi infrastructure in Web 3. dForce is currently deployed on Ethereum, Arbitrum, Optimism, Polygon, Binance Smart Chain (BSC), and KAVA."

"Peer-to-Peer & Decentralized Financial Network. Permission-less and open – everyone with internet access can participate. Non-custodial – minimal trust cost, users always have ownership over their crypto assets. Open-sourced – anyone can integrate with dForce and build your own product on top of our protocols. Decentralized – dForce (DF) token empowers the governance of the network."

"USX is an over-collateralized stablecoin implementing multiple minting modules including global-pool, vault, and LSR. USX's dollar peg is mainly dictated by a hybrid interest policy that can efficiently improves USX's liquidity on secondary market by adjusting its lending and borrowing rates on supported protocols. Powered by the LSR module, USX is also 1:1 tradable with other supported stablecoins directly through dForce Trade."

"DF Staking [is a] hybrid staking model for DF holders to capture fee income, inflationary rewards, and ecosystem airdrop across the network."

"PoS Staking [is p]roviding [a] validation service in PoS networks by participating in their governance and maintaining the security of the network, further aligning DeFi infrastructure with the broader blockchain ecosystem."

"Enabling decentralized lending and borrowing through smart contracts, automating the execution on the protocol."

"Peer-to-Peer marketplace with aggregated liquidity across different platforms with the best price."

"The vulnerability has been well-known for some time. According to ChainSecurity’s original report:

On April 14, we informed Curve and affected projects about a read-only reentrancy vulnerability in some Curve pools. More specifically, the value of function get_virtual_price can be manipulated by reentering it during the removal of liquidity.”

And Curve have provided a known workaround:

one can call any method which has the nonreentrant lock (removing 0 liquidity is probably the cheapest)."

"Shortly after 11pm Thursday night (UTC), an attack on two fronts exploited a common reentrancy vulnerability, netting $1.9M on Arbitrum and $1.7M on Optimism."

"The alarm was raised a few hours later, and dForce confirmed the incident after a further 90 minutes. The team then expanded on their original announcement, stating that they had pause all vaults and adding: Users' funds supplied to dForce Lending and other vaults are SAFE."

"The exploit used flash loaned funds to deposit into Curve’s wstETH/ETH, depositing the LP tokens into dForce’s wstETHCRV-gauge vault.

Upon calling the remove_liquidity function, the attacker’s contract exploited the reentrancy vulnerability to manipulate the virtual price, which dForce uses as an oracle for the wstETHCRV-gauge tokens."

"Good news came a few days later, when the exploiter returned all funds to dForce multisigs."

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 - DForce Network Reentrancy Vulnerability
Date Event Description
February 9th, 2023 4:11:02 PM MST Attack Transaction The attack transaction occurred on the blockchain.

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 $3,850,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?

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