Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin CryptoTax DeFAI Chain SAFU AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
DeFi Protocol Mechanics, Decoded
defi-bible.com
LATEST
A Code Simplification From Eight Years Ago Let an Attacker Mint 4,000 Unbacked L-BTC Out of Thin Air: The Liquid Network $319M Incident, Fully Explained  ·  Impermanent Loss Protection Sounds Like Free Insurance — But Who's Actually Paying for It? When It's Genuinely Worth Using  ·  Is There Really an Equal Amount of Bitcoin Behind Your WBTC or L-BTC? Four Angles to Check a Wrapped Asset's Proof of Reserves  ·  An 'Emergency Multisig' Sounds Safe — But Not Without a Timelock. Check a Protocol's Security Council Config in Three Minutes  ·  A Few Thousand Dollars Can Make a Nobody Token 'Look' Worth $1: How Fake Collateral Fools a Price Oracle  ·  After North Korean Hackers Stole $285M, Drift Protocol Relaunched as Velocity DEX — Its Co-Founder Stepped Down the Same Day
news

A Code Simplification From Eight Years Ago Let an Attacker Mint 4,000 Unbacked L-BTC Out of Thin Air: The Liquid Network $319M Incident, Fully Explained

30-Second Version · For the impatient
The code executed exactly as designed — the problem was a simplification made eight years ago. Liquid Network's $319M lesson: a gap in verification logic can lurk for years before anyone finds it.

Full Explanation +
01 · Why did this happen?

What's fundamentally different about this incident compared to a typical Smart Contract vulnerability attack?

Most smart contract vulnerabilities (like reentrancy attacks) occur within a single contract's logic, and can usually be caught through careful code audits because the problem is simply "this logic was written incorrectly." What's different about Liquid's case is that it wasn't a single line of incorrectly written code — it was a performance optimization (a caching mechanism) that omitted part of the relevant context when designed, an omission that under normal circumstances caused no problems whatsoever, until someone deliberately constructed a byte-level collision that made the system mistake two different transactions for the same one.

This also explains why the vulnerability could lie dormant for eight years: it wasn't that "the feature was broken" — it was that "the feature worked correctly in the vast majority of cases, and only failed under a very specific byte combination." This type of vulnerability is especially hard for standard audit processes to catch, because audits typically test whether logic behaves as expected rather than exhaustively enumerating every possible byte combination.

02 · What is the mechanism?

The attacker later returned 3,400 BTC and claimed to be a "whitehat" — does that change the nature of this incident?

Looking purely at the fund flow outcome, the partial return did reduce the actual loss (from roughly $319 million down to an unreturned portion of around $48 million), but that doesn't mean this incident can be redefined as a case of "good-faith vulnerability disclosure." Genuine whitehat behavior typically involves privately reporting a vulnerability to the project team without actually executing the exploit. In this case, the attacker first fully carried out the entire process of minting unbacked assets and withdrawing real Bitcoin, gaining actual control of the funds, and only then chose to return most of it.

This pattern of "take the funds first, then partially return them" has recurred across multiple on-chain incidents in recent years, and is generally understood as a risk-management strategy an attacker adopts after realizing their identity could be traced through on-chain footprints or that they face legal and reputational risk — not simply an act of goodwill. From a reader's perspective, regardless of the attacker's later motives, the real issue worth scrutinizing is that the protocol clearly had no mechanism to intercept this kind of transaction before the vulnerability was actually exploited.

03 · How does it affect me?

Bug A was already reported and patched in early August — why did the patch itself create Bug B, and why did nobody notice?

This is precisely the most thought-provoking layer of this incident: the process of patching a known vulnerability itself introduced a new one. The August 3 patch solved the problem of "the cache key omitting critical fields" by adding the missing fields back in — but the method used was direct byte concatenation rather than length-prefixed serialization. These two approaches produce identical results in the vast majority of cases; the difference only surfaces under specific edge conditions, namely when different field combinations happen to arrange themselves into an identical byte sequence.

This class of problem is often called "length-prefix confusion" — a classic but easily overlooked trap in serialization and hashing design, because the focus at the moment of patching is usually on "did this fix the specific reported problem" rather than "did this fix itself introduce a new Edge Case." The fix was publicly merged on September 1 but wasn't exploited until September 6, and nobody caught it in between — demonstrating that this kind of byte-level collision vulnerability isn't necessarily caught in time just because the code itself is public and transparent.

04 · What should I do?

I don't hold L-BTC directly, but if a protocol I use accepts some wrapped asset as collateral, does this incident affect me?

Yes, and the exposure is indirect but real. If a lending or derivatives protocol you use accepts some form of wrapped Bitcoin (whether WBTC, L-BTC, or another variant) as eligible collateral, and that Wrapped Asset's underlying verification mechanism has a similar flaw, an attacker could theoretically use the same technique to mint unbacked wrapped assets, then borrow other assets against them in the protocol you use — creating protocol-level bad debt that's typically shouldered collectively by all depositors, not just those directly holding the wrapped asset in question.

In practice, check the protocol you use to confirm which wrapped assets it accepts as collateral, then look up each wrapped asset's technical documentation to find out when its minting and redemption verification logic was last publicly audited or involved in a security incident. The more varieties of wrapped assets a protocol accepts, and the less transparent their underlying implementations are, the more spread out and harder to track this kind of "verification logic flaw" exposure becomes across the protocol as a whole.

Full Content +

On September 6, 2026, Liquid Network, a Bitcoin sidechain operated by Blockstream, was attacked, and approximately 3,998.5 L-BTC (Liquid Bitcoin) with no actual Bitcoin backing were minted out of thin air. Of that, roughly 3,996.02 BTC was withdrawn to the Bitcoin mainchain within tens of minutes, worth approximately $319 million. This wasn't a typical case of a wrapped asset's trust structure being breached (such as a multisig key being stolen) — it was a logic flaw hidden in open-source code for eight years, accidentally reactivated this September by an unrelated patching effort.

Liquid Network's Basic Structure

Liquid is a production Bitcoin sidechain governed by 15 geographically distributed "functionary nodes," with Block validation requiring signatures from at least 11 of the 15. Users lock Bitcoin on the mainchain to receive a corresponding 1:1 amount of L-BTC on the Liquid chain (called a peg-in); conversely, burning L-BTC releases an equivalent amount of Bitcoin on the mainchain through the federation's Peg-out Authorization Key (PAK) mechanism (called a peg-out). PAK itself uses a two-key design: an offline key verifies that the destination address funds are being sent to is legitimate, while an online key authorizes who can execute a peg-out. The entire design rests on the assumption that every L-BTC on the Liquid chain genuinely corresponds to an equivalent amount of Bitcoin locked on the mainchain.

Two Bugs Combined: One From 2018, One a Side Effect of Patching It

According to Blockstream's official incident assessment, the root cause traces back to a code simplification from 2018: when Liquid nodes verify a transaction's range proof (a cryptographic technique proving a transaction amount falls within a valid range without revealing the actual figure), the verification result is cached to improve performance. But the cache key design at the time omitted two critical pieces of context: the asset commitment and the destination scriptPubKey. This meant one transaction's verification result could be incorrectly applied to a different transaction that should have been rejected — as long as the two transactions happened to produce the same cache key. On August 2, 2026, external researcher stutxo reported this root vulnerability to Blockstream, and the team rapidly deployed a fix on August 3 by directly concatenating the missing fields into the cache key calculation. The problem was that this fix used raw byte concatenation rather than length-prefixed serialization, leaving behind a second vulnerability: if an attacker could construct a range proof of adjusted length together with a matching script such that their concatenated bytes exactly matched another legitimate transaction, the verification results would collide, causing an invalid transaction that should have been rejected to be incorrectly accepted as valid.

How the Attack Ran: Just 35 Minutes From Minting to Withdrawal

At 13:53:10 UTC on September 6, the attacker exploited this byte-collision flaw to mint approximately 4,000 L-BTC with no real Bitcoin backing at block height 4,050,336. The attacker first ran a small test with 2.5 L-BTC through the third-party service SideSwap's withdrawal feature to confirm the funds could be moved out successfully; once confirmed, at 14:05 the attacker deposited roughly 4,000 unbacked L-BTC into SideSwap's peg-out service. At 14:28:56, the Liquid federation nodes processed the withdrawal request through their normal workflow, releasing approximately 3,996.02 real BTC on Bitcoin mainchain block 965,783 — from minting to mainchain funds being withdrawn took under 35 minutes in total. Blockstream detected the anomaly at 18:26 and urgently halted its bridge nodes, but by then the funds had already moved out. Notably, the attacker posted an on-chain message at 18:30 reading, "we are whitehats. contact us on chain," and the following day (September 7) at 16:09, voluntarily returned 3,400 BTC. Approximately 602 BTC remains unrecovered as of this writing.

The Fix and Chain State Recovery

Blockstream deployed an emergency interim patch in the early hours of September 7, and on September 8 merged a thoroughly hardened fix (Elements PR #1600) that switched to length-prefixed serialization for the cache key calculation, ensuring that different transaction input combinations can no longer produce identical cache key bytes. Elements v23.3.4 was officially released early on September 9, and the Liquid chain resumed block production that same evening. During recovery, the team re-verified transactions with caching disabled, deterministically identifying the two original invalid outputs and their four downstream descendant transactions, and reconstructed the correct chain state based on those findings. Liquid's Bitcoin reserves briefly plunged from roughly 4,205 BTC to 197 BTC, recovering somewhat after the attacker returned 3,400 BTC, with recovery efforts for the remaining roughly 602 BTC still ongoing.

What This Means for Your Money

If you hold any form of wrapped asset — not just L-BTC, but WBTC or any other on-chain Wrapped Asset follows the same logic — this incident is a reminder that "has this wrapped asset been hacked" and "what technical foundation is this wrapped asset's trust structure built on" are two separate questions. Multisig keys being stolen, or governance permissions obtained through social engineering, is the common pattern behind most past wrapped-asset incidents. This one was entirely different: the code logic executed exactly as it was designed to — it's just that a code simplification decision made eight years ago left a gap in the verification mechanism that wasn't discovered until much later. Next time you evaluate a wrapped asset, beyond looking at its multisig governance structure, it's worth asking: when was the last time this asset's minting and redemption verification logic underwent an independent code audit?

Sources: Liquid Network Security Incident Assessment — Blockstream, Liquid Network Hack Explained: Inside the $320M Attack Path No Scan Would Have Caught — CodeAnt AI, Bitget, Liquid Hacks Drive Crypto Losses to $766M in September, 2026's Worst Month: CertiK — CryptoTimes
Ask a Question
Please enter at least 10 characters
Related Articles
Is There Really an Equal Amount of Bitcoin Behind Your WBTC or L-BTC? Four Angles to Check a Wrapped Asset's Proof of Reserves
fundamentals · Oct 06
An 'Emergency Multisig' Sounds Safe — But Not Without a Timelock. Check a Protocol's Security Council Config in Three Minutes
developers · Oct 01
The WBTC in Your Wallet Is Actually Backed by a Two-of-Three Key: Breaking Down Wrapped Bitcoin's Complete Trust Structure
protocols · Jul 30
That Extra 2% Yield Might Be Bought With Your Principal: Slashing Conditions You Should Check Before Restaking
developers · Jul 29
Related News
More Related Topics