Curve DEX Hack

Reported loss $575K
Ethereum
DNS Spoofing

What happened

On August 9, 2022, an attacker hijacked the DNS of Curve Finance's main frontend, curve.fi, and pointed it at a cloned site. The clone asked visitors to approve token spending by a malicious, unverified contract, which the attacker then used to pull USDC and DAI from the wallets that approved it. Curve's smart contracts were not affected.

Curve founder Michael Egorov said the nameservers of its DNS registrar, iwantmyname, had been compromised, not Curve's own registrar account. Curve moved users to its unaffected curve.exchange domain, told anyone who had approved contracts in the past few hours to revoke them, and reverted the hijack within hours.

Loss figures differ. Rekt put it at about 340 ETH (~$575k). CertiK counted $612,724 in USDC and DAI taken from seven victims. The attacker converted the stablecoins to about 362 ETH and moved it on:

  • 292 ETH to FixedFloat, which froze 112 ETH
  • 20 ETH to Binance
  • 27.7 ETH to Tornado Cash

On August 12, Binance CEO Changpeng Zhao said the exchange had frozen or recovered about $450k of the stolen funds, which Decrypt described as more than 83% of the theft. Binance said it was working with law enforcement to return the funds to users.

Malicious contract: [0x9eb5f8e83359bb5013f3d8eee60bdce5654e8881](Address 0x9eb5…8881)

Attacker: [0x50f9202e0f1c1577822bd67193960b213cd2f331](Address 0x50f9…f331)

Example drain transaction: [0x525fb894...](Tx 0x525f…a5e4)

How it happened

  1. The attacker gained control of DNS resolution for curve.fi by compromising the nameservers of Curve's registrar, iwantmyname, and pointed the domain at a cloned Curve site.
  2. Code injected into the clone asked visitors to approve an unverified contract, 0x9eb5...8881, to spend their tokens.
  3. The attacker used those approvals to move USDC and DAI from seven wallets to the attacker's address.
  4. The attacker swapped the stablecoins for about 362 ETH and sent it to FixedFloat, Binance and Tornado Cash.
  5. Curve reverted the DNS change and told users to revoke approvals. FixedFloat froze 112 ETH, and Binance later said it had frozen or recovered about $450k.

Protocol details

Classification Infrastructure / Frontend & Infrastructure / Exchange (DEX)
Protocol Type DEX
Affected asset / contract CRV
Protocol links Website @CurveFinance

Funds Recovery

78.3%

Recovered

$450K

Net Loss

$124,775

Understand the attack patterns

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.