Onyx Protocol Hack
Incident Overview
Onyx Protocol suffered a flash loan attack, exploiting a rounding issue, leading to a loss of approximately 2,149,772 USD worth 1,161.29 ETH.
Onyx Protocol, a decentralized liquidity protocol, was exploited on November 1, 2023, through a flash loan attack. The attacker took advantage of a critical vulnerability in CompoundV2 forks, which caused a known rounding issue. To execute the exploit, the attacker took out a substantial flash loan in ETH, swiftly converting it to PEPE tokens and contributing PEPE tokens to a specific pool.
Due to precision loss, fewer shares were burned, enabling the withdrawal of assets. The exploit resulted in a loss of approximately 2,149,772 USD worth 1,161.29 ETH. The attacker has already laundered about 1,140 ETH (equivalent to 1.25 million USD) to the crypto mixing service Tornado Cash.
Attacker Addresses:
https://etherscan.io/address/0x085bDfF2…642BfF
https://etherscan.io/address/0x4C9C8661…330c98
https://etherscan.io/address/0x50839563…842706
Malicious Transaction:
https://etherscan.io/tx/0x27a3788d…899746
Malicious Contract:
https://etherscan.io/address/0x052Ad2f7…3fcEAa
TornadoCash Deposit Transactions:
https://etherscan.io/tx/0xf045dff0…ffd33e
https://etherscan.io/tx/0x3990b142…675e3c
https://etherscan.io/tx/0x17cc492f…ac2ca4
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 Onyx Protocol, these are the critical security checks that could have prevented this incident (November 2023).
- Verify all logic paths related to Flashloan Donate Function Logic Exploit / 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 TrialSecurity Audit History
- Audit Report 1 Report
Related Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Sources & References
- 01
-
02
Web Archive https://archive.ph/OdOwH
- 03
Learn to Prevent the Next Onyx Protocol
The Onyx Protocol 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.