Liquid Network

How One Cache Bug Drained 4000 BTC From Liquid Network

19 min read
MH
Written by Mohamed Habbat

I work in the crypto self-custody space, and I have watched people treat L-BTC as bitcoin with a faster block time. On 6 September 2026 the difference became a number: the Liquid Federation released 3,996.02 BTC on Bitcoin mainnet under valid signatures, because Liquid's own software had accepted about 4,000 L-BTC that nobody had deposited (Blockstream incident assessment).

TL;DR

Elements, the software that runs Liquid, remembers which rangeproofs it has already verified. A rangeproof is the proof that a hidden amount is not negative. The first version of that memory left out the asset and the output script. A researcher reported that on 2 August 2026, and Blockstream shipped a fix to its nodes within days (incident assessment). The fix added the missing fields but wrote them back to back with no length markers, and that is the hole the attacker used. Nodes with a matching cache entry accepted the bad block, and all 15 functionaries ran the patched build. They paid out 3,996.02 BTC (about USD 319 million at the CoinGecko price of USD 79,807 at 14:00 UTC that day). Anonymous actors calling themselves whitehats returned 3,400 BTC about 26 hours later (return transaction), and Blockstream counts about 602 BTC still outstanding. Bitcoin mainnet and Lightning were never affected. Liquid restarted on 9 September with Elements 23.3.4, but peg-outs were still suspended at Blockstream's last update.

3,996 BTC left the federation wallet on 6 September 2026

The federation keeps the bitcoin behind L-BTC in a set of multisig addresses on Bitcoin mainnet, 16 of them on 11 October 2026 (reserves address API), and most of it sits in one reused address. At 14:28:56 UTC in Bitcoin block 965,783, a federation payout sent 3,996.01834922 BTC to one outside address, 2.65138358 BTC to a second, and 3.99601658 BTC to a third (payout transaction). Blockstream attributes the 3,996.02 BTC output to the attacker's peg-out, and says smaller peg-outs confirmed before the halt took the reserve from about 4,205 BTC to 197 BTC (incident assessment).

At USD 79,807 per BTC, the CoinGecko price at 14:00 UTC that day (CoinGecko), the attacker's 3,996.02 BTC was worth about USD 318.9 million. By my arithmetic on Blockstream's figures of 197 BTC against about 4,205 BTC, the reserve covered about 4.7 percent of what it was meant to back until the return the next afternoon. The payout was an ordinary multisig spend, valid under Bitcoin's rules.

The bug lived in Elements, not in Bitcoin Core

Liquid is a sidechain, a separate blockchain that runs next to Bitcoin, holds bitcoin in escrow, and issues a matching token, L-BTC, on its own ledger. It went live on 27 September 2018 with 23 launch members (Blockstream launch release). It runs on Elements, an open-source platform built on the Bitcoin codebase, with features Bitcoin does not have: hidden amounts, issued assets, and blocks signed by a fixed group instead of mined (Liquid technical overview).

That group is the federation. Fifteen functionaries, each a server plus a hardware security module, take turns proposing blocks, and a block counts once 11 of the 15 have signed it (what a functionary is). The bitcoin sits in an 11-of-15 multisig wallet, with one key in each module (federation multisig). Blockstream writes the software. The members run it.

Bitcoin Core has no hidden amounts, no rangeproofs, and no cache of verified rangeproofs. The bug was in consensus code, the rules every node uses to decide whether a block is valid, and it was Liquid's consensus, not Bitcoin's.

How the Liquid peg works

A peg-in moves bitcoin onto Liquid. You send BTC to a federation-controlled address, wait 102 Bitcoin confirmations, and claim the same amount of L-BTC on the sidechain (peg-in and peg-out docs). A peg-out is the reverse. A federation member burns L-BTC on Liquid, and after two Liquid confirmations (what a Liquid peg-out is) the functionaries pay BTC from the multisig, with a typical processing time of 11 to 35 minutes, per the same peg-in and peg-out docs.

Not everyone can peg out. The functionaries only pay a peg-out to an address derived from a registered Peg-out Authorization Key, a PAK. Ordinary users peg out through a member such as an exchange or SideSwap, which handles the PAK for them. Blockstream's report says there is no separate reserve check at peg-out time: the peg-out trusts whatever L-BTC the sidechain's own validation has accepted (incident assessment).

Hidden amounts and one worked example

Liquid hides how much each output holds. Instead of a number, an output carries a commitment, a locked box produced with a secret blinding factor that still obeys addition (confidential transactions docs). A verifier checks that inputs minus outputs equal zero without learning any amount.

Say Alice spends one input of 5 L-BTC, pays Bob 3, and keeps 2 as change. With blinding factors 7, 4, and 3, the verifier finds that 5 minus 3 minus 2 and 7 minus 4 minus 3 both equal zero. It never saw 5, 3, or 2.

Now Alice cheats with outputs of 1,003 and -998. The sum is still 5, so the balance check passes. On the curve, -998 is a gigantic positive number nobody will ever spend, and Alice has minted 998 L-BTC from 5. The rangeproof stops this. Every output carries one, and it proves the hidden value lies between 0 and 2 to the power of 64, which -998 cannot satisfy (confidential transactions docs). A node that skips the rangeproof, or wrongly remembers it as passed, accepts the minting. The real attack did it with about 4,000 L-BTC.

Two cache bugs, and the fix that opened the second

Rangeproofs are slow to check, so Elements caches the result. After a proof passes, the node stores a key that means "seen this, it passed" and skips the check next time. Blockstream's incident assessment names two bugs in that key.

Bug A dates from Elements PR #335, merged on 30 May 2018. The key hashed only the proof bytes and the value commitment, and left out the asset commitment and the output script that the proof depends on. A 2019 refactor, commit 0b5066143d, carried the same two-field key into the newer validation code. A node that had cached a proof could accept it again in a different context, while a node without the entry would reject it.

An outside researcher, stutxo, reported Bug A to Blockstream on 2 August 2026, and the Bitcoin Red Team found it independently on 7 August (incident assessment). The fix, commit c26d719c29 by Byron Hambly, dated 3 August, adds the asset commitment and the script to the key. Blockstream deployed it to its bridge nodes on 3 August and to 13 of the 15 functionaries by 11 August, per the same report.

Bug B is in how that fix combined the fields. It writes the proof, the value commitment, the asset commitment and the script one after another with no length markers. The proof and the script vary in length, and the length inside the proof is only checked during the verification the cache exists to skip. So the attacker took an earlier, legitimately cached entry and built a longer proof, a different value commitment, the same asset commitment and a shorter script that produced the identical byte stream (incident assessment). The fake proof did not need to verify, only to produce the same bytes.

The researcher had proposed two fixes on 2 August, one of them with length-prefixed fields, and Blockstream chose the narrower one, the report says. In my view, that choice is the lesson: on consensus code, the stricter fix should win by default, and Blockstream's report now adopts that rule.

How the Liquid cache collision attack worked An earlier valid output gets its range proof checked and cached under a key that writes proof, value commitment, asset commitment and script back to back with no length markers; the attack output uses a longer invalid proof, a different commitment, the same asset and a shorter script that give the same bytes, so a node with a cache hit accepts it without checking and the federation releases 3,996.02 BTC in a peg-out, while a node with a cold cache runs the real check and rejects block 4050336. YES NO Earlier valid output proof P, commitment C under asset A, script S Node checks the proof slow range check runs result: valid Cache stores result key = bytes of P C A S no length markers Attack transaction longer P2, new C2, same A shorter S2: same bytes in a row Cache hit? seen these bytes? Real check runs, proof invalid output not backed by inputs Accepted without checking cache says: seen it, valid unbacked L-BTC now exists Block rejected cold-cache node rejects 4050336 Federation releases 3,996.02 BTC peg-out: fake L-BTC swapped for real BTC LEGEND Step Decision Outcome Focal

Warm caches accepted the block, cold caches rejected it

The attack transaction landed in Liquid block 4,050,336 at 13:53 UTC on 6 September (incident assessment). Nodes holding the matching cache entry accepted it. Nodes with a cold cache, or still running the code with Bug A, ran the real check and rejected the block. The report says the split reflects each node's cache contents, not different software versions, and that all 15 functionaries were on the same fixed build. At 20:23 UTC Chaincode Labs developer Antoine Poinsot posted: "Looks like Liquid block 4'050'336 was rejected by @mempool but accepted by @Blockstream" (Poinsot). A few hours later mempool developer mononaut wrote that "apparently the Liquid functionaries were running this bleeding-edge code" (mononaut), which the report later confirmed.

Consensus means every node applies the same rules and reaches the same answer. Here the answer depended on what each node had in memory. The functionaries were on the accepting side, so the peg-out went through and the federation paid real BTC. Running your own node is the only vote you get in a dispute like this; the Swiss node setup guide covers the Bitcoin side.

The patched code went public five days before the attack

The fix reached the public master branch on 1 September 2026 inside PR #1592, a batch of small changes described as "Fixes a number of small issues picked up during LLM scans". Pablo Greco opened PR #1599 on 4 September to carry it into the elements-23.3.x release branch "in preparation for 23.3.4rc2", and it merged at 17:21 UTC on 6 September, about three hours after the payout. Blockstream's report says that from 1 September the code containing Bug B was publicly visible (incident assessment).

Bitcoin Core handles this differently. It withholds details of medium and high severity bugs until two weeks after the last affected release goes end of life (Bitcoin Core security advisories). Whether the attackers read the public diff is not proven; their own message "The chain is under risk at latest commit right now" reads, to me, like someone with the repository open. The CVE-2023-50428 post covers how Bitcoin Core draws its own bug-versus-policy line.

For engineers

Commit c26d719c29a40da280a825b25657e9c3d8bc7d99, "fix: range proof cache bind to asset and scriptpubkey", author Byron Hambly, authored 2026-08-03, committed to master 2026-09-01 via PR #1592. Eight changed lines across src/script/sigcache.cpp (+3, -3) and src/script/sigcache.h (+1, -1). ComputeEntryRangeProof previously wrote the proof bytes then the value commitment into a salted CSHA256; it now also writes asset_commitment and scriptPubKey, with no length prefixes (commit c26d719c29). Cherry-picks: 6253d7e103 on elements-23.x (PR #1595, merged 2026-09-03) and 212c43f475 on elements-23.3.x (PR #1599, merged 2026-09-06 17:21 UTC). PR #1600, commit 94000967f6, opened 17:19 UTC and merged 19:06 UTC on 8 September on elements-23.3.x: the rangeproof and surjection-proof cache hashers move from raw CSHA256 concatenation to CHashWriter, which length-prefixes every field, both caches keep per-process salted midstates with distinct domain separators, unit tests cover field-boundary collisions and script sensitivity, and a -norangeproofcache startup flag disables the cache. The same PR bumps the version to 23.3.4. GitHub published elements-23.3.4 at 03:14 UTC on 9 September; it is no longer marked as a pre-release.

Timeline in UTC from first report to restart

Times come from Blockstream's incident assessment, Bitcoin block headers on mempool.space, and the GitHub API for the Elements repository.

Time (UTC)WhereWhat happened
2018-05-30gitPR #335 merged; Bug A enters Elements
2026-08-02emailResearcher stutxo reports Bug A to Blockstream
2026-08-03 10:53gitByron Hambly authors the fix; Blockstream deploys it to bridge nodes
2026-08-11functionaries13 of 15 functionaries run the fix
2026-09-01 14:38gitPR #1592 merged; the code with Bug B is public
2026-09-06 13:53:10Liquid 4,050,336Attack transaction; about 4,000 unbacked L-BTC created
2026-09-06 14:00SideSwapTest peg-out of 2.5 L-BTC; SideSwap pays 2.49749857 BTC
2026-09-06 14:05SideSwapAbout 4,000 L-BTC sent to SideSwap's peg-out service
2026-09-06 14:28:56Bitcoin 965,783Federation releases 3,996.02 BTC; SideSwap forwards 3,995.99999857 BTC
2026-09-06 17:21gitPR #1599 merged into elements-23.3.x
2026-09-06 18:26BlockstreamBridge nodes halted; network paused
2026-09-06 18:30:10Bitcoin 965,818Attackers: we are whitehats. contact us on chain
2026-09-06 20:25XLiquid statement: bridge nodes disabled, sidechain paused
2026-09-07 01:09BlockstreamEmergency patch deployed to bridge nodes
2026-09-07 03:30:05Bitcoin 965,875Attackers: fix the bug first, patch every node
2026-09-07 09:41:26Bitcoin 965,912Blockstream, PGP-signed: bridge nodes patched, safe to return
2026-09-07 16:09:25Bitcoin 965,9503,400 BTC returned to the federation wallet
2026-09-08 19:06gitPR #1600 merged: length-prefixed cache keys
2026-09-09 03:14gitElements 23.3.4 published
2026-09-09 21:05:10LiquidBlock production resumes on the corrected chain
2026-09-10 12:31:10Liquid 4,051,244User transactions reappear
2026-09-23Blockstream blogIncident assessment published

Who did it and what SideSwap signed

Nobody knows who did it. The only self-description is the OP_RETURN text "we are whitehats. contact us on chain" (Bitcoin block 965,818). Blockstream's report says they tested the exit with a 2.5 L-BTC peg-out at 14:00 UTC, which SideSwap paid with 2.49749857 BTC from its own inventory, then sent about 4,000 L-BTC at 14:05 UTC (incident assessment). Ledger CTO Charles Guillemet was not persuaded by the label: "If this was ever a negotiated reward under an encrypted contract signed on-chain, it looks more like extortion than white-hat hacking!" (Guillemet).

SideSwap processed the peg-out. Its statement says a customer sent 4,000 L-BTC at 14:05 UTC and the L-BTC "was burned on Liquid with a valid peg-out authorisation", and that "Our service had no way to tell those coins from any other L-BTC" (SideSwap statement). Liquid's own statement confirms the SideSwap PAK "was not compromised, nor were any others" (Liquid statement). Blockstream's report adds two things SideSwap later acknowledged: its peg-out signing key was kept online although the federation charter requires it to be offline, payouts were forwarded to the customer automatically in the same Bitcoin block, and no size limit or human review applied to an order of about 4,000 L-BTC (incident assessment).

The money trail and the on-chain negotiation

In the same Bitcoin block as the payout, SideSwap forwarded 3,995.99999857 BTC to the customer's address (forwarding transaction). That address had received 2.49749857 BTC at 14:01:57 UTC, the amount Blockstream's report gives for the test peg-out (attacker address).

Then the two sides talked on chain. The actors wrote OP_RETURN messages from that address; the Blockstream side sent 1,000 satoshis with each reply. Block 965,818 at 18:30:10: "we are whitehats. contact us on chain". Block 965,822 at 19:31:47: "Please contact security@blockstream.com". Block 965,869 at 02:20:18 on 7 September: "sending most back to bc1qdlld6..., is that ok". Block 965,875 at 03:30:05: "Please fix the bug first. The chain is under risk at latest commit right now. Make sure every node is patched. Then we will transfer the money back safely after confirming the fix." A PGP-signed "Yes, thank you." sits in the same block. Block 965,912 at 09:41:26, PGP-signed: "Bridge nodes are patched, safe to return the funds." Block 965,930 at 12:43:33: "plz confirm again that we are sending the coins back to bc1qdlld6...". Block 965,950 at 16:09:25: 15 inputs, 3,400 BTC to the federation wallet, 598.49955894 BTC back to the actors' address, 1,768 satoshis in fees (return transaction).

I checked the two signed replies myself: both verify with GnuPG against the key at blockstream.com/pgp.txt, "Blockstream Security Reporting", fingerprint 1176 542D A98E 71E1 3372 2EF7 4AC8 CC88 6844 A2D6. Sjors Provoost published a chronology of the whole exchange with the same signature checks (Provoost).

After the return, both sides switched to encrypted messages. At 11:45:49 UTC on 9 September, in block 966,199, the actors wrote in plain text: "You SHALL pay 10% using your own money as bug bounty or you will cause all your holders a 15% loss" (actors' message). Blockstream's report closes with a note asking them to return the outstanding BTC (incident assessment).

3,400 BTC came back and about 602 BTC did not

At the reference price of USD 79,807 (CoinGecko), 3,400 BTC is about USD 271.3 million and 602 BTC is about USD 48 million. Blockstream puts the amount still subject to recovery at about 602 BTC (incident assessment). On 11 October 2026 the actors' address still held 598.50 BTC (attacker address).

The liquid.network counters agree. On 11 October 2026 the federation held 3,632.23 BTC (reserves API) against 4,234.76 L-BTC in circulation (supply API), a gap of 602.53 BTC, or 85.8 percent backing by my arithmetic.

No bounty has been agreed in any signed message. Blockstream's report does not say whether Blockstream, the federation, SideSwap, or L-BTC holders absorb the gap.

What this means for federated sidechains

The 11-of-15 federation signed what its validation code told it to sign. No key leaked. Blockstream's report names two failures: the consensus bug every functionary ran, and one member's PAK set-up that forwarded the BTC at once (incident assessment). Che Kohler of The Bitcoin Manual put the critic's case: "you're not just trusting the honesty of fifteen vetted institutions; you're trusting the correctness of every line of code those institutions collectively rely on to decide what counts as a legitimate transaction" (Kohler). Samson Mow put the defender's case on the night: "The vulnerability is a node level issue and is not related to PAKs or HSMs" (Mow).

In my view, the honesty assumption held and the correctness assumption did not, and a software monoculture means one bug decides for all fifteen. Blockstream's write-up of the 2020 Liquid timelock incident already blamed "external challenges in coordinating the updates on the functionary servers" for a delayed fix (Blockstream, 2020). Lightning keeps your bitcoin on mainnet under your own keys (Lightning chapter), and Bitcoin's own consensus changes go through the slow public process in the BIP 110 post.

If you are in Switzerland and hold L-BTC

If you bought bitcoin on mainnet and hold it on a hardware wallet, do not move coins because of this news. As after the Coldcard incident in July, mainnet cold storage needs no action, and the cold storage guide applies unchanged. SIX Digital Exchange in Zurich was one of the 23 launch members in 2018 (Blockstream launch release), and Peach Bitcoin joined the federation in July 2024 (Liquid blog).

L-BTC on an exchange is a claim on the exchange. Liquid said on 6 September that exchanges had paused or would pause L-BTC deposits and withdrawals (Liquid statement); ask your exchange for its current status before sending anything, and keep a dated screenshot of the balance and the notice.

L-BTC in your own Liquid wallet was never at risk from stolen keys, because the bug was in node validation, not in wallets; SideSwap told its users there was nothing they needed to do (SideSwap statement). Transactions resumed on 10 September, but peg-outs were still suspended at Blockstream's last update (incident assessment). In my view, do not buy discounted L-BTC over the counter on the promise of a full peg; it is a bet on who covers the gap, with no disclosed terms. Blockstream warned on 9 September against acting on unsolicited Liquid or Blockstream messages (phishing alert), and the scams chapter covers the pattern.

On tax, I found no Swiss source that addresses pegged tokens or hack losses. Capital gains on private assets are tax-free under Art. 16 Abs. 3 DBG (Fedlex), and the ESTV says a Kapitalverlust (capital loss) on private assets therefore cannot be deducted, while gains and losses on business assets count (ESTV Dossier, §3.1). For Vermögenssteuer (wealth tax) on 31 December 2026, the same Dossier uses the year-end price of the trading platform you used, and where no current price exists, the original purchase price in CHF (§6.2). The Swiss tax guide covers the grey zone around wrapped bitcoin.

Where Liquid stands on 11 October 2026

Blockstream published its incident assessment on 23 September. It says block production resumed on a corrected chain at 21:05 UTC on 9 September, starting from a replacement block 4,050,336, and that the invalid outputs and their four descendants were removed in the recovery (incident assessment). User transactions resumed on 10 September. As of the report's latest update, 17 September at 21:05 UTC, peg operations remained suspended. On 11 October the Blockstream status page listed Liquid's public bridge nodes as a partial outage, and the history of the main federation address on mempool.space showed no payment to an outside address since 7 September, only transfers to itself (federation wallet).

I am watching for a Blockstream announcement that peg-outs are back and for any word on who covers the 602 BTC. You can follow the actors' address on mempool.space yourself.

Not financial, legal, or tax advice. Figures as of 11 October 2026.

Sources

Frequently Asked Questions

What is the Liquid Network?
Liquid is a Bitcoin sidechain that went live on 27 September 2018, per Blockstream's launch release. Fifteen servers called functionaries take turns proposing a block every minute, and a block counts once 11 of the 15 have signed it (what a functionary is). It runs on Elements, software built on the Bitcoin codebase. L-BTC is meant to be backed one to one by BTC in the federation's 11-of-15 multisig wallet on Bitcoin mainnet (federation multisig).
Was Bitcoin itself hacked?
No. The bug sat in Elements, the software Liquid runs on, not in Bitcoin Core. The federation's Bitcoin payout in block 965,783 was an ordinary multisig spend with valid signatures, and Blockstream's incident assessment says no key was compromised. If you hold BTC in your own wallet, nothing about this incident touches you. See the self-custody guide.
Is my L-BTC safe?
Your L-BTC still exists, but on 11 October 2026 the federation held 3,632.23 BTC (reserves API) against 4,234.76 L-BTC in circulation (supply API), about 85.8 percent. Liquid restarted on 9 September and transactions resumed on 10 September, but peg-outs were still suspended at Blockstream's last update of 17 September (incident assessment). Check the Blockstream status page before acting.
Was it a hack or a bug?
A bug that someone exploited. Elements cached the result of a successful rangeproof check under a key built from four fields written back to back with no length markers. The attacker built a different, invalid output whose bytes lined up with an earlier valid entry, so nodes holding that entry skipped the real check. That created about 4,000 L-BTC with no BTC behind it, which was then pegged out for real BTC. No key was compromised, per the Liquid statement and Blockstream's incident assessment.
Who did it?
Nobody knows. The actors are anonymous and describe themselves in a Bitcoin OP_RETURN message in block 965,818 that reads: we are whitehats. contact us on chain. They negotiated with Blockstream through on-chain messages and returned 3,400 BTC. Ledger CTO Charles Guillemet questioned the whitehat label. Sjors Provoost's message history lists every message with signature checks.
Will the funds be returned?
Most already were. Blockstream's PGP-signed on-chain message, Bridge nodes are patched, safe to return the funds, was mined at 09:41 UTC on 7 September 2026 in block 965,912. At 16:09 UTC, 3,400 BTC arrived at the federation wallet in block 965,950 (return transaction). Blockstream says about 602 BTC remains outstanding (incident assessment). No bounty has been agreed in any signed message.
Is Liquid still paused?
Partly. Block production resumed at 21:05 UTC on 9 September on a corrected chain, and user transactions resumed on 10 September, per Blockstream's incident assessment. The same report, current to 17 September, says peg operations remain suspended. On 11 October 2026 the Blockstream status page listed Liquid's public bridge nodes as a partial outage. Elements 23.3.4 contains the fix.
What is a rangeproof?
Liquid hides transaction amounts inside Pedersen commitments. A rangeproof shows that a hidden amount lies between 0 and 2 to the power of 64, so a sender cannot balance a huge positive output with a hidden negative one (confidential transactions docs). Elements caches successful rangeproof checks, and the attack made that cache say yes to a proof that was never valid. Bitcoin developer calle wrote a plain-language thread on it.
Why did Liquid nodes disagree about the block?
Blockstream's incident assessment says the split came from what each node had in its cache, not from different software versions. Nodes holding the matching earlier entry accepted block 4,050,336. Nodes with a cold cache, or still running the older code, ran the real check and rejected it. All 15 functionaries ran the same patched build, and that patch is what the attacker exploited.
What should Swiss holders of L-BTC do now?
In my view, do not sell L-BTC at a discount out of panic and do not buy discounted L-BTC on the promise of a resume. Wait for Blockstream to announce that peg-outs are back. If your L-BTC sits on an exchange, ask the exchange about its own deposit and withdrawal status and keep dated screenshots. BTC you control on mainnet is unaffected. See how to buy Bitcoin in Switzerland and the Swiss tax guide.