Exactly Protocol Hack
Incident Overview
Exactly Protocol suffered a reentrancy attack, resulting in the loss of 4332.92 ETH, valued at approximately 7,197,240 $USD.
On August 18, 2023, Exactly Protocol, a lending and borrowing protocol operating on the Optimism chain, was exploited through a reentrancy attack. The attacker bypassed the permit check in the DebtManager contract's leverage function by using a fake market address without validation and changing the msg.sender to the victim's address. They then reentered the crossDeleverage function and stole the collaterals.
The stolen funds, a total of 4332.92 ETH, were bridged to the Ethereum mainnet, partly through the Across Protocol and partly via the Optimism Bridge. The value of the loss was approximately 7,197,240 $USD.
The Exactly:Deployer sent an on-chain message to the exploiter, expressing willingness to discuss the incident and providing instructions for private communication.
Optimism:
Attacker Addresses:
1. https://optimistic.etherscan.io/address/0x3747dbbc…571af9
2. https://optimistic.etherscan.io/address/0xE4f34a72…9da042
Malicious Transactions:
1. https://optimistic.etherscan.io/tx/0xe8999fb5…813585
2. https://optimistic.etherscan.io/tx/0x1526acfb…0cfad6
3. https://optimistic.etherscan.io/tx/0x3d6367de…3a520e
Malicious Contract:
https://optimistic.etherscan.io/address/0x6dd61c69…1a5b4d
Bridging Transaction:
https://optimistic.etherscan.io/tx/0x27f0fd95…8b8a31
Ethereum:
Funds Holder:
https://etherscan.io/address/0xE4f34a72…9da042
Bridging Transaction:
https://etherscan.io/tx/0x77461e80…826849
Onchain Message:
https://etherscan.io/tx/0x91dd9c55…2fe3d1
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 Exactly Protocol, these are the critical security checks that could have prevented this incident (August 2023).
- Verify all logic paths related to Reentrancy are guarded by proper access controls and input validation - see the Reentrancy attack class for patterns
- Check that all state-changing functions follow the Checks-Effects-Interactions (CEI) pattern to prevent reentrancy and logic ordering bugs
- 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
Learn to Prevent the Next Exactly Protocol
The Exactly 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.