Opyn Double use oToken Breach

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
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' 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!

Opyn

Despite a security audit by OpenZeppelin, Opyn's smart contract for oToken put options continued to be vulnerable.

The hacker got away with funds, which the Opyn team reimbursed for affected users.

This exchange or platform is based in United States, or the incident targeted people primarily in United States.[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16]

About Opyn

"Opyn is a generalized noncustodial options protocol for Decentralized Finance, or DeFi." "Opyn is a capital efficient DeFi options protocol that allows users to buy, sell, and create options on ERC20s. DeFi users and products rely on Opyn’s smart contracts and interface to hedge themselves against DeFi risks or take positions on different cryptocurrencies."

on February 10th, "[t]he team asked [OpenZeppelin] to review and audit the system. [They] audited commit c34598565cba2bfcf824eb2da63d95c7f5dda4fa and the contracts included in the scope were: OptionsContract.sol, OptionsUtils.sol, and OptionsFactory.sol. The scope did not include the files inside the lib folder, Migrations.sol, and the OptionsExchange.sol. All external code and contract dependencies were assumed to work correctly. Additionally, during this audit, [they] assumed that the administrators are available, honest, and not compromised."

"Opyn experienced a double-spend attack on its Ethereum put options, resulting in the loss of at least $371,000 in user funds." "The vulnerability was connected to the protocol’s native tokens called oTokens, which users burn when exercising options contracts. The contract couldn’t correctly exercise a batch of options, not burning oTokens at each closure." "Consequently, an attacker could reuse their oTokens balance and drain funds by exercising options for free."

"At least 371,260 USDC were lost because of the double-spend attack on its Ethereum put options." "ETH put contracts were affected by the attack. The hacker used an exploit in Opyn protocol’s options tokens (oTokens) to steal collateral from users who sold these ETH puts." "This hack was done by calling exercise() with more than two vaults with ETH as the underlying assets. Since the implementation treats the same batch of ETH received as multiple batches of ETH receptions, the hacker re-uses that batch of ETH to retrieve the collateral USDC and make profits." "The team secured 572,165 USDC from its contract, but the hacker still got away with 371,260 USDC."

"Opyn officially issued an update on the ETH theft incident caused by platform loopholes and will fully compensate ETH put option sellers affected by the loophole. For buyers of ETH put options, the put options are redeemed at a price 20% higher than the market price."

"The team reacted responsibly to the attack, promising full reimbursement for ETH put oTokens sellers who lost money in the hack. For purchasers of ETH put oTokens, the team offered to buy the tokens with a 20% markup on Deribit to compensate them for damages." "In its latest report, the team stated that it would review its internal security and testing practices while increasing its bug bounty rewards." "While security firm OpenZeppelin [had] audited the [original] contracts, the exploit was outside of the audit’s scope." "According to PeckShield, a blockchain security company, a person with smart contract programming experience could easily spot the bug."

"While the Opyn team couldn’t take down or change the smart contract, it managed to put the protocol on hold and save some of the users’ funds. On top of that, it announced reimbursements along with smart contract audits." "[A]ll ETH put sellers [were ultimately reimbursed] in full."

This exchange or platform is based in United States, or the incident targeted people primarily in United States.

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 - Opyn Double use oToken Breach
Date Event Description
August 1st, 2020 12:00:06 AM MDT 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 $372,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

While multiple audits would have reduced the possibility for this issue to avoid detection, exploits have occurred in highly audited platforms.

Offline multi-signature storage of funds has not experienced similar breaches.

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