Hegic Exchange Funds Locked: Difference between revisions

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Jump to navigation Jump to search
No edit summary
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/hegicexchangefundslocked.php}}
{{Imported Case Study 2|source=https://www.quadrigainitiative.com/casestudy/hegicexchangefundslocked.php}}
{{Unattributed Citations}}
{{Unattributed Sources}}


[[File:Hegicexchange.jpg|thumb|Hegic Exchange]]Customer funds on the Hegic Exchange platform were locked up due to a typo in the smart contract. The platform had requested a code review by an auditing firm, and that firm failed to notice the issue at the time.
[[File:Hegicexchange.jpg|thumb|Hegic Exchange]]Customer funds on the Hegic Exchange platform were locked up due to a typo in the smart contract. The platform had requested a code review by an auditing firm, and that firm failed to notice the issue at the time.
Line 6: Line 6:
In the end, the amount lost was not that significant (compared to other incidents) and was fully reimbursed by Hegic.
In the end, the amount lost was not that significant (compared to other incidents) and was fully reimbursed by Hegic.


This is a global/international case not involving a specific country.
This is a global/international case not involving a specific country.<ref name="immunebytes-675" /><ref name="cryptobriefing-825" /><ref name="hegicoptionstwitter-826" /><ref name="cryptobriefing-827" /><ref name="hegic-828" /><ref name="hegicoptionstwitter-829" /><ref name="hegicoptionstwitter-830" /><ref name="github-831" /><ref name="albaronventures-832" /><ref name="hegicoptionstwitter-833" /><ref name="davidgerard-834" /><ref name="hegicoptionstwitter-835" /><ref name="dguidotwitter-836" /><ref name="mycryptomedium-837" /><ref name="unchainedpodcast-838" /><ref name="slowmisthacked-678" /><ref name="samczsungithub-1156" /><ref name="openzeppelinforum-1155" /><ref name="githubusercontent-1972" /><ref name="xrpfan-1973" /><ref name="cryptobriefing-1974" /><ref name="defiweekly-1975" /><ref name="certik-1776" /><ref name="insights-5644" /><ref name="unnamed-12199" />
<ref name="immunebytes-675" /><ref name="cryptobriefing-825" /><ref name="hegicoptionstwitter-826" /><ref name="cryptobriefing-827" /><ref name="hegic-828" /><ref name="hegicoptionstwitter-829" /><ref name="hegicoptionstwitter-830" /><ref name="github-831" /><ref name="albaronventures-832" /><ref name="hegicoptionstwitter-833" /><ref name="davidgerard-834" /><ref name="hegicoptionstwitter-835" /><ref name="dguidotwitter-836" /><ref name="mycryptomedium-837" /><ref name="unchainedpodcast-838" /><ref name="slowmisthacked-678" /><ref name="samczsungithub-1156" /><ref name="openzeppelinforum-1155" /><ref name="githubusercontent-1972" /><ref name="xrpfan-1973" /><ref name="cryptobriefing-1974" /><ref name="defiweekly-1975" /><ref name="certik-1776" /><ref name="insights-5644" />


== About Hegic Exchange ==
== About Hegic Exchange ==
Line 57: Line 56:
!Description
!Description
|-
|-
|April 24th, 2020 12:00:00 AM
|April 24th, 2020
|Main Event
|Main Event
|Expand this into a brief 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 65: Line 64:
|
|
|}
|}
== 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 ==
Line 84: Line 86:
== 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 ==
Smart contracts are generally too complex to prove that they are error-free. Storage in offline multi-signature wallets is generally simpler and possible to validated. It's important to always test that wallets are set up correctly.
== Individual Prevention Policies ==
{{Prevention:Individuals:Placeholder}}


== Prevention Policies ==
{{Prevention:Individuals:End}}
Smart contracts are generally too complex to prove that they are error-free. Storage in offline multi-signature wallets is generally simpler and possible to validated. It's important to always test that wallets are set up correctly.
 
== Platform Prevention Policies ==
{{Prevention:Platforms:Placeholder}}
 
{{Prevention:Platforms:End}}
 
== Regulatory Prevention Policies ==
{{Prevention:Regulators:Placeholder}}
 
{{Prevention:Regulators:End}}


== References ==
== References ==
<references><ref name="immunebytes-675">[https://immunebytes.com/crypto-hacks-2020-a-comprehensive-list/ Crypto Hacks 2020: A Comprehensive List - ImmuneBytes] (May 17, 2021)</ref>
<references><ref name="immunebytes-675">[https://immunebytes.com/crypto-hacks-2020-a-comprehensive-list/ Crypto Hacks 2020: A Comprehensive List - ImmuneBytes] (May 18, 2021)</ref>
 
<ref name="cryptobriefing-825">[https://cryptobriefing.com/50-million-lost-the-top-19-defi-cryptocurrency-hacks-2020/ Millions Lost: The Top 19 DeFi Cryptocurrency Hacks of 2020 | Crypto Briefing] (May 22, 2021)</ref>


<ref name="cryptobriefing-825">[https://cryptobriefing.com/50-million-lost-the-top-19-defi-cryptocurrency-hacks-2020/ Millions Lost: The Top 19 DeFi Cryptocurrency Hacks of 2020 | Crypto Briefing] (May 21, 2021)</ref>
<ref name="hegicoptionstwitter-826">[https://twitter.com/HegicOptions/status/1258890028777902080 @HegicOptions Twitter] (May 23, 2021)</ref>


<ref name="hegicoptionstwitter-826">[https://twitter.com/HegicOptions/status/1258890028777902080 @HegicOptions Twitter] (May 22, 2021)</ref>
<ref name="cryptobriefing-827">[https://cryptobriefing.com/hegic-new-age-options-trading-protocol/ Hegic: New Age Options Trading Protocol | Crypto Briefing] (May 24, 2021)</ref>


<ref name="cryptobriefing-827">[https://cryptobriefing.com/hegic-new-age-options-trading-protocol/ Hegic: New Age Options Trading Protocol | Crypto Briefing] (May 23, 2021)</ref>
<ref name="hegic-828">[https://www.hegic.co/ Hegic: On-chain options trading protocol on Ethereum] (May 24, 2021)</ref>


<ref name="hegic-828">[https://www.hegic.co/ Hegic: On-chain options trading protocol on Ethereum] (May 23, 2021)</ref>
<ref name="hegicoptionstwitter-829">[https://twitter.com/HegicOptions/status/1253501029108285442 @HegicOptions Twitter] (May 24, 2021)</ref>


<ref name="hegicoptionstwitter-829">[https://twitter.com/HegicOptions/status/1253501029108285442 @HegicOptions Twitter] (May 23, 2021)</ref>
<ref name="hegicoptionstwitter-830">[https://twitter.com/HegicOptions/status/1253954145113038849 @HegicOptions Twitter] (May 24, 2021)</ref>


<ref name="hegicoptionstwitter-830">[https://twitter.com/HegicOptions/status/1253954145113038849 @HegicOptions Twitter] (May 23, 2021)</ref>
<ref name="github-831">[https://github.com/trailofbits/publications/blob/master/reviews/hegic-summary.pdf publications/hegic-summary.pdf at master · trailofbits/publications · GitHub] (May 24, 2021)</ref>


<ref name="github-831">[https://github.com/trailofbits/publications/blob/master/reviews/hegic-summary.pdf publications/hegic-summary.pdf at master · trailofbits/publications · GitHub] (May 23, 2021)</ref>
<ref name="albaronventures-832">[https://albaronventures.com/hegic-analysis-report/ Hegic Analysis Report: Non-Custodial Options Protocol | Albaron Ventures] (May 24, 2021)</ref>


<ref name="albaronventures-832">[https://albaronventures.com/hegic-analysis-report/ Hegic Analysis Report: Non-Custodial Options Protocol | Albaron Ventures] (May 23, 2021)</ref>
<ref name="hegicoptionstwitter-833">[https://twitter.com/HegicOptions/status/1253937104666742787 @HegicOptions Twitter] (May 24, 2021)</ref>


<ref name="hegicoptionstwitter-833">[https://twitter.com/HegicOptions/status/1253937104666742787 @HegicOptions Twitter] (May 23, 2021)</ref>
<ref name="davidgerard-834">[https://davidgerard.co.uk/blockchain/2020/04/26/the-dforce-and-hegic-defi-exploits-and-why-smart-contracts-are-bad/ The dForce and Hegic DeFi exploits, and why Smart Contracts are bad – Attack of the 50 Foot Blockchain] (May 24, 2021)</ref>


<ref name="davidgerard-834">[https://davidgerard.co.uk/blockchain/2020/04/26/the-dforce-and-hegic-defi-exploits-and-why-smart-contracts-are-bad/ The dForce and Hegic DeFi exploits, and why Smart Contracts are bad – Attack of the 50 Foot Blockchain] (May 23, 2021)</ref>
<ref name="hegicoptionstwitter-835">[https://twitter.com/HegicOptions/status/1254439297463324673 @HegicOptions Twitter] (May 24, 2021)</ref>


<ref name="hegicoptionstwitter-835">[https://twitter.com/HegicOptions/status/1254439297463324673 @HegicOptions Twitter] (May 23, 2021)</ref>
<ref name="dguidotwitter-836">[https://twitter.com/dguido/status/1254260725431894020 @dguido Twitter] (May 24, 2021)</ref>


<ref name="dguidotwitter-836">[https://twitter.com/dguido/status/1254260725431894020 @dguido Twitter] (May 23, 2021)</ref>
<ref name="mycryptomedium-837">[https://medium.com/mycrypto/defi-sharing-the-risks-rewards-and-responsibility-59bca497a7d1 Defi Sharing The Risks Rewards And Responsibility] (May 24, 2021)</ref>


<ref name="mycryptomedium-837">[https://medium.com/mycrypto/defi-sharing-the-risks-rewards-and-responsibility-59bca497a7d1 Defi Sharing The Risks Rewards And Responsibility] (May 23, 2021)</ref>
<ref name="unchainedpodcast-838">[https://unchainedpodcast.com/defi-security-with-so-many-hacks-will-it-ever-be-safe/ DeFi Security: With So Many Hacks, Will It Ever Be Safe? - Unchained Podcast] (May 24, 2021)</ref>


<ref name="unchainedpodcast-838">[https://unchainedpodcast.com/defi-security-with-so-many-hacks-will-it-ever-be-safe/ DeFi Security: With So Many Hacks, Will It Ever Be Safe? - Unchained Podcast] (May 23, 2021)</ref>
<ref name="slowmisthacked-678">[https://hacked.slowmist.io/en/?c=ETH%20DApp SlowMist Hacked - SlowMist Zone] (May 18, 2021)</ref>


<ref name="slowmisthacked-678">[https://hacked.slowmist.io/en/?c=ETH%20DApp SlowMist Hacked - SlowMist Zone] (May 17, 2021)</ref>
<ref name="samczsungithub-1156">[https://gist.github.com/samczsun/e3eb996d31b2c18a868a7b3118df2ecd Hegic Exploit · GitHub] (Jun 23, 2021)</ref>


<ref name="samczsungithub-1156">[https://gist.github.com/samczsun/e3eb996d31b2c18a868a7b3118df2ecd Hegic Exploit · GitHub] (Jun 22, 2021)</ref>
<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>


<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 22, 2021)</ref>
<ref name="githubusercontent-1972">[https://raw.githubusercontent.com/hegic/cryptoanonsense/main/%5BBOOK%5D%20CRYPTO%20ANONSENSE.pdf <nowiki>CRYPTO ANONSENSE [Book]</nowiki>] (Jul 29, 2021)</ref>


<ref name="githubusercontent-1972">[https://raw.githubusercontent.com/hegic/cryptoanonsense/main/%5BBOOK%5D%20CRYPTO%20ANONSENSE.pdf <nowiki>CRYPTO ANONSENSE [Book]</nowiki>] (Jul 28, 2021)</ref>
<ref name="xrpfan-1973">[https://xrp.fan/hegic-unlock-function-bug-or-three-defi-development-mistakes-that-i-feel-sorry-about/ Hegic Unlock Function Bug or Three DeFi Development Mistakes That I Feel Sorry About - XRP Ripple FAN] (Jul 29, 2021)</ref>


<ref name="xrpfan-1973">[https://xrp.fan/hegic-unlock-function-bug-or-three-defi-development-mistakes-that-i-feel-sorry-about/ Hegic Unlock Function Bug or Three DeFi Development Mistakes That I Feel Sorry About - XRP Ripple FAN] (Jul 28, 2021)</ref>
<ref name="cryptobriefing-1974">[https://cryptobriefing.com/defi-bug-freezes-30000-ether-forever/ DeFi Bug Freezes $30,000 of Ether Forever | Crypto Briefing] (Jul 29, 2021)</ref>


<ref name="cryptobriefing-1974">[https://cryptobriefing.com/defi-bug-freezes-30000-ether-forever/ DeFi Bug Freezes $30,000 of Ether Forever | Crypto Briefing] (Jul 28, 2021)</ref>
<ref name="defiweekly-1975">[https://defiweekly.substack.com/p/hegic-vs-trail-of-bits-and-the-issue-be2 No Title] (Jul 29, 2021)</ref>


<ref name="defiweekly-1975">[https://defiweekly.substack.com/p/hegic-vs-trail-of-bits-and-the-issue-be2 No Title] (Jul 28, 2021)</ref>
<ref name="certik-1776">[https://www.certik.org/blog/blockchain-hacks-2020-15-billion-lost-how-can-we-mitigate-hacks-in-2021 Blockchain Hacks: 2020 | $15 billion lost, how can we mitigate hacks in 2021? | CertiK Foundation Blog] (Jul 23, 2021)</ref>


<ref name="certik-1776">[https://www.certik.org/blog/blockchain-hacks-2020-15-billion-lost-how-can-we-mitigate-hacks-in-2021 Blockchain Hacks: 2020 | $15 billion lost, how can we mitigate hacks in 2021? | CertiK Foundation Blog] (Jul 22, 2021)</ref>
<ref name="insights-5644">[https://insights.deribit.com/market-research/examining-decentralized-options-platforms/ Examining Decentralized Options Platforms - Deribit Insights] (Jan 15, 2022)</ref>


<ref name="insights-5644">[https://insights.deribit.com/market-research/examining-decentralized-options-platforms/ Examining Decentralized Options Platforms - Deribit Insights] (Jan 15, 2022)</ref></references>
<ref name="unnamed-12199">[https://web.archive.org/web/20200915094347/https://codefi.consensys.net/blog/security-risks-in-ethereum-defi?utm_campaign=ConsenSys%20Newsletter&utm_medium=email&_hsmi=88736023&utm_content=88730521&utm_source=hs_email Security Risks in Ethereum DeFi | ConsenSys Codefi] (Nov 15, 2023)</ref></references>

Latest revision as of 14:06, 10 May 2024

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!

Hegic Exchange

Customer funds on the Hegic Exchange platform were locked up due to a typo in the smart contract. The platform had requested a code review by an auditing firm, and that firm failed to notice the issue at the time.

In the end, the amount lost was not that significant (compared to other incidents) and was fully reimbursed by Hegic.

This is a global/international case not involving a specific country.[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25]

About Hegic Exchange

"Hegic is an options protocol taking a fresh approach to minting and trading options." "Trade non-custodial options for profits or to hedge your positions. Enjoy fixed price and unlimited upside of the options contracts. No registration, KYC or email required.". "Traders and holders can use options on Hegic to insure against price volatility. Consider ETH is worth $500, and a user buys an option contract, which enables them to sell one ETH for 500 DAI within some time window. If ETH price tanks to $400, the user can safely exercise the contract, liquidating their position for 500 DAI." "Hegic Protocol V1 code has been audited by @trailofbits. Security audit includes HegicOptions, HegicCallOptions, HegicPutOptions, ETHPool and ERCPool contracts."

"Hegic made its debut on the mainnet on 23rd April 2020, hours after going live, they claimed to have a bug in the smart contract. The bug locked user funds into expired options contracts, rendering them permanently inaccessible. Up to $48,000 worth of funds were forever locked up in the platform’s smart contract." "All found issues were fixed and now IT IS MUCH SAFER TO USE THE CONTRACTS!"

"The options platform Hegic wasn’t attacked by anyone, yet a typo in the project’s code led to freezing users’ assets." "It’s NOT a security issue. It’s an incorrect function name (optionIDs instead of optionsIDs). This function unlocks liquidity in expired contracts. If it doesn’t work, funds are just forever locked. It can’t be used by a malicious actor. @trailofbits did their job well."

"Trail of Bits was not so happy that Hegic claimed they had “audited” the smart contract. CEO Dan Guido asked them in a tweet: “Please stop holding up a 3-day code review as an ‘audit’ that proves the code is safe.”"

"Hegic’s founder reimbursed everyone who suffered."

"As the liquidity is [forever] locked on the old contracts with a bug, all the LPs who have suffered losses due to the bug have received a 100% refund. Those who have closed their options early, have also received a 100% refund. $47,765 in total was paid out to LPs & holders."

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 - Hegic Exchange Funds Locked
Date Event Description
April 24th, 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

The total amount lost has been estimated at $48,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

Smart contracts are generally too complex to prove that they are error-free. Storage in offline multi-signature wallets is generally simpler and possible to validated. It's important to always test that wallets are set up correctly.

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

  1. Crypto Hacks 2020: A Comprehensive List - ImmuneBytes (May 18, 2021)
  2. Millions Lost: The Top 19 DeFi Cryptocurrency Hacks of 2020 | Crypto Briefing (May 22, 2021)
  3. @HegicOptions Twitter (May 23, 2021)
  4. Hegic: New Age Options Trading Protocol | Crypto Briefing (May 24, 2021)
  5. Hegic: On-chain options trading protocol on Ethereum (May 24, 2021)
  6. @HegicOptions Twitter (May 24, 2021)
  7. @HegicOptions Twitter (May 24, 2021)
  8. publications/hegic-summary.pdf at master · trailofbits/publications · GitHub (May 24, 2021)
  9. Hegic Analysis Report: Non-Custodial Options Protocol | Albaron Ventures (May 24, 2021)
  10. @HegicOptions Twitter (May 24, 2021)
  11. The dForce and Hegic DeFi exploits, and why Smart Contracts are bad – Attack of the 50 Foot Blockchain (May 24, 2021)
  12. @HegicOptions Twitter (May 24, 2021)
  13. @dguido Twitter (May 24, 2021)
  14. Defi Sharing The Risks Rewards And Responsibility (May 24, 2021)
  15. DeFi Security: With So Many Hacks, Will It Ever Be Safe? - Unchained Podcast (May 24, 2021)
  16. SlowMist Hacked - SlowMist Zone (May 18, 2021)
  17. Hegic Exploit · GitHub (Jun 23, 2021)
  18. List of Ethereum Smart Contracts Post-Mortems - Security - OpenZeppelin Community (Jun 23, 2021)
  19. CRYPTO ANONSENSE [Book] (Jul 29, 2021)
  20. Hegic Unlock Function Bug or Three DeFi Development Mistakes That I Feel Sorry About - XRP Ripple FAN (Jul 29, 2021)
  21. DeFi Bug Freezes $30,000 of Ether Forever | Crypto Briefing (Jul 29, 2021)
  22. No Title (Jul 29, 2021)
  23. Blockchain Hacks: 2020 | $15 billion lost, how can we mitigate hacks in 2021? | CertiK Foundation Blog (Jul 23, 2021)
  24. Examining Decentralized Options Platforms - Deribit Insights (Jan 15, 2022)
  25. Security Risks in Ethereum DeFi | ConsenSys Codefi (Nov 15, 2023)