As DeFi protocols continue to redefine traditional financial systems, they have simultaneously become prime targets for malicious actors seeking to exploit vulnerabilities and steal investor funds. According to DeFiLlama, over $1.12 billion was lost across 79 exploits in the DeFi ecosystem in 2024 alone, underscoring the critical need for robust security measures within the space.
This piece will dive into some of the top five greatest hacks of 2024, focusing on Munchables, Hedgey Finance, and Thala Labs as PenPie and Radiant Capital have been covered in previous articles. We will explore the details of each attack, dissect the mechanisms behind the breaches, examine the aftermath, and uncover the lessons that can help prevent similar exploits in the future. Through this analysis, we aim to highlight the vulnerabilities present within the DeFi space and offer valuable insights on how to address them moving forward.
These attacks have been categorized into four primary classifications:
- Protocol Logic (49 incidents): Attacks in this category target the fundamental logic of the protocol’s smart contracts or code. These exploits often arise from flaws in contract design, where attackers can manipulate how transactions are processed, resulting in theft or financial disruption. Reentrancy attacks are a good example.
- Infrastructure (19 incidents): Infrastructure attacks focus on weaknesses in the fundamental building blocks that support DeFi, such as oracles, cross-chain bridges, or decentralized wallets. These vulnerabilities often enable attackers to manipulate data feeds or exploit network weaknesses. Major social engineering attacks goes here.
- Ecosystem (6 incidents): Ecosystem attacks impact the broader DeFi ecosystem, including governance issues, flaws in token standards, or vulnerabilities that affect multiple protocols simultaneously. These attacks often stem from complex interdependencies between different protocols and can have widespread implications, Flash Loan attacks are from this category.
- Rugpulls (5 incidents): A rugpull is a type of scam where project developers suddenly withdraw all funds from liquidity pools or token offerings, leaving investors with worthless assets. These scams typically involve fraudulent or deceitful projects that appear legitimate until the developers exit with stolen funds. Most rugpulls have intentional flaws in their smart contracts.
While Protocol Logic exploits are the most common, accounting for $359.3 million in losses, Infrastructure attacks tend to be more damaging, with $673 million lost, exposing vulnerabilities in the foundational elements of the DeFi space. Ecosystem attacks have resulted in $89 million in losses, and Rugpulls have contributed $5.75 million in stolen funds.
This article will focus on Protocol Logic and Ecosystem exploits which often involve manipulation of smart contract logic that is the main focus of DeFi Security Audits such as AuditOne.
Munchables
In March 2024, Munchables, a DeFi protocol designed as a decentralized marketplace for gaming assets, suffered a devastating attack. A rogue developer took advantage of a vulnerability in the protocol’s proxy contract, manipulating storage slots. This allowed the attacker to inflate their own token balances and withdraw a total of $62.5 million. Within just three days of the exploit, Munchables' Total Value Locked (TVL) plummeted from $91.56 million to zero, reflecting the severe financial damage and the loss of trust within the user base.
The Protocol Logic exploit revealed deep flaws in Munchables' smart contract design and internal governance. The attack illustrated the importance of deploying immutable contracts, which would have prevented the rogue developer from making unauthorized modifications to the protocol’s core functionality. Immutable contracts are crucial because they guarantee that the contract’s logic cannot be altered after deployment, reducing the risk of internal manipulation.
Furthermore, the attack highlighted the risks posed by insufficient background checks on developers and collaborators. Insider threats are a common vulnerability in DeFi protocols, especially in projects where multiple parties have access to critical components of the system. In this case, thorough vetting of team members and contractors could have mitigated the risks posed by an angry or malicious developer.
Beyond these specific lessons, Munchables’ exploit serves as a reminder that operational security audits must be as thorough as technical code audits. Protocols should continuously assess their internal processes and governance structures to identify vulnerabilities beyond the codebase.
Hedgey Finance
In April 2024, Hedgey Finance, a platform offering token vesting and liquidity management solutions for DeFi projects, fell victim to a flash loan attack. The exploit stemmed from a lack of input validation, which allowed the attacker to manipulate token approvals and drain $44.7 million from the protocol. The attacker used $1.3 million in flash loans to exploit this vulnerability across Ethereum and Arbitrum, bypassing essential safeguards in the protocol's design.
Flash loan attacks are a type of Protocol Logic exploit, where attackers take advantage of the instantaneous nature of flash loans to manipulate protocol functions. Hedgey Finance’s failure to validate user inputs allowed the attacker to bypass checks and trigger a series of unauthorized withdrawals. This attack underscored the critical need for stronger input validation to ensure that only legitimate transactions are processed by the protocol.
The exploit had severe financial and reputational consequences for Hedgey Finance. Following the attack, the platform's token value dropped by 40%, and many liquidity providers rushed to withdraw their funds, leading to a liquidity flight. This phenomenon is common in the aftermath of a breach, as users fear that their funds may be at risk and look for safer alternatives.
Thala Labs
In November 2024, Thala Labs, a protocol specializing in isolated farming mechanisms, was exploited when an attacker identified a vulnerability in its farming contracts. By exploiting this flaw, the attacker drained $25.5 million from the protocol’s liquidity pools. This Protocol Logic attack caused a 30% drop in Thala Labs' market cap and a significant reduction in TVL. Although some funds were recovered, the damage to the protocol’s reputation was severe, and concerns about its long-term viability were raised.
The Thala Labs attack highlights the necessity of conducting comprehensive audits, particularly for complex components like farming contracts. These contracts are often designed to incentivize liquidity provision, but their complexity can also introduce subtle vulnerabilities that are difficult to detect during initial security reviews. This incident underscores the need for continuous codebase evaluation to ensure that new threats are identified and addressed before they can be exploited.
In addition, Thala Labs’ experience shows the importance of having a well-established incident response plan. Thanks to a robust contingency framework, the protocol was able to quickly track and identify the hacker, mitigating the damage and restoring confidence among its users. A strong incident response plan is crucial for efficiently freezing funds, patching vulnerabilities, and collaborating with stakeholders to recover stolen assets. This proactive approach not only helps to minimize the financial impact but also ensures that the protocol can rapidly communicate with affected parties and maintain trust within the community.
Key Lessons and the Path Forward for DeFi Security
The attacks on Munchables, Hedgey Finance, and Thala Labs serve as stark reminders of the vulnerabilities in the DeFi ecosystem, and as DeFi protocols scale, they must implement real-time threat monitoring systems to quickly detect and respond to suspicious activities, minimizing the potential damage from attacks.
Adopting secure coding practices is another critical step forward. Developers must prioritize formal verification of smart contracts, which ensures that the code behaves as intended and that security vulnerabilities are addressed before deployment. Threat modeling—an approach that identifies and mitigates potential risks in the design phase—should also be integrated into the development process.
One of the key lessons from these incidents is the importance of transparency within the DeFi community. Publicly available bug bounty programs can help incentivize responsible vulnerability disclosure, creating a collaborative environment where security is a shared responsibility.
Finally, the DeFi space must recognize that security is not a one-time effort but an ongoing process. As protocols continue to grow and innovate, security measures must evolve to keep pace with emerging threats. The breaches of 2024 emphasize that security cannot be underestimated, it must be a foundational element of every DeFi project.
Conclusion
While the innovation and promise of DeFi remain strong, the security challenges highlighted by the attacks on Munchables, Hedgey Finance, and Thala Labs demonstrate the vulnerability of even well-established protocols. These incidents provide important lessons on the need for comprehensive security audits, real-time monitoring, and proactive security measures.
It is crucial that security is prioritized at every stage of development, deployment, and operation. By learning from past breaches, and implementing stronger security practices, the DeFi community can build a more secure and resilient ecosystem. Only by addressing vulnerabilities proactively can DeFi continue to serve as a secure, reliable alternative to traditional finance.
Protecting your DeFi project is essential for growth and user trust. Start by using our free Smart Contract Security Checklist Tool to identify any potential vulnerabilities. Or, book a free 30 min. consultation with us to explore advanced protection options tailored to your project.