Enterprise

Ethereum Alliance Launches New Framework to Tackle Growing DeFi Security Vulnerabilities

The Ethereum ecosystem continues to witness a continuous flurry of activity that has individuals and organizations deploying token contracts, adding liquidity to pools, and deploying smart contracts to support a wide range of business models. While this undeniable growth highlights the vibrant adoption of decentralized technology, it has also unfortunately been riddled with security exploits, leaving decentralized finance protocols deeply vulnerable to persistent hacks, dangerous scams, and multi-million-dollar financial losses.

Recent findings from crypto intelligence firm Chainalysis paint a stark picture of the threats facing the sector, showing that crypto-related hacks increased by a staggering 58.3% from the beginning of the year through July 2022. The report further notes that an alarming $1.9 billion was lost to malicious hacks during this timeframe alone. Crucially, this massive figure does not even include the devastating $190 million Nomad bridge exploit that occurred on August 1, 2022, underscoring the escalating nature of infrastructure vulnerabilities across the broader Web3 landscape.

Although open-source code is widely celebrated as a foundational benefit for the blockchain industry—fostering transparency, collaboration, and rapid innovation—it can unfortunately be easily studied by malicious cybercriminals actively looking for exploits and logic flaws. While security audits for smart contracts aim to solve these structural challenges by identifying vulnerabilities before deployment, this vital procedure has historically lacked consistent industry standards, thus creating unnecessary complexity, uneven audit qualities, and confusion for both developers and project founders.

An industry standard to ensure smart contract security

To confront these pressing challenges head-on, Chris Cordi, chair of the EthTrust Security Levels Working Group at the Enterprise Ethereum Alliance, told Cointelegraph that as the Ethereum blockchain industry continues to grow, so does the urgent need for a mature, standardized framework to rigorously assess the security of smart contracts.

In order to address this systemic issue, Cordi, along with several EEA member representatives possessing deep auditing and cybersecurity expertise, helped establish the EthTrust Security Levels Working Group in November 2020. Since its inception, the organization has been diligently working on a comprehensive draft document of a smart contract specification—effectively serving as an authoritative industry standard—aimed at drastically improving the baseline security behind smart contracts across the entire ecosystem.

Most recently, the working group announced the official publication of the EthTrust Security Levels Specification v1. Chaals Nevile, technical program director of the EEA, explained in an interview with Cointelegraph that this milestone specification describes the specific smart contract vulnerabilities that a proper, professional security audit requires as a minimum measure of quality.

"It is relevant to all EVM-based smart-contract platforms where developers use Solidity as a coding language," Nevile told Cointelegraph. Highlighting its broad applicability, he pointed to a recent analysis by Splunk showing that this encompasses well over three-quarters of mainnet contracts. "But, there are also private networks and projects that are based on the Ethereum technology stack but running on their own chain. This specification is as useful to them as it is for mainnet users in helping to secure their work."

From a technical perspective, Nevile detailed that the newly introduced specification outlines three distinct levels of tests that organizations should carefully consider and implement when conducting thorough smart contract security audits.

"Level [S] is designed so that for most cases, where common features of Solidity are used following well-known patterns, tested code can be certified by an automated static analysis tool," he said, describing the foundational tier of the specification.

He added that the Level [M] test mandates a stricter and more rigorous static analysis, noting that this tier includes specific requirements where a human auditor is actively expected to determine whether the use of a particular feature is genuinely necessary or whether a developer’s claim about the security properties of the code is fully justified.

Nevile further explained that the advanced Level [Q] test provides an in-depth analysis of the complex business logic that the tested code implements. "This is to ensure that the code does not exhibit known security vulnerabilities, while also making sure it correctly implements what it claims," he said. Additionally, the framework incorporates an optional "recommended good practices" test designed to further enhance the overall security posture behind smart contracts.

Elaborating on these best practices, Nevile noted that updating development environments is a vital component. "Using the latest compiler is one of the recommended good practices. It’s a pretty straightforward one in most cases, but there are a lot of reasons why a contract might not have been deployed with the latest version," he observed. Other vital good practices highlighted in the specification include actively reporting newly discovered vulnerabilities so they can be swiftly addressed in future updates to the specification, alongside writing clean, modular, and easy-to-read code.

Overall, there are an impressive 107 distinct requirements packed within the entire specification document. According to Nevile, roughly 50 of these are foundational Level [S] requirements that directly arise from known bugs and edge cases embedded within solidity compilers.

Will an industry standard help organizations and developers?

Addressing the practical utility of the framework, Nevile pointed out that the EthTrust Security Levels Specification ultimately aims to help professional auditors clearly demonstrate to their customers that they are operating at an industry-appropriate level of competence and rigor. "Auditors can point to this industry standard to establish basic credibility," he emphasized.

Shedding further light on the auditing landscape, Ronghui Gu, CEO and co-founder of prominent blockchain security firm CertiK, told Cointelegraph that having standardized benchmarks like these helps ensure expected processes and operational guidelines are met. However, he quickly cautioned that such standards are not by any means a rubber stamp to indicate that a smart contract is entirely immune to exploits.

"It’s important to understand that not all smart contract auditors are equal," Gu stated. "Smart contract auditing starts with understanding and experience of the specific ecosystem that a smart contract is being audited for, and the technology stack and code language being used. Not all code or chains are equal. Experience is important here for coverage and findings."

Given these inherent complexities, Gu believes that companies wanting to have their smart contracts audited should look far beyond whatever certification an individual auditor claims to possess and instead carefully take into account the overall quality, operational scale, and proven market reputation of the auditing firm. Because these standards serve primarily as guiding principles, Gu remarked that he views the new specification as a solid and necessary starting point for the industry.

From a developer’s perspective, these detailed specifications may prove to be exceptionally beneficial in day-to-day operations. Mark Beylin, co-founder of Myco—an emerging blockchain-based social network—told Cointelegraph that these standards will be incredibly valuable in helping smart contract developers better understand what to realistically expect from a professional security audit.

"Currently, there are many scattered resources for smart contract security, but there isn’t a specific rulebook that auditors will follow when assessing a project’s security," Beylin noted. "Using this specification, both security auditors and their clients can be on the same page for what kind of security requirements will be checked."

Michael Lewellen, an independent developer and a key contributor to the development of the specification, further explained to Cointelegraph that these guidelines help by providing a concrete checklist of known security issues to cross-reference against during development.

"Many Solidity developers have not received recent formal education or training in the security aspects of Solidity development, but security is still expected," Lewellen said. "Having specs like this makes it easier to figure out how to write code more securely."

Lewellen also noted that the vast majority of the specification’s requirements are written in a straightforward, accessible manner, making it relatively easy for everyday developers to comprehend. Nevertheless, he offered a constructive critique, commenting that it is not always immediately clear why a specific requirement has been included in the text.

"Some have links to external documentation of a vulnerability, but some do not," Lewellen observed. "It would be easier for developers to understand if they had clearer examples of what compliant and noncompliant code might look like."

The evolution of smart contract security standards

All things considered, the introduction of the security levels specification is actively helping to advance the broader Ethereum ecosystem by establishing much-needed baseline guidelines for smart contract audits. Yet, Nevile noted that perhaps the most challenging aspect moving forward is anticipating how novel, unprecedented exploits could materialize in the future.

"This specification doesn’t solve those challenges completely," Nevile admitted. "What the spec does do, though, is identify certain steps, like documenting the architecture and the business logic behind contracts, that are important to enabling a thorough security audit."

Looking ahead, Gu expressed his belief that other distinct blockchain chains will inevitably start to develop similar standardized frameworks as the broader Web3 industry matures. Already, innovative developers within the Ethereum ecosystem are proactively coming up with their own complementary smart contract requirements to help safeguard the community. For instance, Samuel Cardillo, chief technology officer at RTFKT, previously took to social media to announce that he had created a public system designed to help developers rate smart contracts based on positive and negative development elements, aimed at raising awareness and assisting both collectors and creators.

While all of these independent and institutional initiatives represent a meaningful step in the right direction, Gu pointed out that industry standards naturally take time to achieve widespread adoption and integration. Furthermore, Nevile explained that security is never a static achievement. As the threat landscape continuously shifts, the working group remains open to ongoing dialogue, allowing individuals to submit questions and feedback directly to the authors of the specification.

"We will take that feedback, as well as look at what the discussions are in the broader public space because we expect to update the specification," Nevile concluded, adding that an updated version of the specification is anticipated to be produced within the next six to 18 months.