What is a smart contract exploit, and do audits prevent them?
A smart contract exploit uses a flaw in a contract's code to take funds in a way its builders never meant, for example by calling back in before a withdrawal finishes or by pushing a price feed off.1,2 The FBI suggests checking for independent code audits, but ethereum.org warns that audits won't catch every bug.1,2
What an exploit is
A smart contract is a program stored on a blockchain that runs by itself when set conditions are met.3 The FBI also describes it as a contract whose terms are written directly into code.1 In 2022, it warned that criminals were increasingly exploiting weaknesses in the smart contracts behind DeFi platforms to steal investors' crypto.1
Code on a blockchain is hard to fix. ethereum.org says that once a contract is deployed, a flaw can't simply be patched, because the code at that address can't be changed.2 It says it is estimated that over $1 billion has been stolen or lost through security flaws in smart contracts.2
Three common kinds
- Reentrancy. A malicious contract calls back into a vulnerable one before the first call has finished. If the balance isn't updated yet, it can withdraw again and again. ethereum.org says this is what happened in the 2016 DAO hack.2 Module 2 mentions that hack.
- Price manipulation. If a lending app reads a price from a single trading pool, an attacker can push that price up with a flash loan, and then borrow more than they should.2 ethereum.org describes a flash loan as one borrowed without collateral and paid back within the same transaction.4 The FBI described one case where attackers exploited several flaws, including the platform's use of a single price feed, to steal about $35 million.1 Module 15 covers price feeds and the Mango Markets case.
- Broken checks. The FBI described a token bridge with a signature-checking flaw that let an attacker withdraw all its funds, about $320 million.1
Keys, not code
Not every big hack is a code bug. Some steal the private keys or approvals that control the money.5,6
- Harmony's Horizon bridge. In January 2023, the FBI said North Korea's Lazarus Group stole $100 million in crypto from this bridge in June 2022. It linked the attack to the "TraderTraitor" malware campaign from Lesson 1.7
- Bybit. The FBI said North Korea was responsible for the theft of about $1.5 billion from the exchange Bybit in February 2025.8 Module 9 covers how it happened, and the Ronin bridge hack.
A case that ended in court
In April 2024, US prosecutors in New York announced a sentence for hacking two decentralised exchanges in July 2022.9
- The first hack. Prosecutors said the man used fake pricing data to create about $9 million of inflated fees, which he then withdrew.9
- The second hack. Prosecutors said he used a flaw in the smart contracts of an exchange called Nirvana Finance to buy crypto below the price the contract was meant to allow. The $3.6 million he took was about all of Nirvana's funds, and it shut down soon after.9
- Who he was. A senior security engineer whose CV listed skills in reverse engineering smart contracts and blockchain audits.9
- How it ended. He pleaded guilty to computer fraud and was sentenced to three years in prison. He was ordered to forfeit about $12.3 million and a significant quantity of crypto, and to pay over $5 million to the two exchanges.9 The US Attorney called it the first ever conviction for the hack of a smart contract.9
Audits help, but don't guarantee
A code audit is an independent review of a contract's code to find weaknesses. The FBI suggests investors check that a DeFi platform has had one or more audits by independent auditors.1 It also warns about pools with very short windows to join and contracts launched in a rush, especially without an audit.1
ethereum.org warns developers not to treat audits as a silver bullet, because audits won't catch every bug.2 It also describes bug bounties: rewards for people who find and report flaws instead of using them.2
Chainalysis notes one hopeful trend. In 2025, the money held in DeFi recovered from its 2023 lows, but losses from DeFi hacks did not rise with it.5
- Cyber Criminals Increasingly Exploit Vulnerabilities in Decentralized Finance Platforms to Obtain Cryptocurrency, Causing Investors to Lose Money (Alert I-082922-PSA). FBI Internet Crime Complaint Center, 29 August 2022.
- Smart contract security. ethereum.org developer docs, page updated 7 October 2026.
- Scammers Target and Exploit Owners of Cryptocurrencies in Liquidity Mining Scam (Alert I-072122-PSA). FBI Internet Crime Complaint Center, 21 July 2022.
- Decentralized finance (DeFi). ethereum.org, page updated 26 July 2026.
- 2025 Crypto Theft Reaches $3.4 Billion (2026 Crypto Crime Report). Chainalysis, a blockchain analytics firm, 18 December 2025.
- TraderTraitor: North Korean State-Sponsored APT Targets Blockchain Companies (Advisory AA22-108A). US Cybersecurity and Infrastructure Security Agency (CISA), with the FBI and the US Treasury (marked as archived content), 18 April 2022.
- FBI Confirms Lazarus Group Cyber Actors Responsible for Harmony's Horizon Bridge Currency Theft. US Federal Bureau of Investigation, press release (read through the Internet Archive copy of 2 January 2024, as fbi.gov refused automated access), 23 January 2023.
- North Korea Responsible for $1.5 Billion Bybit Hack (Alert I-022625-PSA). FBI Internet Crime Complaint Center, 26 February 2025.
- Former Security Engineer Sentenced To Three Years In Prison For Hacking Two Decentralized Cryptocurrency Exchanges. US Department of Justice, US Attorney's Office for the Southern District of New York, press release 24-129 (read through the Internet Archive copy of 7 December 2025, as justice.gov showed a bot check), 12 April 2024.
General education built from the publicly available sources listed above. Not financial, legal, tax or investment advice. Naming a company, project or regulator is not an endorsement either way. Last checked 2026-10-22. Terms and disclaimer.