Compound Labs Hack
Incident Overview
Compound's new proposal caused a loss of 237,000 $COMP tokens due to the smart contract issue
Compound's governance Proposal 62 changed the distribution in the Comptroller contract to liquidity suppliers and borrowers from a previous 50:50 split to new governance proposed ratios:
https://compound.finance/governance/proposals/62
However, the Comptroller contract contains a bug, causing some users to receive too much COMP. The Comptroller received tokens for distribution from the Reservoir contract at:
https://etherscan.io/tx/0xe7616779…9f2322
84,000,000 in $COMP tokens are at risk
Approximately 237,000 $COMP tokens are already distributed between different addresses and can be calculated as a loss at the current moment.
The examples of transactions that trigger the bug:
https://etherscan.io/tx/0xc9244e53…2b0001
https://etherscan.io/tx/0xbc246c87…06422a
https://etherscan.io/tx/0xd77300cd…492f94
https://etherscan.io/tx/0xc9244e53…2b0001
https://etherscan.io/tx/0x0fefe4a1…3b45c1
https://etherscan.io/tx/0xf3731f0e…80a973
https://etherscan.io/tx/0xb6d5122a…dab7f2
https://etherscan.io/tx/0xf4bfef16…8a9f45
https://etherscan.io/tx/0xee318650…70bdb1
Comptroller contract:
https://etherscan.io/address/0x3d981921…c9cd3b
Reservoir contract:
https://etherscan.io/address/0x2775b1c7…009e38
List of addresses, which claimed a huge amount of tokens:
https://twitter.com/0xngmi/status/1443442885618278407
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 Compound Labs, these are the critical security checks that could have prevented this incident (September 2021).
- Verify all logic paths related to Other are guarded by proper access controls and input validation
- 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 TrialSources & References
Learn to Prevent the Next Compound Labs
The Compound Labs 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.