DFX Finance Hack

Reported loss $7.6M
Ethereum
Other

What happened

On November 10, 2022, DFX Finance's Ethereum swapping contracts were exploited through their flashloan and deposit flow. The attacker borrowed pool tokens, deposited them during the flashloan callback so the pool's balance check passed, received LP tokens, and then withdrew the underlying assets. Independent analyses estimate the profit or loss at approximately $4 million to $5 million.

How it happened

  1. The attacker used DFX's pair-contract flashloan to borrow pool tokens.
  2. During the flashloan callback, the attacker deposited the borrowed tokens, with additional tokens, back into the pool.
  3. That deposit increased the pool balances and bypassed its repayment check while minting LP tokens to the attacker.
  4. The attacker then burned the LP tokens through withdraw() and received the pool assets.

Protocol details

Classification Exchange (DEX) / Protocol Logic / Reentrancy
Protocol Type DEX
Affected asset / contract DFX-XIDR-v2
Implementation language Solidity
Protocol links Website @DFXFinance

Security review history

Funds Recovery

2.7%

Recovered

$205K

Net Loss

$7,438,861

Post-Incident Timeline

  • 2022-11-19

    The DFX Finance started a multi-phase recovering plan. The project already provided 2,000,000 $DFX tokens which are worth 204,800 $USD at the moment to help recover affected Liquidity Pools. The funds to be recovered were fully calculated and published.

Understand the attack patterns

Build your security review skills

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