Libertify Hack
Incident Overview
Libertify, a portfolio manager, was exploited due to a reentrancy flaw, resulting in a loss of 452,114 $USD across Ethereum and Polygon chains.
The exploit of the Libertify portfolio manager project was due to the absence of reentrancy protection. This allowed the attacker to exploit the deposit() routine, minting more shares and draining funds from both the Ethereum and Polygon chains.
Approximately $162,527 worth of USDT and WETH was drained from the Ethereum chain, and about $289,587 worth of USDT and WETH was drained from the Polygon chain. The funds stolen from the Polygon chain were then bridged to Ethereum using Celer Bridge. Notably, about 56,234 USDT from the stolen funds on the Polygon chain remains at the malicious contract.
Attacker Address:
https://etherscan.io/address/0xfd2d3ffb…a16d02
https://polygonscan.com/address/0xfd2d3ffb…a16d02
Malicious Transactions: https://etherscan.io/tx/0xcb0ad9da…99a282
https://polygonscan.com/tx/0x7320acce…388483
Malicious Contract Address: https://etherscan.io/address/0xdfcdb5a8…3f2969
Bridging Transaction: https://etherscan.io/tx/0x23eb7c6b…05e10e
Malicious Contract Address:
https://etherscan.io/address/0xdfcdb5a8…3f2969 https://polygonscan.com/address/0xdfcdb5a8…3f2969
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 Libertify, these are the critical security checks that could have prevented this incident (July 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 Libertify
The Libertify 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.