Cybersecurity is frequently referred to as a game of cat and mouse, encapsulating the need for companies to keep on top of all the latest scams and hacking techniques in a bid to outwit ever-savvier attackers. However, in DeFi, it’s fair to say that the cats have a significant advantage, with the ability to redeploy the same attack tactics repeatedly, as the industry fails to address some of the most fundamental challenges that have persisted for years.
A case in point – one of the biggest DeFi hacks of recent months was carried out using the as the infamous 2016 DAO attack on Ethereum
Reentrancy attacks underscore a key issue with Solidity as a programming language – the ease with which it can allow for unintended outcomes. Li.Fi, a cross-chain DeFi protocol, suffered an in July this year where a hacker was able to exploit smart contract calls that could execute arbitrary functions, resulting in losses of $8 million. Wrapped Bitcoin
Flash loans, which leverage the composability of dApps to execute a loan and repayment in a single Ethereum transaction, have also proven highly exploitable. Following the in 2020, the code underlying flash loan protocols has become target practice for hackers. Even following the of Euler Finance in 2023, which resulted in losses of $197 million, Hedgey Finance and Dough Finance over recent months, resulting in combined losses of over $45 million.
All this before we even get to those attacks that can be traced back to more old-school means. Truflation was hit for $5 million in late September, with the CEO that the company had suffered a malware attack, which had enabled unauthorized access to the project’s treasury wallets.
Becoming a Harder Target
While DeFi hacks tend to be on a smaller scale than those on centralized exchanges, recent findings from Peckshield and ImmuneFi the number of incidents involving decentralized protocols is far higher, underscoring how easy hackers are finding it to launch a successful attack.
One argument is that blockchain has a different set of challenges to Web2 security, meaning it needs its own set of tools and protocols to maintain security. It’s a fair argument, but at this point in the maturity cycle, a lack of available means is no longer an argument. It’s time to take a leaf out of the Web2 security handbook and put in place a stack of security measures that’s up to the job.
A few ideas to get started? Firstly, robust security audits need to become an industry standard. Reentrancy attacks and many basic smart contract exploits could be avoided with this fundamental step. While many projects may state they’ve been audited, the quality and extent of audits can vary significantly between firms.
Taking it a step further, on-chain security protocols can also monitor on-chain activity for suspicious transactions and potential zero-day exploits and prevent them before they happen.
Leveraging developments in encryption introduces a further layer of security. One example is a fully homomorphic encryption on-chain, enabling data to be kept completely confidential and secure. This development introduces the highest level of security to data that would previously have been publicly available and used by hackers to source lucrative targets.
The cat-and-mouse analogy works so well because it frames the ongoing power struggle between hackers and cybersecurity experts as one that will never necessarily be won by either side. However, the sheer number of DeFi attacks indicates that the odds are skewed heavily in favor of the hackers. Given the pace of development in this field, project founders should take any opportunity to level up the fight and tip the odds in favor of user funds and a more secure future for the industry itself.
