Elephant Money Hack
Incident Overview
The $TRUNK token's redemption mechanism was exploited by an attacker who manipulated the price oracle to enable token return, resulting in the theft of ELEPHANT from the unverified Treasury contract.
The attacker initially borrowed 131,162 WBNB and 91,035,000 BUSD via a flash loan. They then exchanged the 131,162 WBNB for 34,244 ELEPHANT Tokens. The attacker then manipulated the minting contract to swap BUSD for WBNB, which was used to buy back ELEPHANT tokens at an increased market value.
The ELEPHANT tokens were then swapped back to WBNB, resulting in 34,244 ELEPHANT exchanged on 163,782.82 WBNB. The attacker then redeemed TRUNK for 36,987.33 WBNB and 66,884,140.12 BUSD. After repaying the flash loans, the attacker made a profit of $4M.
The attacker's address:
https://bscscan.com/tx/0xf678370c…0b22a2
The transaction behind the attack:
https://bscscan.com/tx/0xec317deb…3d4577
Incident Report
Protocol Information
Market Context at Time of Hack
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 Elephant Money, these are the critical security checks that could have prevented this incident (April 2022).
- Verify all logic paths related to Flashloan Price Oracle Attack / Flash Loan Attack are guarded by proper access controls and input validation - see the Flash Loans Attacks attack class for patterns
- Audit oracle price feeds for manipulation risks - ensure time-weighted average prices (TWAPs) or multi-source aggregators are used, not spot prices
- 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 TrialRelated Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Sources & References
Learn to Prevent the Next Elephant Money
The Elephant Money 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.