Advertisement

Why Bitcoin Layer-2 Networks Are Becoming Prime Targets for AI Threats

Recent exploits involving Coldcard, Core Lightning and Liquid Network are underscoring how artificial intelligence is changing the way vulnerabilities are discovered across Bitcoin infrastructure.

Bitcoin’s broader infrastructure has experienced several serious security incidents in recent months, raising concerns that AI tools could significantly reduce the time and cost required to uncover flaws hidden within complex financial software.

Coldcard wallets were recently targeted in an attack that resulted in roughly $114 million worth of bitcoin (BTC) being drained. Core Lightning developers also issued an emergency alert after AI-assisted security research identified real vulnerabilities in the software. In another incident, white-hat hackers exploited a weakness in Blockstream’s Liquid Network and withdrew approximately 4,000 BTC, worth about $317 million, before returning 3,400 BTC once the vulnerability had been addressed.

The episodes point to a growing contradiction in Bitcoin’s development. Bitcoin’s base layer has intentionally remained relatively simple to limit potential attack surfaces. However, attempts to expand its functionality and improve transaction speed through smart contracts and off-chain scaling solutions have produced increasingly sophisticated code, potentially creating more opportunities for bugs.

AI is also making it possible to examine that code at a scale that would be difficult for human researchers to match. In August, 16 Bitcoin developers used AI models to analyze 390 Bitcoin projects and generated nearly 5,000 potential security findings. Of those, 85 were initially classified as critical.

“At some point we have to admit it. AI is finding bugs that no human can find,” Gregory said in a Telegram message.

Gregory, a Bitcoin application developer, previously worked at Merrill Lynch and JPMorgan before co-founding CommerceBlock, where he served as CEO and contributed to Bitcoin infrastructure projects including MainStay and the statechain implementation used by Mercury Wallet and Mercury Layer.

Mercury Layer has since been discontinued, although its open-source code remains available on GitHub. Gregory argued that AI changes the security equation for older financial software because dormant code can now be analyzed at extremely low cost.

“If a model can wake a bug in finance C from 2006, it can probably read a statechain repo that has not moved,” he said.

That raises questions about whether Mercury’s legacy code could still contain vulnerabilities that were never identified. Gregory specifically pointed to potential weaknesses involving key-share deletion, client-side transfer verification, backup transactions and the shrinking locktime mechanism.

“That is the new paradigm,” Gregory said. “Unused code stopped being unused the moment the cost of reading it dropped to zero.”