Securityintermediatearticle30 min read

DeFi Hacks 2023 Recap: Private Keys Are King | VCC

When security analysts tally up the defi hacks 2023 produced, one pattern dominates every other finding: it was not exotic smart-contract logic that drained the most money, it was stolen private keys. Across roughly 751 security incidents and between $1.7 billion and $2 billion in losses, a smal

Vietcardano teamTeam

Đội ngũ biên tập VietCardanoCommunity — các chuyên gia blockchain và Cardano, cung cấp nội dung giáo dục và nghiên cứu chuyên sâu cho cộng đồng.

Published September 14, 2026

When security analysts tally up the defi hacks 2023 produced, one pattern dominates every other finding: it was not exotic smart-contract logic that drained the most money, it was stolen private keys. Across roughly 751 security incidents and between $1.7 billion and $2 billion in losses, a small handful of key-compromise events caused nearly half of all stolen value. This recap walks through the year's biggest exploits — Euler Finance, the Curve Vyper bug, Multichain, Mixin Network, Atomic Wallet, and Poloniex — and explains why key custody, not code, became the headline story of 2023.

2023 DeFi hack timeline

The Big Picture: How Much Was Stolen in 2023?

The four leading security reporting firms do not agree on a single number, but they agree on the shape of the year. CertiK's Hack3d report counted $1.84 billion lost across 751 incidents, a 51% drop from 2022's $3.7 billion. Beosin put total losses from hacks, phishing, and rug pulls at $2.02 billion, with 191 major attacks accounting for about $1.4 billion. Chainalysis measured crypto theft at roughly $1.7 billion, noting that while the dollar value fell 54% year-over-year, the number of incidents actually rose from 219 to 231.

The disagreement comes down to methodology — whether you count only on-chain contract exploits, or include phishing, rug pulls, and centralized exchange hot-wallet drains. What every dataset agrees on is that DeFi remained the primary battleground, and that a single attack vector punched far above its weight.

The Dominant Vector: Private Key Compromise

CertiK attributed $880.9 million to private key compromises in just 47 incidents — 6.3% of all incidents, but roughly 48% of all losses. Beosin counted 30 key-compromise events worth about $627 million, or 44.9% of total hack losses. Halborn's Top 100 DeFi Hack Report went further, finding that in 2023 specifically, compromised private keys drove 52.2% of attacks and 55.7% of stolen value.

The implication is uncomfortable for an industry that markets itself on decentralization. Contract vulnerabilities were more frequent — Beosin logged 99 of them in 191 attacks — but each one drained less. Private key compromises were rare but catastrophic: a single stolen key could empty a bridge, an exchange hot wallet, or an entire cross-chain router. November 2023 made this brutally clear, when Poloniex, HTX/Heco Bridge, and KyberSwap Elastic were all hit within the same month.

Private key compromise flow

Euler Finance — March 13, 2023 ($197M, Returned)

The largest pure contract exploit of 2023 hit Euler Finance, a lending protocol built around its own capital-efficient eToken/dToken model. At roughly 08:50 UTC on March 13, an attacker drained about $197 million in DAI, wBTC, stETH, and USDC across five Euler pools. The exploit became the defining case study of the year for one reason: every recoverable dollar was returned by April 3, after on-chain negotiations with a hacker who identified himself as "Jacob."

The Vulnerability: donateToReserves Without a Health Check

The root cause lived in EToken::donateToReserves, a function introduced in protocol upgrade eIP-14. The function lets a user burn their own eTokens — the collateral position — as a donation to the protocol's reserves. The critical flaw: it burned collateral without performing a health check on the account, and crucially it did not burn the corresponding dTokens (the debt). This let an attacker manufacture "bad debt" on purpose.

The attack chained three Euler mechanisms together:

  1. Flash loan 30M DAI from Aave.
  2. Deposit 20M DAI to receive 20M eDAI as collateral.
  3. Call mint() to self-leverage roughly 10x, producing 195.6M eDAI collateral against 200M dDAI debt.
  4. Donate 100M eDAI to reserves — no health check fires, so the position goes underwater silently.
  5. Self-liquidate through a separate contract, capturing the dynamic liquidation discount on the discounted collateral.
  6. Withdraw the remaining ~38.9M DAI, repay the flash loan, and keep roughly 8.9M DAI profit per pool.

The exploit repeated across five pools. The deeper lesson is that donateToReserves was only dangerous because Euler combined self-collateralized leverage, a dynamic liquidation discount, and a missing invariant check in one system. Each feature was defensible in isolation; together they created a path to drain the protocol.

Euler Finance attack mechanism

Curve Finance Vyper Bug — July 30, 2023 ($70M)

If Euler was a lesson in missing invariants, the Curve exploit was a lesson in compiler trust. On July 30, roughly $70 million was drained from several Curve liquidity pools — pETH/ETH, alETH/ETH, msETH/ETH, and CRV/ETH — through a reentrancy bug that should have been impossible.

A Reentrancy Lock That Did Not Lock

The affected pools were written in Vyper versions 0.2.15, 0.2.16, and 0.3.0, and used the @nonreentrant('lock') decorator to guard against reentrant calls. The decorator is supposed to set a storage slot that blocks any re-entry while a function is executing. The bug: the Vyper compiler assigned different storage slots to the same named lock across different functions. add_liquidity and remove_liquidity both declared @nonreentrant('lock'), but the compiler placed their lock flags at different addresses, so the guard in one function did not block the other.

The result was that an attacker could call remove_liquidity, and during the callback that returns ETH to the caller (a raw_call), reenter the pool through another function while liquidity accounting was still inconsistent. The first exploit hit the JPEG'd pETH-ETH pool at 13:10 UTC, though a MEV bot front-ran the attacker and captured part of the value.

The bug had been introduced in Vyper 0.2.15 and was accidentally patched in 0.3.1 — nobody realized the reentrancy lock was broken until July 30, 2023. Only pools that performed a native ETH raw_call or held ERC-777 tokens were affected; plain WETH pools were safe because WETH transfers do not trigger callbacks. Some funds were later recovered by white-hat hackers and MEV operators who drained remaining vulnerable pools defensively.

Multichain — July 6, 2023 ($126M+, TVL Effectively Frozen)

The Multichain collapse is the clearest example of "decentralized in marketing, centralized in practice." On July 6, unauthorized withdrawals drained roughly $126 million from Multichain's Fantom bridge, Moonriver, and Dogechain — wETH, wBTC, USDC, DAI, LINK, and USDT. Later analysis suggested the total inaccessible TVL reached as high as $1.5 billion once user funds could no longer be moved.

The CEO Held All the Keys

The root cause was not a contract bug. Multichain's CEO, Zhaojun He, was arrested by Chinese police in Kunming on May 21, 2023. Hardware containing the MPC key shares was confiscated. Despite Multichain's claims of decentralized multi-party computation, all MPC servers and private keys were under the exclusive control of the CEO. When the keys left with him, the protocol lost the ability to secure its own bridges.

On July 14, the Multichain team publicly confirmed the CEO's arrest and announced the protocol would cease operations. The CEO's sister was also arrested after attempting to transfer remaining funds. Attribution remains murky — the withdrawals could have been an external compromise using stolen keys, an insider action, or a government seizure — but the structural failure is unambiguous: a cross-chain router moving billions of dollars depended on one person's hardware.

Mixin Network — September 23, 2023 ($200M)

Mixin Network lost about $200 million when the database of its cloud service provider was attacked in the early morning, Hong Kong time. Reuters, CoinDesk, and Decrypt all reported it as one of the largest crypto thefts of 2023. Mixin brought in Google's Mandiant and SlowMist to investigate.

A Decentralized Network With a Centralized Database

Mixin marketed itself as a decentralized network with 35 mainnet nodes, roughly $1 billion in assets, and about one million users. The hack exposed the gap between that marketing and the architecture: the network's asset records lived in a centralized cloud database, and when that database was compromised, the attacker could forge withdrawal records. Deposits and withdrawals were suspended immediately; internal transfers were unaffected because they only updated the (compromised) database.

The Mixin incident is the structural twin of Multichain. Both projects claimed decentralization while concentrating their security in a single off-chain component — one person's hardware in Multichain's case, one cloud database in Mixin's. The lesson is that a network is only as decentralized as its most centralized dependency.

Atomic Wallet — June 3, 2023 ($100M)

Atomic Wallet, a non-custodial wallet application, lost over $100 million across roughly 5,500 compromised user wallets in June 2023. Stolen assets included BTC, ETH, USDT, DOGE, LTC, BNB, MATIC, and TRX. In August 2023, the FBI formally attributed the attack to North Korea's Lazarus Group under its TraderTraitor designation.

Seed Compromise, Vector Unknown

The exact technical vector was never publicly established. Hypotheses included a compromised software update mechanism, seed phrase leakage through telemetry, an outdated vulnerable dependency in the transaction-signing library, and insufficient randomness in seed generation. What is known is the laundering pattern: funds were routed through the Sinbad mixer, the successor to Blender.io, consistent with Lazarus's established playbook.

Atomic Wallet matters for the 2023 recap because it shifted the target from protocols to end users. The attacker did not need to break a smart contract — they needed to compromise the software that generates and stores seed phrases. From a key-custody standpoint, a wallet app is a private key system distributed at scale.

Poloniex and HTX/Heco Bridge — November 2023 ($126M + $110M)

November was the cruelest month. On November 10, Poloniex — owned by Tron founder Justin Sun — lost about $126 million from hot wallets on Ethereum, Tron, and Bitcoin. Assets included ETH, TRX, USDT, TUSD, PEPE, FLOKI, SHIB, and BTC. CertiK ranked it the second-largest private key compromise of the year. The funds were laundered through more than 681 wallets; in an almost comic aside, the hacker fat-fingered $2.5 million in GLM tokens directly to the token contract, making them unrecoverable. Justin Sun publicly offered a 5% white-hat bounty.

Twelve days later, on November 22, HTX (formerly Huobi) and the Heco Bridge lost about $113 million. The Heco Bridge operator wallet accounted for roughly $85 million; HTX hot wallets accounted for about $30 million. Both were linked to Justin Sun. The root cause was again private key compromise: the bridge's withdrawToken function was only callable by an operator, and the operator key was stolen. Stolen ERC-20 tokens were swapped for ETH and dispersed across multiple wallets.

Together, Poloniex and HTX/Heco pushed total private key compromise losses in 2023 past $800 million — 56% of all losses for the year, per CertiK. Two Justin Sun-linked entities, hit twelve days apart, both through hot-wallet key management failures.

Loss breakdown by attack type

KyberSwap Elastic — November 22-23, 2023 ($55M)

The November run closed with KyberSwap Elastic, a concentrated liquidity AMM based on Uniswap V3 with a reinvestment curve. An attacker stole about $55 million across multiple chains — Ethereum, Arbitrum, and others — impacting 2,367 unique liquidity providers.

Precision Loss in Tick Math

The vulnerability lived in computeSwapStep(). The function calcReachAmount() calculated the input needed to reach a target price, but a rounding error caused nextSqrtP to slightly exceed targetSqrtP. The code then used an inequality check (!=) instead of a proper comparison, so _updateLiquidityAndCrossTick was bypassed. Liquidity was not removed when crossing a tick, leading to double-counted liquidity.

The attacker manipulated empty tick ranges, became the sole liquidity provider in those ranges, and then exploited the rounding error to extract value that should not have existed. KyberSwap is the 2023 example of why concentrated liquidity AMMs demand formal verification of their tick math — a one-wei rounding error, repeated across a swap, became a $55 million drain.

Why Private Keys Dominated in 2023

Pulling the year together, six structural reasons explain why key compromise overtook contract bugs as the dominant loss vector:

  1. Centralized custody of decentralized systems. Multichain's CEO held all MPC shares; Mixin kept asset records in one cloud database. Both created single points of failure inside projects that claimed decentralization.
  2. Exchange hot-wallet key management failures. Poloniex and HTX both lost operator keys to hot wallets holding nine figures.
  3. Lazarus Group targeting key custody infrastructure. The FBI attributed Atomic Wallet to DPRK's TraderTraitor program. North Korean APTs increasingly focused on the custody layer rather than on-chain logic, because that is where the largest pools of keys live.
  4. Supply-chain attacks on wallet software. Atomic Wallet showed that compromising a wallet app's update or signing pipeline scales the attack to every user of that app.
  5. Social engineering and phishing of key holders. Off-chain human compromise remained a reliable entry point, especially for exchange and bridge operators.
  6. Inadequate multisig and MPC implementations. Multichain's "MPC" was not really multiparty if one person held every share. A multisig that one person can sign alone is just a single-sig with extra steps.

The asymmetry is the key insight: contract vulnerabilities are high frequency, low individual impact (51.8% of incidents, but spread across many smaller pools), while private key compromises are low frequency, high impact (6.3% of incidents, ~48% of losses). Defenders in 2024 should have spent disproportionately more on key custody than on yet another contract audit.

Lessons Learned: A Defense Checklist

The 2023 hacks map cleanly onto a short list of defenses. None of them are new; all of them were ignored by at least one victim.

Defense checklist for DeFi protocols
  1. Distributed key custody. No single person should control all signing keys, MPC shares, or operator credentials. Multichain failed this in the most expensive way possible.
  2. Hardware security modules (HSMs). Keys that move billions of dollars belong in HSMs with policy-enforced signing limits, not on a CEO's laptop.
  3. Timelocks and multisig for withdrawals. A withdrawal that requires a timelock and multiple independent signers cannot be drained in a single transaction, even if one key is stolen.
  4. Compiler version pinning and re-audit on upgrade. The Curve Vyper bug survived for years because nobody re-verified that @nonreentrant actually locked across function boundaries after compiler changes.
  5. Health checks on every state-changing function. Euler's donateToReserves burned collateral without checking account health. Any function that mutates collateral or debt must enforce the protocol's solvency invariant.
  6. Decentralized infrastructure, not just decentralized contracts. Mixin's on-chain nodes were irrelevant once its off-chain database was compromised. Audit the off-chain dependencies, not just the smart contracts.
  7. Formal verification for AMM math. KyberSwap's tick-crossing rounding error is exactly the class of bug that formal verification catches and audits miss. Concentrated liquidity AMMs should treat their math as safety-critical code.

FAQ

How much was stolen in DeFi hacks in 2023?

Between $1.7 billion and $2 billion, depending on the reporting firm. CertiK counted $1.84 billion across 751 incidents; Beosin counted $2.02 billion including phishing and rug pulls; Chainalysis measured $1.7 billion in stolen crypto. DeFi-specific losses were around $1.1 billion per Chainalysis, down sharply from 2022.

What was the biggest DeFi hack of 2023?

By contract-vulnerability losses, Euler Finance at $197 million on March 13. By private key compromise, Mixin Network at $200 million on September 23 and Multichain at $126 million-plus on July 6 (with much larger TVL effectively frozen). Euler is notable because nearly all stolen funds were returned by April 3.

Why were private key compromises the dominant attack vector in 2023?

Because they are low frequency, high impact. CertiK found just 47 key-compromise incidents (6.3% of all incidents) caused $880.9 million (48% of all losses). A single stolen operator key can drain a bridge or exchange hot wallet in one transaction, whereas contract exploits typically hit one pool at a time.

Was the Curve Finance hack a smart contract bug?

It was a compiler bug in Vyper, not a bug in the Curve pool code itself. The @nonreentrant('lock') decorator was supposed to prevent reentrancy, but Vyper versions 0.2.15–0.3.0 assigned different storage slots to the same lock across functions, making the guard ineffective. The bug was accidentally patched in Vyper 0.3.1 and went unnoticed until July 30, 2023.

Who was behind the Atomic Wallet hack?

The FBI attributed the Atomic Wallet hack to North Korea's Lazarus Group (DPRK TraderTraitor program) in August 2023. Funds were laundered through the Sinbad mixer. The exact technical vector — compromised update, seed leakage, or weak randomness — was never publicly confirmed.

Were any 2023 DeFi hack funds recovered?

Yes. Euler Finance recovered nearly all $197 million after on-chain negotiations with the attacker. Some Curve funds were recovered by white-hat hackers and MEV bots who drained remaining vulnerable pools defensively. Most private-key-compromise losses (Multichain, Mixin, Poloniex, HTX) were not recovered.

Conclusion

The defi hacks 2023 produced tell a consistent story: the industry got measurably better at writing smart contracts and measurably worse at guarding keys. Total losses fell year-over-year, contract-audit culture matured, and yet a handful of key-compromise events still accounted for nearly half of all stolen value. The Euler recovery and the Curve white-hat response showed that the DeFi security community can mobilize quickly. The Multichain, Mixin, Poloniex, and Atomic Wallet incidents showed that the community still treats key custody as an afterthought.

If 2023 taught one lesson, it is this: private keys are king. Until key custody is treated with the same rigor as contract auditing — distributed across independent holders, enforced by hardware, gated by timelocks, and audited as part of the off-chain infrastructure — the next year's recap will look much the same.

Tags:

defi hacks 2023euler finance hackcurve vyper bugmultichain hackmixin network hackdefi exploits 2023private key compromise defi