DFX Finance Hack
Incident Overview
DFX Finance was exploited due to a flashloan vulnerability. The attacker siphoned off 4,445,279 $USD worth of assets, and an MEV bot was able to frontrun the hacker for the additional 3,200,000 $USD.
DFX Finance is a trading protocol providing flash loans. The attacker drained 4,445,279 $USD worth of assets in various tokens and transferred 2962 $ETH through Tornado Cash. 545,312 $USD worth of $CADC stays at the attacker's address, and 135,265 $USD worth of $TRYb remains at the malicious contract used for an attack.
The malicious actor exploited a known smart contract vulnerability that allows passing the balance check after a flashloan and gives approval of tokens to the attacker. The MEV bot was able to frontrun the hacker during token transfers for an additional 3,200,000 $USD in $USDC, $NZDS, $CADC, and $GYEN tokens. The DFX team claims that they are contacting the MEV bot owners to return the lost funds.
Attacker address:
https://etherscan.io/address/0x14c19962…b9a067
Malicious contract:
https://etherscan.io/address/0x6cfa86a3…41f22d
MEV bot:
https://etherscan.io/address/0xfde0d157…81455a
Malicious transactions list:
https://etherscan.io/txs?a=0x6cfa86a3…41f22d
Incident Report
Protocol Information
What the Attacker Needed to Succeed
Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.
What Auditors Should Check
If you're auditing a protocol with similar architecture to DFX Finance, these are the critical security checks that could have prevented this incident (November 2022).
- Verify all logic paths related to Other are guarded by proper access controls and input validation
- Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs
Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.
Free TrialFunds Recovery
Recovered
$205K
Net Loss
7438861
Security Audit History
- Audit Report 1 Report
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.
Sources & References
- 01
- 02
- 03
- 04
- 05
Learn to Prevent the Next DFX Finance
The DFX Finance hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.