> For the complete documentation index, see [llms.txt](https://www.digitalnations.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.digitalnations.xyz/web3-overview/challenges/hacks-and-scams/code-exploits.md).

# Code Exploits

Like any piece of software, smart contracts with poorly written code have significant vulnerabilities.  This is common across the cryptocurrency sphere and the DeFi, NFT, DAO, Smart Contract and Web3 spaces have all suffered exploits.&#x20;

Projects lost hundreds of millions to hacks in 2021.  Notable exploits include:&#x20;

&#x20;                                                                           **Notable Hacks in 2021**

<figure><img src="/files/0pn32zMRfWXXjI9h3CsT" alt=""><figcaption><p>Source: <a href="https://go.chainalysis.com/2022-Crypto-Crime-Report.html">Chainalysis 2022 Crypto Crime Report</a></p></figcaption></figure>

This is not a new phenomenon and hacks have plagued the space since inception.  Indeed, one of the first Bitcoin exchanges known as Mt. Gox – which handled 70% of all Bitcoin transactions at the time – was hacked in 2014 and 750K BTC were stolen (worth over $16 billion today – September 12th, 2022).

In addition, the first DAO, known simply as “The DAO”, was also the victim of an exploit.  The project launched in 2016 and raised $150 million worth of Ether.  Less than three months after launching, it was hacked, causing the project to lose $60 million.&#x20;

The DAO hack caused controversy on many levels in the space.  Notably, there was a debate on whether or not to reverse the transaction.  Doing so would effectively return the funds, but also go against the spirit of decentralization and set a poor precedent.

Voters ultimately decided to reverse the attack, “forking” Ethereum blockchain into:

* Ethereum:  The version that restores the funds lost in the attack to their original addresses.  This is the chain that most people use today
* Ethereum Classic:  The original chain that preserves the hack.  Classic is much less popular and trades at approximately 2% of the value of ETH&#x20;

Although the funds were restored, the hacker did not lose out entirely, as he or she still retains possession of Ethereum Classic coins which are now worth over $100 million.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.digitalnations.xyz/web3-overview/challenges/hacks-and-scams/code-exploits.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
