Punk Protocol Hack
Incident Overview
Punk Protocol suffered a loss due to a missing Modifier in the initialize() function of the CompoundModel code, allowing an attacker to manipulate the function and withdraw assets directly to their wallet.
The attacker exploited a vulnerability in the initialize() function of the CompoundModel code, which lacked an "initializer" Modifier. This allowed the attacker to manipulate the function, despite it being connected to an unknown contract. The attacker then updated the contract address and called withdrawToForge(), sending the assets controlled by the CompoundModel directly to their malicious contract and into their wallet.
The stolen funds were then swapped on ETH and deposited into the Tornado Cash mixer. A white-hat hacker managed to front run the attack and returned $5 million to the Punk Protocol deployer's address.
The attacker's address:
https://etherscan.io/address/0x1d5a5640…ccb72b
The attacker's smart contract:
https://etherscan.io/address/0x1695ce70…073ee6
The white-hat hacker address:
https://etherscan.io/address/0x3aa27ab2…2bc35a
white-hat hacker smart contract:
https://etherscan.io/address/0x00000000…c34c8f
Transaction of the attack:
https://etherscan.io/txs?a=0x1d5a5640…ccb72b
Transaction of the returned funds:
https://etherscan.io/tx/0x008dd92f…668147
https://etherscan.io/tx/0xace7c076…f83247
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 Punk Protocol, these are the critical security checks that could have prevented this incident (August 2021).
- Verify all logic paths related to Delegatecall Exploit / Other are guarded by proper access controls and input validation - see the Delegatecall & Call Injection 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
Learn to Prevent the Next Punk Protocol
The Punk 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.