OnyxDAO Hack
Incident Overview
On September 26th, 2024, Onyx DAO, a decentralized finance (DeFi) protocol derived from Compound Finance, was exploited due to a precision vulnerability, resulting in a loss of approximately $3.8 million, primarily in VUSD stablecoins.
The attackers took advantage of a known precision loss vulnerability in the forked Compound V2 code that Onyx DAO implemented. By deploying a malicious contract, they manipulated the market’s exchange rates within the protocol, artificially inflating the value of small deposits. This allowed them to withdraw 4.1 million VUSD along with other cryptocurrencies, such as XCN, DAI, WBTC, and USDT.
The attackers executed multiple transactions to miscalculate and inflate their token values, minting excessive amounts of VUSD, which they then converted to other cryptocurrencies. While some of the stolen funds were swapped into ETH, a significant portion remained unswapped, suggesting a strategic move to avoid detection.
Attacker’s Address: 0x085bdff2…642bff
Malicious Contract: 0x526e8e98…67336f
Vulnerable Contract Address: 0x5fdbcd61…a11750
Attack Transaction Hash: 0xf7c21600…6ef635
Incident Report
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 OnyxDAO, these are the critical security checks that could have prevented this incident (September 2024).
- Verify all logic paths related to Flash Loan Attack are guarded by proper access controls and input validation - see the Flash Loans 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 TrialRelated Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Sources & References
- 01
- 02
Learn to Prevent the Next OnyxDAO
The OnyxDAO 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.