HomeNewsDeFi urged to adopt invariant 'spec is law' checks to curb hacks...

DeFi urged to adopt invariant ‘spec is law’ checks to curb hacks as AI aids attackers now.

-

On January 11, Daejun Park of a16z Crypto argued that DeFi protocols must hard-code safety guarantees to reduce hacks. He said standardized specifications should automatically revert transactions that violate protocol assumptions.

Park wrote that many attacks would have been stopped by such checks. “Almost every exploit to date would have tripped one of these checks during execution, potentially halting the hack,” he added and argued that “So the once-popular idea of ‘code is law’ evolves into ‘spec is law.’” (See the full post here.)

Interest in runtime enforcement has risen as exploits continue. A report by Slowmist reported hackers swiped over $649 million through code exploits last year (Ed. note: the total highlights recurring security gaps).

Even established projects proved vulnerable. The protocol Balancer lost about $128 million in November despite code running on Ethereum since 2021.

Security experts note trade-offs. Gonçalo Magalhães of Immunefi said, “It’s not the silver bullet.” He warned that extra checks raise gas costs and may hurt competitiveness.

Researchers also stress limits to invariants. Felix Wilhelm of Asymmetric Research said, “For many vulnerabilities and real-life hacks, it is difficult or even impossible to write an invariant that detects the hack without also triggering under normal circumstances.”

Some projects already use invariant checks. Kamino began such checks with Certora Prover (details), and the XRP Ledger implemented invariant checking with safeguards described here.

LATEST POSTS

Ethereum Foundation Publishes Core Mandate, Prioritizes Decentralization and User Sovereignty

The Ethereum Foundation has officially published its core mandate, outlining its commitment to decentralization and user sovereignty. The document states the organization's two primary goals...

XRP Holds Fragile Support, Bearish Structures Intact Against BTC and USDT

XRP continues to face significant bearish pressure, trading within broader downtrends against both the US dollar and Bitcoin. The XRP/USDT pair is moving inside a...

Ethereum usage grows amid market consolidation; volatility risk persists.

Ethereum has traded within a narrow band between $1,930 and $2,150 over the past 90 days, indicating a market seeking stability after a volatile...

CAKE Gains 4% as Analysts Spot Key Support Zone and Bullish Recovery Setup

PancakeSwap's native token CAKE has risen 4.03% in 24 hours, trading at $1.44. Weekly gains of 5.45% and increased trading volume suggest renewed market interest....

Most Popular

Earn on Stablecoins Up to 11% Daily payouts. Compounded automatically.
USDC, USDT, DAI, and more.
Earn Now