a16z crypto urges defi to adopt 'spec is law' for security

a16z Crypto has called for decentralized finance protocols to shift from 'code is law' to 'spec is law' to enhance security amid rising exploits. In a January 11 post, senior researcher Daejun Park advocated for standardised specifications and invariant checks to prevent hacks. This approach aims to mature the $168 billion sector by hard-coding safety guarantees.

Decentralized finance, or DeFi, faces ongoing threats from code exploits, with hackers stealing over $649 million last year, according to blockchain security firm Slowmist. Even established protocols like Balancer, operational on Ethereum since 2021, suffered a $128 million loss in November due to a code vulnerability. Developers are increasingly concerned about hackers leveraging artificial intelligence to identify weaknesses.

In response, a16z Crypto's Daejun Park proposed moving beyond reactive 'patch-after-the-hack' methods. He recommended embedding safety through standardised specifications that limit protocol actions and automatically reverse violating transactions. 'Almost every exploit to date would have tripped one of these checks during execution, potentially halting the hack,' Park wrote. 'So the once-popular idea of “code is law” evolves into “spec is law.”'

This concept, known as runtime enforcement or invariant checks, is gaining traction. Protocols such as Kamino, a Solana-based lending platform, integrated checks using Certora Prover in March 2023. The XRP Ledger, supporting the $120 billion XRP token, has also implemented them to safeguard against undetected bugs. 'Invariants should not trigger, but they ensure the XRP Ledger’s integrity from bugs yet to be discovered or even created,' its developers stated.

However, experts caution that invariant checks are not foolproof. Gonçalo Magalhães, head of security at Immunefi, noted they could raise transaction fees, deterring users in a cost-sensitive market. 'It’s not the silver bullet,' he said. Felix Wilhelm of Asymmetric Research added that crafting effective checks is challenging, as they may falsely trigger during normal operations or fail to stop sophisticated attacks outright. While useful for anomaly detection, such as unusual fund flows, they often mitigate rather than prevent damage.

Park's ideas underscore DeFi's push toward principled security to foster growth, though implementation hurdles remain.

Related Articles

Crypto executives meeting with Treasury officials to discuss GENIUS Act AML rules.
Image generated by AI

Crypto firms seek Treasury clarification on GENIUS Act AML rules

Reported by AI Image generated by AI

Anchorage Digital, Paradigm, and the Hyperliquid Policy Center have called on the Treasury Department to address uncertainties in proposed stablecoin anti-money laundering rules under the GENIUS Act.

A $292 million exploit on Kelp DAO has shaken decentralized finance (DeFi) lending markets, prompting industry insiders to call for stronger security measures. Despite the setback, experts view it as a temporary hurdle rather than a barrier to institutional adoption. Wall Street firms continue advancing into onchain finance amid the fallout.

Reported by AI

AI-powered systems are driving down the price of smart contract reviews in cryptocurrency projects, according to security researchers. The changes could raise expectations for due diligence by developers and institutions alike.

This website uses cookies

We use cookies for analytics to improve our site. Read our privacy policy for more information.
Decline