DODO AMM Hack
Incident Overview
The exploits targeted several DODO V2 Crowdpools, namely the WSZO, WCRES, ETHA, and FUSI pool.
The DODO V2 Crowdpooling smart contract has a bug that allows the init() function to be called multiple times. This means that an exploiter can perform an attack with the following steps:
1. Exploiter creates a counterfeit token and initializes the smart contract with it by calling the init() function.
2. Exploiter calls the sync() function and sets the “reserve” variable, which represents the token balance, to 0.
3. Exploiter calls init() again to re-initialize - this time with a “real” token (i.e. tokens in DODO’s pools)
Exploiter uses a flash loan to transfer all real tokens from the pools and bypass the flash loan check.
The exploiter 1:
- interacted with a centralized exchange
- withdrew 0.46597 ETH from Binance: https://etherscan.io/tx/0x970b32a8…48360f
- executed, in quick succession, 7 BUSD withdrawal transactions (see the link for one example), possibly involving the Binance Bridge: https://etherscan.io/tx/0x300de107…276e93
- transferred 67,416 BUSD to 0xa305fab8…1dd645 twice: https://etherscan.io/tx/0x306d08f3…11cab5 https://etherscan.io/tx/0x56dbf642…8669cf
- transferred 59,245.324743 USDT to 0xa305fab8…1dd645 twice: https://etherscan.io/tx/0xbee2f507…2a5c13 https://cn.etherscan.com/tx/0xaf80cf58…4199b9
- executed two exploits against DODO smart contracts. The first one was against the DODO-USDT test contract, and funds were transferred to 0xa305fab8…1dd645: https://etherscan.io/address/0x328410f2…5e5c1c#tokentxns
- second one was against the WCRES-USDT contract, and funds were transferred to 0x56178a0d…345bf9: https://cn.etherscan.com/address/0x910fd17b…80be8a#tokentxns
The exploiter 2:
- executed 3 exploits against DODO contracts:
1. ETHA-USDT: https://etherscan.io/tx/0x0b062361…d92428
2. WSZO-USDT: https://etherscan.io/tx/0xff9b3b2cb09d149762fcffc56ef71362bec1ef6a7d68727155c2d68f395ac1e
3. vETH-WETH, with 93,148 gwei: https://etherscan.io/tx/0x561f7ccb…0c5c4a
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 DODO AMM, these are the critical security checks that could have prevented this incident (March 2021).
- Verify all logic paths related to Access Control Exploit / Other are guarded by proper access controls and input validation - see the Access Control Attacks attack class for patterns
- 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
$3.1M
Net Loss
699200
Related Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Proof-of-Concept Exploits
On-Chain Evidence & References
Sources & References
-
01
Source 1 https://rekt.news/au-dodo-rekt/
- 02
Learn to Prevent the Next DODO AMM
The DODO AMM 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.