Elephant Money Hack
What happened
On December 6, 2023, an attacker drained funds from an Elephant Money treasury contract on BNB Smart Chain. The target was an unverified contract deployed by Elephant Money that had permission to withdraw treasury funds and exposed a public sweep() function. Calling sweep() made the contract pull funds and swap them on PancakeSwap with no slippage protection, so the attacker could make it trade at a price they had just manipulated with flash-loaned BUSD.
Loss estimates differ: Decurity reported about $114,000, while the DeFiHackLabs reproduction puts it at about $165,000. This is a separate event from the April 2022 Elephant Money Reserve exploit.
How it happened
- The attacker flash-borrowed the BUSD balances of four PancakeSwap V3 pools (USDC/BUSD, BUSDT/BUSD, WBNB/BUSD and BTCB/BUSD), nesting each loan inside the previous callback.
- They swapped the borrowed BUSD for WBNB on PancakeSwap, pushing the WBNB price up in the BUSD/WBNB pool.
- They called the unprotected
sweep()on0x8cf0...5740, which withdrew treasury funds and bought WBNB at the inflated price with no minimum-output check, pushing WBNB higher still. - The attacker sold their WBNB back to BUSD at the elevated price, repaid the flash loans plus fees and kept the difference.
Protocol details
Security review history
- CertiK View report
- Solidity Finance View report
Evidence
- report @DecurityHQ incident report twitter.com
- report Reserve Exploit: Live Updates (Elephant Money, April 2022) medium.com
- transaction bscscan.com transaction 0x7ccb…5218 bscscan.com
- transaction bscscan.com transaction 0xd423…3439 bscscan.com
- address bscscan.com address 0x69BD…6Bcf bscscan.com
- address bscscan.com address 0xbbcc…D66D bscscan.com
- code DeFiHackLabs: 20231206 ElephantStatus - Price Manipulation (README entry and ElephantStatus_exp.sol) github.com
- analysis Web Archive archive.ph
- analysis DeFiLlama defillama.com
- analysis QuillAudits newsletter: OpenZeppelin disclosed an Address Spoofing attack - multiple tokens rekt (Elephant Money section) quillaudits.substack.com
- analysis BscScan block 34114761 bscscan.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.