<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[bitcoin++'s Insider Edition: Technical Takes]]></title><description><![CDATA[Technical Takes is a weekly (sometimes bi-weekly) publication where the head of Bitcoin++, a nifty nei, writes essays covering technical bitcoin topics.]]></description><link>https://insider.btcpp.dev/s/technical-takes</link><image><url>https://substackcdn.com/image/fetch/$s_!Y_ng!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30eeeceb-d343-4c5d-93d2-4da0d7357725_650x650.png</url><title>bitcoin++&apos;s Insider Edition: Technical Takes</title><link>https://insider.btcpp.dev/s/technical-takes</link></image><generator>Substack</generator><lastBuildDate>Tue, 15 Sep 2026 09:41:44 GMT</lastBuildDate><atom:link href="https://insider.btcpp.dev/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[btcplusplus LLC]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[hello@btcpp.dev]]></webMaster><itunes:owner><itunes:email><![CDATA[hello@btcpp.dev]]></itunes:email><itunes:name><![CDATA[~nifty~]]></itunes:name></itunes:owner><itunes:author><![CDATA[~nifty~]]></itunes:author><googleplay:owner><![CDATA[hello@btcpp.dev]]></googleplay:owner><googleplay:email><![CDATA[hello@btcpp.dev]]></googleplay:email><googleplay:author><![CDATA[~nifty~]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[How cache optimization, not broken crypto, caused inflation on Liquid]]></title><description><![CDATA[Steven Roose, the CEO of Second and an ex-Liquid team engineer at Blockstream, deep dives on what, exactly, happened that lead to the Liquid Network hack of almost 4,000 on Sept 6, 2026.]]></description><link>https://insider.btcpp.dev/p/how-cache-optimization-not-broken</link><guid isPermaLink="false">https://insider.btcpp.dev/p/how-cache-optimization-not-broken</guid><pubDate>Sat, 12 Sep 2026 13:55:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!yqTv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em><a href="https://btcpp.dev/whois/stevenroose">Steven Roose</a>, the CEO of <a href="https://second.tech/">Second </a>and an ex-Liquid team engineer at Blockstream, deep dives on what, exactly, happened that lead to the Liquid Network hack of almost 4,000 on Sept 6, 2026.</em><span><br><br>I worked for Blockstream as part of the Liquid team for about five years. I am quite certain that I speak for all my former colleagues that an inflation bug as we witnessed over the last few days was our greatest fear whenever we had to touch the complex section of code that implements Liquid&#8217;s Confidential Transactions.</span></p><p><span>This is a walk through what actually happened, at the level of the code. Which bugs existed, how they were exploited, and how an attacker managed to run away with 4000 Bitcoin.</span></p><h3><span>What Liquid is, and how the peg works</span></h3><p><span>Liquid is a federated sidechain to bitcoin. Instead of proof-of-work, eleven signatures are required to produce a valid block. These signatures are placed by the Liquid functionaries: around fifteen independent businesses running a specialized server, or HSM. The functionaries take turns to propose a block roughly every minute. As long as five functionaries remain honest, no invalid blocks can be produced.</span></p><p><span>The principal asset that circulates on Liquid is L-BTC, and it is meant to be backed one-to-one by bitcoin held in reserve. The reserve is held in a wallet managed by the same federation of 15 functionaries. Converting Bitcoin to L-BTC is a </span><em><span>peg-in</span></em><span>: you send Bitcoin to a federation-controlled address on the bitcoin mainchain, and, after enough confirmations, the same amount of L-BTC is credited to you in Liquid. Getting out is a </span><em><span>peg-out</span></em><span>: you destroy L-BTC on Liquid, and the federation releases the corresponding Bitcoin to you from reserve on the mainchain. Similarly, as long as five functionaries are honest, no one can take more money out of the system than they deserve. Or that was the idea.</span></p><h3><span>Confidential transactions, confidential assets, and range proofs</span></h3><p><span>On bitcoin, every output amount is public. On Liquid, amounts can be hidden. This feature is called </span><em><span>Confidential Transactions</span></em><span>. In a confidential transaction, the output amount field doesn&#8217;t hold a plain number. Instead, it carries a Pedersen commitment, or a curve point that binds the amount behind a blinding factor.  The Pedersen commitment hides the amount while still supporting arithmetic. A verifier who cannot see any individual amount can still add up the input commitments, add up the output commitments, and check that the two sides balance. That is the </span><em><span>balance proof</span></em><span>, and it ensures transactions always have balanced inputs and outputs. In other words, the balance proof confirms that no new Bitcoin were created in the confidential transaction.</span></p><p><em><span>Confidential Assets</span></em><span> extends the same idea to which asset an output holds, not just the amount. L-BTC, Tether USDt, and every other Liquid asset look alike in the blockchain; a per-output surjection proof ties each output&#8217;s asset back to the inputs.</span></p><p><span>Balance alone is not enough, and this is the crux of the whole incident. Pedersen commitments live in a finite group, so arithmetic wraps around in modulo. A commitment can encode a value so large it behaves like a negative number. If I am allowed to do that, I can build a transaction that balances on paper while minting money:</span></p><div class="callout-block" data-callout="true"><p><span>Imagine a transaction with an input of 1 L-BTC and two outputs: one of 100 L-BTC and one of &#8220;minus 99&#8221; L-BTC. The sums on both sides match up: </span><code>1 == 100-99</code><span>. You can discard the -99 L-BTC output but keep the 100 L-BTC one.</span></p></div><p><span>The thing that forbids this is the </span><em><span>range proof</span></em><span>. Every confidential output must carry a zero-knowledge proof that proves the hidden amounts lie in a sane, positive range and not in the wrap-around zone. Range proofs are what make hidden inflation impossible.</span></p><h3><span>The cache</span></h3><p><span>Range proofs are big &#8212; a few kilobytes each &#8212; and expensive to verify. Liquid nodes see the same proof more than once: once when a transaction arrives in the mempool, again when it appears in a block. Re-running the elliptic-curve verification every time is wasteful, so Elements remembers successful verifications in a cache. The idea is simple and, in bitcoin, entirely standard: verify a proof once, remember that this exact proof passed, and skip the math if you see it again.</span></p><p><span>A cache needs a key. For a signature or a proof, the key is a hash of everything the verification depended on. Get everything into the key and the cache is safe: two verifications collide only when they truly are the same check. Leave something out and you have a problem, because now two different checks can share a key and the cache will happily answer &#8220;already valid&#8221; for a check it never ran.</span></p><p><span>That single sentence is the entire vulnerability that got Liquid hacked. The details is which fields went missing, and when.</span></p><h3><span>The 2018 cache key change</span></h3><p><span>The original cache implementation was using an existing function that Bitcoin Core uses to cache transaction signatures. Due to an upstream change to that function, in commit </span><a href="https://github.com/ElementsProject/elements/commit/957216523881768d9bcd6c5092dd5d50495dcd4e"><span>9572165</span></a><span>, a custom cache key function is introduced for range proofs specifically. Here&#8217;s the relevant changes:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;cpp&quot;,&quot;nodeId&quot;:&quot;8a9f1a0d-78f8-4b4a-824f-311161c4e53a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-cpp">+    void ComputeEntry(uint256&amp; entry, const std::vector&lt;unsigned char&gt;&amp; proof, const std::vector&lt;unsigned char&gt;&amp; commitment)

+    {

+        CSHA256().Write(nonce.begin(), nonce.size()).Write(proof.data(), proof.size()).Write(commitment.data(), commitment.size()).Finalize(entry.begin());

+    }</code></pre></div><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;cpp&quot;,&quot;nodeId&quot;:&quot;b0a85fc7-890c-4c4b-bbce-c977b5a739ed&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-cpp">-    rangeProofCache.ComputeEntry(entry, uint256(), vchRangeProof, pubkey, vchAssetCommitment, scriptPubKey);

+    rangeProofCache.ComputeEntry(entry, vchRangeProof, vchValueCommitment);</code></pre></div><p><span>The new cache key is </span><code>SHA256(nonce || rangeproof || value-commitment)</code><span>. The asset commitment and the </span><code>scriptPubKey</code><span>, which were previously there, are gone. The verification function still received them and still verified against them, but the cache no longer remembered that it had. Two range proof checks with the same proof and the same value commitment, but a different asset or a different output script, now would hash to the same cache entry.</span></p><p><span>This design violates the requirement that all relevant fields for validation must be part of the cache key, so it&#8217;s definitely a bug. Let&#8217;s look at how it could be exploited.</span></p><p><span>If the value commitment was a Pedersen commitment to the value alone, it would require breaking the elliptic curve logarithm problem to create an identical commitment to a different value. That means that it is as hard as forging a bitcoin signature. However, because of how Confidential Transactions and Confidential Assets work, the value commitment that is used here, is actually made up of two parts: it contains a commitment to the value, but it&#8217;s also mixing in a asset-specific factor so that you can&#8217;t blend different assets.</span></p><p><span>The commitment contains an additional generator </span><code>H</code><span> that is calculated from the asset. Now, if we could invent a different asset with generator </span><code>-H</code><span>, we can create an identical value commitment for the same amount, but negative.</span></p><p><span>Choosing our own asset generator would also require breaking our crypto, but we don&#8217;t really have to. The validity of the asset generators is checked in what is called the asset &#8220;surjection proof&#8221;. But, this check only happens </span><em><span>after</span></em><span> the range proofs are checked. This means that I can just claim to have an output for asset generator </span><code>-H</code><span> and a value of 1 BTC. The rangeproof will pass and be stored in the cache. Afterwards, the surjection proof will fail and the transaction will be invalid.</span></p><p><span>But any node that actually validated this transaction, will have made an entry in its rangeproof cache and will now accept a rangeproof for -1 BTC under asset generator </span><code>H</code><span> which allows the same transaction to add an extra output for 1 BTC without having sufficient input value.</span></p><p><span>What this means in practice is that an attacker could cause inflation if he could make enough functionary nodes first validate (and reject!) an invalid transaction and then propose a block that has an inflationary transaction in it.</span></p><p><span>The Liquid network has some protections against this sort of behavior: users cannot send transactions directly to the functionaries. All transactions pass through &#8220;bridge nodes&#8221; that then relay them to the functionaries. While this protects the functionaries somewhat against outside attackers, it still means that anyone with privileged access to the inner network could have exploited this bug and confirmed an inflationary transaction.</span></p><p><span>Also, if for example a malicious functionary would perform this attack, the entire rest of the network would reject this block because they hadn&#8217;t seen the invalid tx preceding it. So while an inflationary exploit was possible, it was pretty hard to execute, would be noticed way faster and could only be performed by Liquid&#8217;s inner circle.</span></p><h3><span>Why variable sized fields should always have a prefix</span></h3><p><span>On 1 September 2026, five days before the attack, commit </span><a href="https://github.com/ElementsProject/elements/commit/c26d719c29a40da280a825b25657e9c3d8bc7d99"><span>c26d719</span></a><span> fixes the 2018 bug by putting the missing fields like the asset commitment back into the cache key:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;cpp&quot;,&quot;nodeId&quot;:&quot;3b4aaa03-ed54-4166-a4a4-5bb7b5135e30&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-cpp">-void SignatureCache::ComputeEntryRangeProof(uint256&amp; entry, const std::vector&lt;unsigned char&gt;&amp; proof, const std::vector&lt;unsigned char&gt;&amp; commitment) const {

+void SignatureCache::ComputeEntryRangeProof(uint256&amp; entry, const std::vector&lt;unsigned char&gt;&amp; proof, const std::vector&lt;unsigned char&gt;&amp; commitment, const std::vector&lt;unsigned char&gt;&amp; asset_commitment, const CScript&amp; scriptPubKey) const {

     CSHA256 hasher = m_salted_hasher_range_proof;

-    hasher.Write(proof.data(), proof.size()).Write(commitment.data(), commitment.size()).Finalize(entry.begin());

+    hasher.Write(proof.data(), proof.size()).Write(commitment.data(), commitment.size()).Write(asset_commitment.data(), asset_commitment.size()).Write(scriptPubKey.data(), scriptPubKey.size()).Finalize(entry.begin());

 }</code></pre></div><p><span>Read that </span><code>Write</code><span> chain carefully. The key is now:</span></p><p><code>SHA256( nonce || proof || commitment || asset_commitment || scriptPubKey )</code></p><p><span>All four fields are present, which looks like exactly what you want. I wrote above that in the old key, only the range proof field was of variable length, and that&#8217;s why a collision could only happen for exactly the same range proof and value commitment. In this new cache key, two fields are of variable length and they are hashed without having a length prefix.</span></p><p><span>When you glue variable-length fields together without length prefixes, the boundaries between them stop being meaningful. Only the total byte string matters. If I can make the proof longer by the same number of bytes that I make the script shorter, and arrange the bytes in between them to line up, I can produce an identical concatenation for a completely different </span><code>(proof, commitment, asset, script)</code><span> tuple.</span></p><p><span>This implementation lets you create two </span><strong><span>identical</span></strong><span> cache keys for a </span><em><span>different</span></em><span> amount, asset, and script. If you can get a Liquid node to first parse a valid transaction and then an invalid one with a junk proof and a forged amount, but that is carefully crafted so that the cache key for this transaction matches exactly with the cache key of the first one, it won&#8217;t even validate the range proof because you convinced it that it has already done that before.</span></p><p><span>This is a commonly known pitfall in cryptography. Hashing structured data by raw concatenation is unsafe precisely because distinct structures can share a byte encoding. The 2016 signature cache in bitcoin gets away with concatenation because its fields are all fixed length. The moment two variable-length fields sit next to each other, concatenation is a trap.</span></p><p><span>I remember from my time at Blockstream that whenever we would introduce any new consensus-critical serialization, we would ask Russell O&#8217;Connor to review it. Russell has the reputation as the expert in spotting this kind of byte-shifting vulnerabilities.</span></p><p><span>Here is the field layout, from a diagram </span><a href="https://x.com/mononautical"><span>mononautical</span></a><span>, an engineer at Mempool.space, made </span>while going through the same rabbit hole. The cache key is <code>proof | amount | asset | script</code>. Feed it a genuine &#8220;primer&#8221; and a crafted &#8220;exploit&#8221; and the two produce the same 4,301 bytes with the field boundaries in different places:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yqTv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yqTv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yqTv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yqTv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yqTv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yqTv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg" width="1456" height="632" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:632,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:&quot;Image&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!yqTv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yqTv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yqTv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yqTv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bd5e3ef-ddab-4017-b2a3-f289806cc0f2_2400x1042.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Cache key format: the primer and the exploit serialise to the same 4301 bytes with different field boundaries</figcaption></figure></div><h3><span>How to print 4000 L-BTC</span></h3><p><span>The exploit ran in two steps, exactly as the layout predicts. I pulled the raw transactions from the explorer and reconstructed the cache keys byte for byte.</span></p><p><strong><span>Step one, the primer.</span></strong><span> In Liquid block 4,050,335 the attacker published two nearly identical transactions: </span><a href="https://blockstream.info/liquid/tx/271147100a94f6337b6c3db39b30c92d5b97ed91597307b6f721f73a15187ec5"><span>2711</span></a><code>7&#8230; </code>and <a href="https://blockstream.info/liquid/tx/71c93d4339fe8328981a2ec0dd23808d1ff104dc4c4cbcfc5c06fb2bb622f411"><span>71c93d</span></a><span>. Note that just one transaction would have sufficed. The second is presumably insurance.</span></p><p><span>Each has an output that is an </span><code>OP_RETURN</code><span> carrying a </span><em><span>genuine, valid range proof</span></em><span>, 4,166 bytes, verifiable in its own right. The clever part is the script on that output. It is a 69-byte </span><code>OP_RETURN</code><span> whose pushed data is not random: it embeds, byte for byte, the value commitment, asset generator and script head that the </span><strong><span>second</span></strong><span> transaction will need. When a node verifies this proof, it computes the cache key over </span><code>proof || commitment || asset || script</code><span> and stores a success. The primer&#8217;s only job is to plant that entry.</span></p><p><strong><span>Step two, the exploit.</span></strong><span> One block later, in 4,050,336, transaction </span><a href="https://blockstream.info/liquid/tx/f24a4b179b5cc7e88b25a763911f7cbdf2bf45d1d1b5ab611e94461cef0a183f"><span>f24a4b&#8230; </span></a><span>creates an output whose &#8220;range proof&#8221; is 4,234 bytes that would never pass as a valid range proof. But those 4,234 bytes are not random either: they are the primer&#8217;s 4,166-byte proof, followed by the primer&#8217;s 33-byte commitment, followed by the 33-byte asset generator, followed by the two script-header bytes </span><code>6a 43</code><span>. In other words, the exploit&#8217;s </span><em><span>proof field</span></em><span> has swallowed the primer&#8217;s proof, commitment, asset and script-head. The exploit&#8217;s own commitment, asset and a one-byte </span><code>6a</code><span> (</span><code>OP_RETURN</code><span>) script then follow in their proper places, as they were encoded in the primer&#8217;s </span><code>OP_RETURN</code><span> data.</span></p><p><span>Line up the two cache-key preimages and they are the same string:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;26532d33-155a-4cbb-9c7a-17a9bbf9df28&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">primer:   &lt;4166B proof&gt; | &lt;33B comm&gt; | &lt;33B asset&gt; | &lt; 2B head&gt; | &lt;33B comm&gt; | &lt;33B asset&gt; | &lt;1B script&gt;

                                                     &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; 69B script &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;

exploit:  &lt;4166B proof&gt; | &lt;33B comm&gt; | &lt;33B asset&gt; | &lt; 2B head&gt; | &lt;33B comm&gt; | &lt;33B asset&gt; | &lt;1B script&gt;

          &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; 4234B &#8220;proof&#8221; &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;</code></pre></div><p><span>The exploit&#8217;s forged output collides with the primer&#8217;s cache entry, so the range proof checker short-circuits to &#8220;valid&#8221; and never looks at the invalid proof. That output hides a massive overflowing amount (the &#8220;negative&#8221; output from the balance-attack sketch earlier) and a sibling output credits the attacker with a large positive amount. The balance proof, which is real and which the attacker cannot fake, sums to zero. The range proof, </span><em><span>which should have stopped it</span></em><span>, was answered from cache.</span></p><h3><span>The chain split</span></h3><p><span>Interestingly, the attack did not fool most of the Liquid network. It only fooled nodes whose cache had been poisoned, and because the commit that introduced the buggy fix had not been included in an official Elements release yet, most of the network was not running this version of the Liquid node software. It looks like the Liquid federation decided to first deploy this bugfix release to the internal Liquid infrastructure. This is a common thing to do when deploying security fixes.</span></p><p><span>But it meant that most of the network actually rejected the attacker&#8217;s transaction. They didn&#8217;t have the cache key change, so no cache hit and they actually validated the range proof and rejected the transaction, as well as the block that the transaction was relayed in.</span></p><p><span>These nodes stalled at height 4,050,335: the last block before the exploit. The nodes running the vulnerable build, including the federation&#8217;s bridge nodes, accepted 4,050,336 and kept going.</span></p><p><span>You can still watch this split today. Blockstream&#8217;s explorer, </span><a href="https://blockstream.info/liquid/"><span>blockstream.info</span></a><span>, sits above height 4,051,000. mempool.space&#8217;s Liquid node, </span><a href="https://liquid.network/"><span>liquid.network</span></a><span>, is frozen at exactly </span><strong><span>4,050,335</span></strong><span>.</span></p><p><span>OrangeSurf </span><a href="https://github.com/orangesurf/liquid-transaction-replay-monitor"><span>published</span></a><span> the reproduction recipe: run a build that includes the vulnerable commit, </span><code>invalidateblock 4050335</code><span> to push the primer back into the mempool so the poisoned key gets re-inserted, then </span><code>reconsiderblock</code><span> and your node reorgs onto the federation&#8217;s inflated chain.</span></p><h2><span>Out the front door: PAK and SideSwap</span></h2><p><span>Inflating L-BTC is only half a heist. The attacker still had to convert unbacked L-BTC into real BTC, and Liquid does not let just anyone pull from the reserve. Peg-outs are gated by </span><em><span>PAK</span></em><span>, the Pegout Authorization Key system. Each peg-out output must carry a whitelist proof tying the destination to a registered key belonging to a trusted federation member. A peg-out to an unauthorized key is simply invalid as per Liquid&#8217;s consensus rules.</span></p><p><span>So the attacker needed a PAK holder to peg the coins out for them. Enter </span><em><span>SideSwap</span></em><span>, a Liquid member that runs a peg-out pass-through service: you send it L-BTC, it peg-outs under its own PAK key, and it forwards the resulting BTC to whatever mainchain address you give it. This is a useful product. It is also a good way to render the entire PAK system pointless.</span></p><p><span>In Liquid block 4,050,349, thirteen blocks after the exploit, the coins were pegged out. On the bitcoin side the federation released the reserve as designed: roughly 3,996 BTC landed at SideSwap&#8217;s whitelisted address </span><a href="https://mempool.space/address/bc1qgslsydz56d0ed6827hdemfmk5w2f6ldyc6wt7p"><span>bc1qgslsydz56d0ed6827hdemfmk5w2f6ldyc6wt7p</span></a><span>, which forwarded it on to the attacker&#8217;s address </span><a href="https://mempool.space/address/bc1ql4mfu6aundtkksxklfajs2h3t9nzcd6gyqjlte"><span>bc1ql4mfu6aundtkksxklfajs2h3t9nzcd6gyqjlte</span></a><span>.</span></p><p><span>Because the balance and PAK checks all passed, SideSwap&#8217;s node and every functionary treated it as an ordinary authorized withdrawal. Liquid&#8217;s own incident report confirms the shape: the validation failure was at the transaction level, before the peg-out, so nothing downstream had reason to object.</span></p><p><span>The part that should give every system designer pause: </span><strong><span>neither the peg-out mechanism nor SideSwap had either a built-in time delay or an upper limit on amounts.</span></strong><span> A single transaction that moved on the order of 4,000 BTC, roughly 400M USD at the time, went straight through: no waiting, no manual review, no velocity check. Before the incident the reserve held about 4,205 BTC. Nothing was in place to prevent 95% of that from leaving the system in about half an hour.</span></p><h3><span>The white hat and the negotiation</span></h3><p><span>Then the story takes a very unexpected turn. Bitcoin heists like this usually are followed by total silence in which the funds stay put, or by transactions showing the attacker is trying to obfuscate his trails and white-wash the coins.</span></p><p><span>Instead, a few hours after the drain, with a </span><a href="https://mempool.space/tx/c103de95817b43f2df635ec6f35ff126ca26a7c6d20570c4b01866b2b3e69a19"><span>transaction</span></a><span> paying 1,000 sats to the federation wallet, the attacker left a note in an </span><code>OP_RETURN</code><span>:</span></p><blockquote><p>&gt; we are whitehats. contact us on chain</p></blockquote><p><span>Blockstream replied from a known address: </span><code>&#8220;Please contact security@blockstream.com&#8221;,</code><span> then an encrypted message signed with their security key. The attacker agrees to send the funds back to the federation address but demands the bug be fixed first:</span></p><blockquote><p><span>&gt; 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.</span></p></blockquote><p><span>Blockstream clear-signed </span><strong><span>&#8221;Yes, thank you,&#8221;</span></strong><span> and later &#8221;</span><strong><span>Bridge nodes are patched, safe to return the funds.&#8221;</span></strong><span> </span></p><p><span>On 7 September at 16:09 UTC, the attacker </span><a href="https://mempool.space/tx/a6d697a25266ce3c78774fd1d75f896b7af522ada209b0f6228ea497bc49a46d"><span>returned</span></a><span> exactly </span><strong><span>3,400 BTC</span></strong><span> to the federation&#8217;s wallet and kept about </span><strong><span>598.5 Bitcoin</span></strong><span> (roughly 15%) in his own wallet.</span></p><p><span>That 15% was not an accident, and the tone did not stay collegial. In a later message the attacker dropped his white-hat pose entirely:</span></p><blockquote><p><span>Your dereliction of duty is obvious that you allocated only $1.5M (maybe even 0) to secure $5B assets. [&#8230;] You SHALL pay 10% using your own money as bug bounty or you will cause all your holders a 15% loss for your irresponsibility and stinginess. [&#8230;] Anyway we are going to publish the private key to decrypt our conversations afterwards.</span></p></blockquote><p><span>Whatever you call someone who drains a chain, pegs it out through an unwitting third party, and then negotiates a bounty under threat, &#8220;white hat&#8221; is not a term I would use. As of writing, Liquid is still paused, the 3,400 BTC is back, and roughly 598 BTC is outstanding while the two sides argue over the difference.</span></p><p><span>The whole exchange is visible on the bitcoin mainchain, signed and verifiable; </span><a href="https://btcpp.dev/whois/sjors"><span>Sjors</span></a><span> published a </span><a href="https://gist.github.com/Sjors/9d24363e67529079cc2ae4305ff90fcd"><span>script and transcript</span></a><span>, that checks the PGP signatures against Blockstream&#8217;s published key, and there is a </span><a href="https://opreturn-chat.arvin.dev/"><span>readable viewer</span></a><span> where you can follow the entire conversation live.</span></p><h2><span>The real fix, and what it teaches</span></h2><p><span>The actual repair got </span><a href="https://github.com/ElementsProject/elements/commit/94000967f6dc05b1afd435e79b1bbc597e29f816"><span>shipped</span></a><span>, as part of Elements release v23.3.4. It stops hashing the cache-key fields by raw concatenation and serializes them through </span><code>CHashWriter</code><span> instead, which length-prefixes every field. Once each variable-length field is preceded by its length, the byte-shift trick is dead: a longer proof and a shorter script no longer produce the same encoding, because the lengths themselves are part of the hash. The release also adds a </span><code>-norangeproofcache</code><span> switch to turn the cache off entirely.</span></p><p><span>There are a few lessons here, and none of them are exotic.</span></p><p><strong><span>A cache key is a security boundary.</span></strong><span> The instant a verification result is memoized, the key that identifies it inherits the full weight of the check it replaces. Leave a field out and you have silently widened what counts as &#8220;the same&#8221;.</span></p><p><strong><span>Simple concatenation is not safe serialization</span></strong><span>. Gluing variable-length fields together without lengths or safe delimiters is a canonicalization bug waiting for someone with creativity to find a way to abuse it.</span></p><p><strong><span>Fixes deserve the same fear as features,</span></strong><span> especially security fixes under time pressure. The recent change was trying to make the key correct and ended up breaking it instead. The dangerous edit was the one that looked like a patch.</span></p><p><span>And, finally, </span><strong><span>defense in depth is not optional</span></strong><span> at the money layer. Bugs happen to all of us, but the loss was 4,000 BTC because a single peg-out with no limit could carry the entire reserve out in half an hour. The consensus bug is fixed. The question of why the pegouts have no delay and no ceiling is the one Blockstream and SideSwap still have to answer.</span></p><p></p><p><em><span>bitcoin++ Insiders Edition will be in Berlin, this coming October 1 &#8212; 3 at the upcoming payments edition bitcoin++ conference. Join us for three days of hacking, talks, and hands-on workshops. </span><a href="https://btcpp.dev/berlin26#tickets?code=insider"><span>Use code INSIDER for 20% off a ticket.</span></a></em></p>]]></content:encoded></item><item><title><![CDATA[Bitcoin SHRIMPS - How Blockstream’s Latest Quantum Proposal Looks to Minimize Risks]]></title><description><![CDATA[Introduction]]></description><link>https://insider.btcpp.dev/p/bitcoin-shrimps-how-blockstreams</link><guid isPermaLink="false">https://insider.btcpp.dev/p/bitcoin-shrimps-how-blockstreams</guid><dc:creator><![CDATA[Tuma (I WILL NEVER DM YOU)]]></dc:creator><pubDate>Sat, 29 Aug 2026 14:04:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!FKfu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FKfu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FKfu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FKfu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FKfu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FKfu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FKfu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:865118,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/213259026?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FKfu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FKfu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FKfu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FKfu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f775105-74da-4b62-a64a-494ce26bc075_1376x768.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Introduction</h2><p>It&#8217;s 2034 and mid-day on a Thursday. Your mom just called, she needs some urgent help paying a ransom to get access to her emails and bank passwords &#8212; someone&#8217;s locked her computer. You go to find your hardware wallet only to discover that your dog just destroyed your &#8216;primary&#8217; signing device. Luckily, you moved your funds back in 2028 to a new key format that Blockstream Research launched in 2026, SHRIMPS, which will let you use your backup key to sign for your funds without a problem and without spending all the available balance for fees.</p><p>Backing up wallet state is a big issue for post-quantum hash-based signatures. Blockstream Research&#8217;s latest update is a push in the direction of better, stateless backups without giving up gains in conserving blockspace.</p><div><hr></div><p>The previous Blockstream Research post-quantum signature scheme was reported on by Insider Edition. Our <a href="https://insider.btcpp.dev/p/how-to-make-smaller-post-quantum">deep dive on SHRINCS</a>, a quantum-resistant scheme combining both <a href="https://insider.btcpp.dev/i/197656976/stateful-and-stateless">stateful and stateless</a> hash-based signatures shows how stateful and stateless schemes can be combined in a single signature. Stateful schemes allow for smaller signatures, at the cost of needing to keep track of which signatures have been already used (this is the &#8216;state&#8217; you&#8217;re tracking).</p><p>If the record of what signatures have already been made is lost, like in our opening horror story, you can no longer use the keys without risking compromising their security, which would allow someone else to move your funds.</p><p>On the other hand, we have stateless signing schemes. These can be easily restored from a static backup such as a seed phrase, but the signatures they produce are quite large &#8212; you trade cheap onchain signatures for a guarantee of being able to use it if lose your device.</p><p>SHRINCS, <a href="https://blog.blockstream.com/op_checkshrincs-a-hash-based-signature-opcode-for-post-quantum-bitcoin/">Blockstream Research&#8217;s first</a> post-quantum (PQ) signature proposal, fuses a stateful and stateless scheme to give you the best of both worlds. The combined signature scheme uses the stateful scheme which produces smaller signatures for ordinary operations, but falls back to the stateless, more expensive signatures, if your signing history is lost. SHRINCS&#8217;s stateless signing mode removes the risk of producing weak or forgeable signatures from lost state, while allowing you to benefit from smaller, stateful signatures in the default case.</p><p>On March 27th, Director of Blockstream Research <a href="https://x.com/https://btcpp.dev/whois/jonasnick">Jonas</a> <a href="https://x.com/n1ckler">Nick</a> introduced a new scheme called <a href="https://delvingbitcoin.org/t/shrimps-2-5-kb-post-quantum-signatures-across-multiple-stateful-devices/2355">SHRIMPS</a> on the popular technical forum, Delving Bitcoin. SHRIMPS is another PQ signature scheme proposal. As a product of one of Bitcoin&#8217;s most experienced research labs, it aims to improve on the earlier SHRINCS proposal.</p><p>By default, a SHRINCS backup signing device would default to using the stateless signing mechanism. In this case, your keys lose the ability to produce smaller signatures, moving from 324 bytes per signature to up to 8KB, a 25x increase in on-chain weight. This is problematic, given that you pay for every byte used in a bitcoin transaction. Backup signing devices, if used, would produce 25x more expensive transactions.</p><p>SHRIMPS, the latest proposal, aims to optimize the fallback option of SHRINCS. Instead of having a single fallback option, SHRIMPS would allow user&#8217;s backup devices to sign in a compact form until a threshold number of signatures is reached, and only once the limit on smaller signatures is reached, falling back to the more expensive, larger signature signing option.</p><h3>Basics of SHRIMPS</h3><p>The construction of SHRIMPS combines <strong>two</strong> instances of <a href="https://insider.btcpp.dev/p/sphincs">SPHINCS+</a>, a stateless hash-based PQ signature scheme. SPHINCS+ is complex. It&#8217;s constructed using several WOTS+ and XMSS nested trees to produce a single quantum safe key-pair. A SPHINCS+ key-pair can be used to sign many messages safely.</p><p>The depth of navigating the SPHINCS+ hash tree to locate the public/private key is what contributes to the large size of SPHINCS+ stateless signatures. The statelessness comes from the low probability of ever picking the same path in the tree again, at random. However, there is an upper bound to how many signatures can be produced in a SPHINCS+ tree before the odds of picking the same path again goes above what is considered &#8216;safe&#8217;.</p><p>In the SPHINCS+ literature, <code>q_s</code>is this upper limit. It&#8217;s the bound on the number of signatures that can be securely produced under a single SPHINCS+ key tree. <code>q_s</code> also governs the depth of the nested SPHINCS+ trees. So a smaller <code>q_s</code> means smaller resulting signatures, as it takes less data to describe the path through the SPHINCS+ forest. A smaller tree means less signatures that can be safely produced, but also less data per signature.</p><p>SHRIMPS uses this <code>q_s</code> to create two different SPHINCS+ key trees, and then binds them together into a single key, which can sign using either of the two SPHINCS+ trees. The trees only differ on the value of their <code>q_s</code> parameter: The first instance, referred to as compact path, uses a low <code>q_s</code>, which allows for smaller, but very limited number of signatures; the second instance uses a larger <code>q_s</code>. It produces much larger signatures, but can sign an almost infinite number of times.</p><p>Since both options are using SPHINCS+, both tree options are independently stateless. Unlike in SHRINCS where on one path you must remember what you&#8217;ve signed, SHRIMPS&#8217; paths only need to remember how many times the lower-bound SPHINCS+ tree has been used.</p><p>According to Nick, for the compact instance <code>q_s = 2^10</code> would be a good, conservative bound &#8212; providing around 1024 signatures &#8212;, while the fallback instance should be implemented with a sufficiently large parameter, such as <code>q_s = 2^40</code> or <code>q_s = 2^64</code> &#8212; an upper bound of around 1.85 x 10^19 signatures.</p><p>The SHRIMPS public key <code>p_k</code> is the hash of the public keys of each of the two SPHINCS+ treesets. A signature consists of a SPHINCS+ signature under the chosen instance <code>s_k1</code> and the public key of the other <code>p_k2</code>. The verifier reconstructs the signing instance&#8217;s public key <code>p_k1</code> from the SPHINCS+ signature, hashes <code>p_k1</code> and <code>p_k2</code> to reconstruct the combined public key, and compares it to the known SHRIMPS public key, <code>p_k</code>.</p><p>When initializing a new device by providing a seed, it will deterministically derive keys for each of the two SPHINCS+ instances. Each device will have its own, independent, persistent state to check whether the compact path has already been used or not.</p><h3>How Many Signatures?</h3><p>Assuming that the compact signature can be used to sign at most once for every device, <code>q_s</code> basically becomes the upper limit to the number of devices that could be initialized, <code>n_dev</code>. Setting <code>q_s = n_dev = 2^10</code> means giving the user the possibility to initialize more than one thousand devices, which seems a lot, even in the most pessimistic cases. Hopefully, no one would lose access or break a device more than one thousand times!</p><p>The &#8220;budget&#8221; could also be expanded to provide each device with more than one compact-path signature to be used. For example, setting <code>n_devsigs = 2^4</code> would provide the possibility to sign 16 times with the compact instance with each device, nevertheless resulting in a signature smaller than 3KB. In this case, the parameter would be set to <code>q_s = n_dev x n_devsigs</code> .</p><p>As we said, each device needs to store an independent counter to decide whether to use the compact signature or not. The counter will be <code>log2&#8289;(n_devsigs + 1)</code> bits in size, depending on the number of signatures available for each device.</p><p>In the simplest case &#8212; one device, one compact signature &#8212; the signing flow would require to check whether the independent, single-bit counter is <code>0</code> or <code>1</code>. In the first case, the device will sign using the compact SPHINCS+, resulting in a 2.5KB signature at 128bit security. Otherwise, it falls back to the larger instance. In case <code>n_devsigs &gt; 1</code> , the device will be able to use the compact signatures several time until exhaustion &#8212; 16, in case <code>n_devsigs = 2^4</code>.</p><p>If the number of compact-path signatures exceeds the <code>q_s</code> budget, security does not break down immediately. Instead, it degrades gradually, as the the table provided by Nick clearly shows. With a budget set to <code>q_s = 2 ^10</code> , the security of the scheme is 128.0 bits. Using <code>2^11</code> signatures doesn&#8217;t degrade security, which only start to drop tp 125.1 bits when signing with the compact scheme <code>2^12</code> times (i.e. 4 times the available budget).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R6bT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R6bT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png 424w, https://substackcdn.com/image/fetch/$s_!R6bT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png 848w, https://substackcdn.com/image/fetch/$s_!R6bT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png 1272w, https://substackcdn.com/image/fetch/$s_!R6bT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R6bT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png" width="343" height="250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73c4a264-9c47-484e-928b-e689351217cf_343x250.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:250,&quot;width&quot;:343,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:15972,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/213259026?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!R6bT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png 424w, https://substackcdn.com/image/fetch/$s_!R6bT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png 848w, https://substackcdn.com/image/fetch/$s_!R6bT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png 1272w, https://substackcdn.com/image/fetch/$s_!R6bT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73c4a264-9c47-484e-928b-e689351217cf_343x250.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Putting it all together</h3><p>As previously said, the aim of SHRIMPS is to improve on the stateful scheme side of SHRINCS to provide a safe path towards funds recovery. When using SHRINCS, if a single signing device is lost, the scheme allows the user to recover its keys using a static backup. However, it will default to use the heavy stateless scheme as soon as the state for the smaller signature scheme is lost.</p><p>SHRIMPS provides an intermediate step between the lean stateful signatures (324 bytes) and the huge stateless ones (~8KB), by allowing for a series of devices, each which can track their state independently and produce smaller SPHINCS+ signatures until the counter expires.</p><p>Putting together SHRINCS and SHRIMPS would result in the following workflow:</p><ul><li><p>The first device is initialized, and the stateful scheme is used to sign any transaction. The stateful scheme is used until the state is known, to avoid breaking the cryptographic assumptions of the scheme. Each signature is 324bytes in size.</p></li><li><p>Once the state is lost (i.e. first device is no more usable), a new device is initialized. The compact SPHINCS+ instance is used to sign until the budget <code>n_devsig</code> for the device is reached. Each signature is ~2.5KB in size.</p></li><li><p>When the whole budget has been drained, the SPHINCS+ with the larger <code>q_s</code> parameter, and thus larger signatures, is used. Each signature would be between ~4KB and ~8KB depending on the exact parameters chosen, but the number of signatures available is high enough to allow for practically unlimited signing.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pmgb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pmgb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png 424w, https://substackcdn.com/image/fetch/$s_!pmgb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png 848w, https://substackcdn.com/image/fetch/$s_!pmgb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png 1272w, https://substackcdn.com/image/fetch/$s_!pmgb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pmgb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png" width="601" height="321" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:321,&quot;width&quot;:601,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28680,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/213259026?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pmgb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png 424w, https://substackcdn.com/image/fetch/$s_!pmgb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png 848w, https://substackcdn.com/image/fetch/$s_!pmgb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png 1272w, https://substackcdn.com/image/fetch/$s_!pmgb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fbb3d12-72d4-4fb3-8199-f8da3ed81438_601x321.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In the following table, we can see the size of the signatures produces by the different algorithms:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9Y35!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9Y35!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png 424w, https://substackcdn.com/image/fetch/$s_!9Y35!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png 848w, https://substackcdn.com/image/fetch/$s_!9Y35!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png 1272w, https://substackcdn.com/image/fetch/$s_!9Y35!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9Y35!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png" width="293" height="143" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:143,&quot;width&quot;:293,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:13743,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/213259026?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9Y35!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png 424w, https://substackcdn.com/image/fetch/$s_!9Y35!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png 848w, https://substackcdn.com/image/fetch/$s_!9Y35!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png 1272w, https://substackcdn.com/image/fetch/$s_!9Y35!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4424e2-0a96-4c9c-a094-e59cc8196da3_293x143.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>Post-quantum Bitcoin is Moving</h3><p>Brink recently announced that they had hired quantum cryptography researcher Conduition, to focus on making Bitcoin quantum-secure. His main area of focus will be to make SHRINCS a reality, providing a usable protocol and draft BIP for the signature scheme. This seems to point to the fact that SHRINCS could be a viable solution in a post-quantum future. Building upon this protocol, thus, follows a natural course. SHRIMPS is another clever solution to improve the UX of post-quantum signatures even more.</p><p>And earlier this month, following the rash of LLM powered attacks on existing Bitcoin infrastructure, Jonas Nick <a href="https://delvingbitcoin.org/t/libshrincs-a-c-implementation-with-a-machine-checked-security-proof/2795">announced</a> a preliminary C library &#8212; <a href="https://delvingbitcoin.org/t/libshrincs-a-c-implementation-with-a-machine-checked-security-proof/2795">libshrincs</a>. It is a handwritten C library implementing WOTS+C, the one-time signature used by SHRINCS for the stateful signing path.</p><p>On August 27th Jonas Nick also <a href="https://x.com/n1ckler/status/2092740384938226107">announced</a> the publication of <a href="https://github.com/SHRINCS/shrincs-bip/blob/main/SHRINCS.md">BIP SHRINCS</a>, the draft proposal specifying all the underlying cryptography needed for the scheme to work. While using SHRINCS in Bitcoin Script would require a separate BIP, this proposal defines the design choices, new parameter set, and improvement on top of the <a href="https://delvingbitcoin.org/t/shrincs-324-byte-stateful-post-quantum-signatures-with-static-backups/2158">original proposa</a>l. The BIP is up for debate and the SHRINCS working group &#8212; composed by <a href="https://btcpp.dev/whois/conduition">Conduition</a>, Mike Casey, <a href="https://github.com/EthanHeilman">Ethan Heilman</a>, <a href="https://github.com/remix7531">Remix</a>, <a href="https://github.com/starius">Boris Nagaev</a>, <a href="https://github.com/error0024">Mikhail Kudinov</a>, <a href="https://btcpp.dev/whois/distributed-lab">Oleksandr Kurbatov</a>, and Nick himself&#8212; is waiting for feedback on the proposal.</p><p>Research on post-quantum signature for scarce resource environments is still at the beginning, but the ball is already moving. Improving on the small signatures, and fallback in case of state loss is another step towards a better experience using Bitcoin securely and cheaply in a post-quantum world.</p>]]></content:encoded></item><item><title><![CDATA[When random.bytes() runs but doesn't work]]></title><description><![CDATA[What a commit message tells us about the recent COLDCARD bug]]></description><link>https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt</link><guid isPermaLink="false">https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt</guid><dc:creator><![CDATA[Dusty Daemon]]></dc:creator><pubDate>Sat, 01 Aug 2026 15:30:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!BDET!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>This is a guest post from noted Core-Lightning developer, </em><code>ddustin</code><em>, who dug into the Coldcard firmware commit history to uncover what happened and why the code failed.</em></p><h2><span>Intro</span></h2><p><span>I began investigating the Coldcard hack and was immediately shocked. I need to explain why.</span></p><p><span>When we developers work on code, we organize or code changes into changesets we call &#8220;commits.&#8221; The purpose of doing so is to show a clear history of what code was changed including why and how.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BDET!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BDET!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!BDET!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!BDET!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!BDET!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BDET!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2128744,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/209314702?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BDET!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!BDET!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!BDET!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!BDET!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c90d04-92b6-4b71-9826-4f752f690009_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>This is done precisely for </span><strong><span>instances like this</span></strong><span> where it appears Bitcoiner&#8217;s funds are being stolen en masse, so we can investigate and understand exactly how it could happen.</span></p><p><span>Good developers write clear commit messages, written notes that go along with the code changes that explain what the specific change is accomplishing.</span></p><p><span>To make a clear commit message, you typically want to the commit to represent a smaller change of code, so there&#8217;s less to comment on.</span></p><p><span>A good goal as a developer is a high commit message to change ratio. The more lines of code that you change, the more comments explaining why you&#8217;re changing the code. </span><em><span>More</span></em><span> message and </span><em><span>less</span></em><span> code changes per commit is generally a good idea.</span></p><p><span>Here is an example chosen </span><a href="https://github.com/ElementsProject/lightning/pull/9097/changes/2379288826aebed1548e5dbea5a692b80f60ca37"><span>randomly from some of my own work.</span></a></p><p><span>The commit message is 235 characters, and the commit changes 15 lines of code. That&#8217;s  a ratio of 235/15 = ~16.</span></p><p><span>In the cold card, the commit that introduced the low entropy bug is </span><a href="https://github.com/Coldcard/firmware/commit/37e4af5451c260c1e7d429fe8972c4cb5e68ee59"><span>here.</span></a></p><p><span>The commit message is 5 characters and is simply the word &#8220;runs.&#8221; The commit changes 1534 lines of code making the ratio 5/1534 = ~0.003</span></p><p><span>This is an atrociously bad comment to code change ratio.</span></p><p><span>There are some rare instances where a low comment ratio is justifiable -- but changing </span><strong><span>the most important part of the code</span></strong><span> is not one of those cases!</span></p><p><span>Code that touches functions critical to the security of the project need to have a </span><em><span>higher</span></em><span> ratio of comments to changes and more stringent review.</span></p><p><span>The second commit contributing to the weak entropy issue on Coldcards is </span><a href="https://github.com/switck/libngu/commit/f19de0527a49e560203102288ae4bc9740a32d96"><span>here.</span></a></p><p><span>The commit message is 1 character: simply the character &#8220;x.&#8221; The commit changes ~1000 lines of code making the ratio 1/1000 = ~0.001</span></p><h2><span>The Issue</span></h2><p><span>In the </span><a href="https://github.com/Coldcard/firmware/commit/37e4af5451c260c1e7d429fe8972c4cb5e68ee59"><span>commit titled &#8220;runs&#8221; </span></a><span> (ratio: ~0.003), it appears they are importing and configuring C code to make custom micropython code work on the STM32, the board that all Coldcards run on.</span></p><p><span>STM32 is the most common CPU for small devices like this, and configurations like what this commit introduces are common.</span></p><p><span>In the &#8216;runs&#8217; commit, the hardware RNG (Random Number Generation) was disabled with the following line of code. </span></p><p><code>#define MICROPY_HW_ENABLE_RNG       (0)</code></p><p>This is what caused the bug. Setting this value to zero tells the default micropython rng code to not use the hardware RNG device and that it should use the Yasmarang RNG instead. </p><p><span>The developer added an inline comment &#8220;explaining&#8221; this change</span></p><p><code>// We have our own version of this code.</code></p><p><span>The COLDCARD version of this code appears to be in reference to the functions added in rng.h and rng.c</span></p><p><code>rng.h</code></p><p><code>MP_DECLARE_CONST_FUN_OBJ_0(pyb_rng_get_obj);</code></p><p><code>MP_DECLARE_CONST_FUN_OBJ_1(pyb_rng_get_bytes_obj);</code></p><p><span>These appear to be an attempt to override the stm32 rng library&#8217;s `</span><code>pyb_rng_getobj` </code>function. This approach ran into trouble. T<span>he stm32 rng.c file already defines the </span><code>pyb_rng_et_obj </code>variable and sets the value to `<code>pyb_mg_get`.</code> You can&#8217;t have two definitions of the same variable and have it compile.</p><p><code>rng.c</code></p><p><code>MP_DEFINE_CONST_FUN_OBJ_0(pyb_rng_get_obj, pyb_rng_get);</code></p><p><span>Expanding the macro and thinking of it logically is just this pseudocode:</span></p><p><code>var pyb_rng_get_obj = pyb_rng_get</code></p><p><span>Commit `</span><code>37e4af5` </code>adds a custom <span>rng.c file, where he copy pasted the same macro definition</span></p><p><code>MP_DEFINE_CONST_FUN_OBJ_0(pyb_rng_get_obj, pyb_rng_get);</code></p><p><span>There is now no way for this code to compile. It appears that the developer is naively trying to override the `</span><code>pyb_rng_get_obj</code><span>` variable by creating a duplicate version of the variable. C does not work this way.  This error would have given him a compiler error of &#8220;duplicate symbol </span><code>pyb_rng_get_obj</code><span>, because there are now two places where it is defined: the stm32 library, and in the newly added rng.c file.</span></p><p><span>From here, I assume in a bout of frustration, he set `</span><code>MICROPY_HW_ENABLE_RNG</code><span>` to 0, which would have resolved the compiler error.</span></p><p><span>Sometimes when developers are flailing, they&#8217;ll try random things to see if it helps. Setting `</span><code>MICROPY_HW_ENABLE_RNG</code><span> to 0 would have made the compiler error go away ***for the wrong reason***.</span></p><p><span>This swept the compiler error of having two conflicting definitions under the rug.</span></p><p><code>// We have our own version of this code.</code></p><p><code>#define MICROPY_HW_ENABLE_RNG       (0)</code></p><p><span>Setting </span><code>MICROPY_HW_ENABLE_RNG</code><span> to zero completely removed the code that used the hardware random number generator, or</span><a href="https://github.com/micropython/micropython/blob/master/ports/stm32/rng.c#L31-L80"><span> lines 31 to 80 in the stm32 rng.c file</span></a><span>. This had the side effect of removing the second definition of </span><code>pyb_rng_get_obj</code><span>, which &#8220;fixed&#8221; the compiler error. </span></p><p><span>The compiler error was begging the programmer to reconsider his logic. Instead of that happening, the compiler error was just silenced. The compiler was giving the developer one last chance to reconsider what he was about to do, but the alarm was ignored and silenced.</span></p><p><span>Now everything is lining up. It looks like the developer tried to override the variable, but ran into conflicting definitions. When confronted with a &#8220;duplicate symbol&#8221; error, tried changing random things to get the code to </span><em><strong><span>run</span></strong></em><span>.</span></p><p><span>He discovered that changing `</span><code>MICROPY_HW_ENABLE_RNG</code><span>` to 0 made it compile. He probably had no idea why but came up with a theory. We don&#8217;t need that anymore because we have our own version of the code.</span></p><p>His definitions of the <code>pyb_rng_get</code> were in place, and the code he was intending not to run had been turned off.</p><h2><span>Confusing Call Chains</span></h2><p><span>Coldcard&#8217;s firmware is written in C. The application layer, that tells the hardware what to do is written in Python. The Python code calls into the C code. The developer overwrote the </span><code>pyb_rng_get</code> functions. </p><p><span>Unfortunately for many, the </span><code>pyb_rng_get</code> functions that his code overwrote weren&#8217;t what is actually called from the python code. <span>The Python code in v4.0.0 of the Coldcard calls </span><code>random.bytes()</code><span> in their </span><code>make_new_wallet()</code> <span>function.</span></p><p><code><br>async def make_new_wallet():</code></p><p><code>    await ux_dramatic_pause(&#8217;Generating...&#8217;, 4)</code></p><p><code>    seed = random.bytes(32) # OOPS</code></p><p><code>    assert len(set(seed)) &gt; 4</code></p><p><code>    seed = ngu.hash.sha256s(seed)</code></p><p><code>    await approve_word_list(seed)</code><span><br><br>Setting `</span><code>MICROPY_HW_ENABLE_RNG</code><span>` to 0 turned off the stm32 library provided hardware code, but allowed the developer to set `</span><code>pyb_rng_get_obj</code><span>`. Problem is, </span><code>pyb_rng_get_obj</code><span> is the Python-visible </span><strong><span>pyb.rng() </span></strong><span>callable.</span></p><p><span>That&#8217;s not what the developer is invoking here in the wallet function. Instead, they&#8217;re using `</span><strong><span>random.bytes(32)</span></strong><span>` which skips the </span><code>pyb_rng_get</code><span> callpath entirely and instead calls `</span><code>rng_get</code><span>`, which due to the `</span><code>MICROPY_HW_ENABLE_RNG</code><span>` being set to zero used the micropython stm32 rng.c definition </span><a href="https://github.com/micropython/micropython/blob/f777bc7e7b14d2d2c9ea6785f1d041006a406c8d/ports/stm32/rng.c#L113"><span>at L112</span></a><span>, which called the insecure Yasmarang, non hardware wallet entropy.<br></span><code><br>uint32_t rng_get(void) {</code></p><p><code>    return pyb_rng_yasmarang();</code></p><p><code>}</code></p><p><span>Simply put: the firmware change overwrites functions that aren&#8217;t used when creating a new wallet while, as a side effect of including the python method overrides, turns off the hardware RNG usage in every case, instead using a very weak random number generator.</span></p><p><span>The final bit of evidence is the commit message itself. It was simply the message &#8220;runs.&#8221;</span></p><p><span>Developers, if you are ever in this scenario, please stop. Whatever you&#8217;re getting paid is not worth the devastation you might potentially cause for others. </span></p><p><em><span>Do not</span></em><span> ship code you do not understand.</span></p><h2><span>A curse on micropython</span></h2><p><span>At the core this appears to be a consequence of too many layers of complexity. There&#8217;s the micropython library, the bindings between the C code and the Python application, and the new functions that COLDCARD is adding. Was the developer that made this patch actually a python developer who was forced to write and handle C?</span></p><p><span>Micropython creates the illusion embedded developers do not need to understand C, their CPU, or other advanced concepts to do embedded programming.</span></p><p><span>That is a lie.</span></p><p><span>And this catastrophe is the result of believing that lie.</span></p><p><span>You must understand the code you are shipping. Full stop. There are no excuses. Layers of misdirection make it harder to understand.</span></p><p>If you make changes, make sure that you verify that they are doing what you intend them to do.</p><p><span>The commit messages here tell the real story. Treating </span><em><span>the most critical part of your code</span></em><span> with the lack of diligence and understanding shown here is inexcusable.</span></p><p><span>You, as a developer working on Bitcoin, need to take your time to understand your changes, document them clearly, and verify they do what you think.</span></p><p><span>When people&#8217;s lives are ruined, they won&#8217;t and shouldn&#8217;t give you sympathy. You need to appreciate the funds you are putting at risk. Your task as a bitcoin developer is of the highest importance. I have made mistakes myself in the past, but there are no excuses for a failure to understand what you are shipping when the code is this critical.</span></p><p><span>I hope that we, as an industry, can learn from this and lean on each other to ship secure code, as a community of developers.</span></p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading bitcoin++'s Insider Edition!  Click below to share this post with your GC</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p></p>]]></content:encoded></item><item><title><![CDATA[How To Make Smaller Post-Quantum Signatures]]></title><description><![CDATA[A deep dive into SHRINCS]]></description><link>https://insider.btcpp.dev/p/how-to-make-smaller-post-quantum</link><guid isPermaLink="false">https://insider.btcpp.dev/p/how-to-make-smaller-post-quantum</guid><dc:creator><![CDATA[Tuma (I WILL NEVER DM YOU)]]></dc:creator><pubDate>Tue, 19 May 2026 14:00:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CQ-5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CQ-5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CQ-5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!CQ-5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!CQ-5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!CQ-5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CQ-5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2115170,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/197656976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CQ-5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!CQ-5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!CQ-5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!CQ-5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8307eccf-7ffd-4ffc-85b4-c5234c8ed61f_1376x768.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>On March 3rd, Blockstream Research <a href="https://blog.blockstream.com/blockstream-research-demonstrates-quantum-resistant-transaction-signing-on-liquid-using-simplicity-smart-contracts/">demonstrated</a> the use of post-quantum (PQ) signatures on the Liquid Network, the Blockstream powered federated sidechain. Researchers <a href="https://github.com/mjthatch">Oleksandr Kurbatov</a>, <a href="https://github.com/CuriousVi17">Viktor Mashtaliar</a>, <a href="https://github.com/DmitriiKJ">Dmytrii Kurbatov</a>, <a href="https://github.com/error0024">Mikhail Kudinov</a>, and <a href="https://github.com/stringhandler">stringhandler</a> were able to sign a real Liquid mainnet transaction leveraging Simplicity, Blockstream&#8217;s smart contract language, and its capacity to express custom, complex spending conditions to demonstrate what one potential quantum safe signature scheme might look like.</p><p>The scheme used for this test transaction was another produce of Blockstream Research: a hash-based algorithm called <a href="https://delvingbitcoin.org/t/shrincs-324-byte-stateful-post-quantum-signatures-with-static-backups/2158">SHRINCS</a>.</p><p>First presented by Director of Research <a href="https://x.com/n1ckler">Jonas Nick</a> and cryptography researcher <a href="https://x.com/kudinov_mikhail">Mikhail Kudinov</a> in December 2025, SHRINCS combines both stateful and stateless hash schemes, attempting to leverage the benefits of stateless signing while reducing the onchain footprint.</p><p>Before diving into the technical details, let&#8217;s take a moment to define the difference between stateful and stateless cryptographic signatures, highlighting the corresponding trade-offs.</p><h3>Stateful and Stateless</h3><p>Stateful hash-based signature schemes, such as XMSS, rely on so-called One-Time Signatures (OTS), where each key-pair must be used exactly once. Reusing a key means breaking the security fundamentals of the cryptographic scheme, allowing attackers to forge signatures and potentially steal funds. Thus, it is crucial to keep track of which keys have already been used (a.k.a. the state) to avoid compromising the funds. This means updating the state after each signature, so that we keep track of which keys have already been used. Holding onto this state introduces a layer of complexity in keys management, making static backups, or ones that aren&#8217;t updated after every use, de facto dangerous. Currently, you can find all of your funds from 12 seed words, and can sign for any key under those words without worrying about saving any additional information. A stateful scheme would mean you wouldn&#8217;t be able to do this without possibly leaking information and losing funds.</p><p>Despite their need to remember every signature, stateful schemes produce smaller size signatures, and require minimal computational effort for verification. The smaller size makes them attractive, particularly when compared to <em>stateless signature schemes.</em></p><p>On the other hand, stateless signature schemes do not need to keep track of which keys have been used, making key management as simple as remembering a static backup, similar to how 12-words work today. The same key-pair can be used multiple times without compromising the safety assumptions behind it. To achieve this, stateless schemes make use of massive, multi-layered trees, which create a pool of possible signatures so large that makes the possibility of using the same key twice statistically irrelevant. As you may have already guessed, this comes at the price of way larger signatures than stateful schemes and a higher computational cost for verification.</p><h3>SHRINCS: An Hybrid Approach</h3><p>SHRINCS combines stateful and stateless signature schemes, attempting to take advantage of the strengths of each while mitigating their specific limitations. Specifically, SHRINCS leverages the efficiency in size and verification of a stateful scheme, while allowing users to easily recover their keys and safeguard their funds with a stateless counterpart in case the state is lost.</p><p>To achieve this, SHRINCS is built using <em>both</em> a stateless scheme (SPHINCS+) and a stateful scheme (Unbalanced XMSS).</p><p>During normal operation, SHRINCS uses the stateful unbalanced XMSS tree, producing a 324 bytes signature, a tiny signature compared to most other PQ signature proposals. The state is updated every time a message is signed and is securely stored, to be sure not to reuse the same key twice.</p><p>What happens if we need to restore our keys? As we said, it is not possible to recover a key from a stateful scheme with a static backup, since it would result in compromised security and possible loss of funds. If the state of the keys is ever lost, SHRINCS can fallback to the SPHINCS+ stateless signature scheme instead. Signature size will explode, reaching up to 8KB, but the funds aren&#8217;t at risk of being lost or stolen.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j3vM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j3vM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png 424w, https://substackcdn.com/image/fetch/$s_!j3vM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png 848w, https://substackcdn.com/image/fetch/$s_!j3vM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png 1272w, https://substackcdn.com/image/fetch/$s_!j3vM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j3vM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png" width="417" height="373" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:373,&quot;width&quot;:417,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28819,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/197656976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!j3vM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png 424w, https://substackcdn.com/image/fetch/$s_!j3vM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png 848w, https://substackcdn.com/image/fetch/$s_!j3vM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png 1272w, https://substackcdn.com/image/fetch/$s_!j3vM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17033c0a-055f-4f7f-8256-0a2a87d9b4fa_417x373.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://delvingbitcoin.org/t/shrincs-324-byte-stateful-post-quantum-signatures-with-static-backups/2158?ref=blog.blockstream.com">Source</a></figcaption></figure></div><h3>Unbalanced XMSS of WOTS</h3><p>SHRINCS uses a stateful scheme based on an unbalanced XMSS tree of OTSs. This is basically a Merkle tree where each leaves represent an OTS.</p><p>To sign, the algorithm chooses a new OTS based on the current state, signs the message, and updates the state to signal that the chosen key should never be used again.</p><p>To verify a signature, we have to demonstrate that the OTS we are using belongs to the tree. Thus, the whole authentication path (a.k.a. the Merkle path) need to be provided together with the signature, which requires storing every hash of each sibling node up to the root.</p><p>To speed things up, SHRINCS uses an unbalanced tree, which results in a smaller authentication path and, as a consequence, smaller signatures. Moreover, the tree being unbalanced helps simplifying state tracking, since it basically matches the height of the Merkle tree.</p><p>The following image helps clarifying this concept. For the first signature, <code>WOTS_1</code> will be used. The authentication path will be composed only by <code>WOTS_1</code> sibling hash, while <code>state = 1</code> . After use, the state will be updated to <code>state = 2</code> , signaling the algorithm that the next signature would have to use <code>WOTS_2</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oJXK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oJXK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png 424w, https://substackcdn.com/image/fetch/$s_!oJXK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png 848w, https://substackcdn.com/image/fetch/$s_!oJXK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png 1272w, https://substackcdn.com/image/fetch/$s_!oJXK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oJXK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png" width="409" height="616" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:616,&quot;width&quot;:409,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:43414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/197656976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oJXK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png 424w, https://substackcdn.com/image/fetch/$s_!oJXK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png 848w, https://substackcdn.com/image/fetch/$s_!oJXK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png 1272w, https://substackcdn.com/image/fetch/$s_!oJXK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09e77c46-4e01-43c2-b83d-f480e23e7ec0_409x616.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://delvingbitcoin.org/t/shrincs-324-byte-stateful-post-quantum-signatures-with-static-backups/2158?ref=blog.blockstream.com">Source</a></figcaption></figure></div><p>To dive deeper in the chosen scheme, let&#8217;s analyze each component:</p><ul><li><p><strong>WOTS+C</strong>: WOTS is considered the state of the art and the basis for more complex schemes. It is an hash-based signature function and, as the name suggests, a given key pair cannot be used twice. In particular, SHRINCS leverages an extension of WOTS+, called WOTS+C (which stands for &#8220;Compact&#8221;), which presents reduced signature size.</p></li><li><p><strong>eXtended Merkle Signature Scheme (XMSS) Tree</strong>: It is a hash-based signature scheme that combines OTS with a Merkle tree. Each OTS key represents a leaf in the binary tree, which has a predefined height <code>h</code> . The internal nodes of the tree represent the hashes of its children, while the root acts as the global public key. To verify an OTS signature, the authentication path (i.e. the Merkle proof, the sequence of sibling nodes from the chosen leaf up to the root) must be computed.</p></li><li><p><strong>Unbalanced Tree</strong>: Instead of having all the OTS at the same depth <code>h</code> as in a balanced tree, an unbalanced one allows to minimize the authentication path for the early signatures. In fact, the first OTS will have <code>heigth = 1</code> , the second one <code>heigth = 2</code> , and so on, strongly reducing the Merkle proof.</p></li></ul><p>Putting this all together, we obtain the stateful scheme for SHRINCS.</p><h3>SPHINCS+</h3><p>The chosen scheme for stateless signing is SPHINCS+, or, as the author suggests, a variant of it.</p><p>SPHINCS+ is a complex signature scheme, built using several layers of post-quantum signature utilities, such as WOTSs, Forests Of Random Subsets (FORS), and XMSSs. When combined, SPHINCS+ produces a single quantum safe key-pair which can be used to sign many messages safely. Unlike XMSS, the algorithm doesn&#8217;t need to remember anything about prior signatures made with the key-pair for any subsequent signatures. One SPHINCS+ structure produces a single pubkey that can safely sign many messages without revealing the secret key.</p><p>This can be achieved because the final structure is huge, and the possibility to choose the same key twice is statistically irrelevant. Of course, this results in heavy signatures compared to those produced by stateful schemes, making them less practical for use in a system with limited space (like blocks).</p><p>If you want to know more about this PQ signing scheme, refer to this <a href="https://insider.btcpp.dev/p/sphincs">amazing article</a> by Nifty.</p><h3>Putting It All Together</h3><p>To implement SHRINCS, there are four functions that are required: <code>KeyGen</code>, which sets up the initial SHRINCs structure with an Unbalanced XMSS and SPHINCS+ sub-pyramids and returns the top-level public key; <code>Restore</code>, which, given the seed, returns the same public key as <code>KeyGen</code>, and marks the state as <code>LOST</code>; <code>Sign</code>, which returns a valid signature for a message using one of the two sub-schemes (Unbalanced XMSS or SPHINCS+). If the state has been marked as <code>LOST</code> via a call to <code>Restore</code>, it uses SPHINCS+, otherwise, it signs using the Unbalanced XMSS tree. And finally, <code>Verify</code>, which takes a pubkey, a message, and a signature and returns <code>true</code> if the signature verifies, or <code>false</code> if not.</p><p>Most signature schemes include a <code>KeyGen</code>, <code>Sign</code>, and <code>Verify</code> methods; <code>Restore</code> is uncommon, as it marks which of the two internal schemes to use.</p><p>As outlined by Nick in the <a href="https://delvingbitcoin.org/t/shrincs-324-byte-stateful-post-quantum-signatures-with-static-backups/2158">Delving post</a>, here&#8217;s a more in-depth explanation of how each of the four functions work:</p><ul><li><p><code>KeyGen()</code> : The algorithm creates a master seed and derives two secret keys, one for the stateful scheme, <code>sk_1</code>, and one for the stateless, <code>sk_2</code>. From these, the function derives the two public keys, <code>pk_1</code> and <code>pk_2</code>. The SHRINCS public key is the hash of <code>pk_1</code> and <code>pk_2</code> , such that <code>pk = H(pk_1, pk_2)</code> . In the end, the function return the master <code>seed</code> , the master public key <code>pk</code> , and the initial <code>state</code> of the stateful scheme.</p></li><li><p><code>Restore(seed)</code> : This function is responsible for recovering the keys and for setting the <code>state</code> to <code>LOST</code> to signal that the stateful scheme cannot be used anymore.</p></li><li><p><code>Sign(seed, state, m)</code> : The signing algorithm first checks whether <code>state</code> is <code>LOST</code> or not:</p><ul><li><p><code>if (state &#8800; LOST)</code> : The stateful scheme is used, thus the algorithm derives <code>sk_1</code> and <code>pk_2</code> and signs message <code>m</code> using the current state and <code>sk_1</code>. Then it returns the updated state, <code>state&#8217;</code> along with the signature concatenated with <code>pk_2</code> .</p></li><li><p><code>else if (state == LOST)</code> : The stateless scheme is used, thus the algorithm derives <code>sk_2</code> and <code>pk_1</code>, and signs message m using <code>sk_2</code> . Then it returns the signature concatenated with <code>pk_1</code> .</p></li></ul></li><li><p><code>Verify(pk, m, sig)</code> : The verification algorithm parses <code>sig</code> to obtain the actual signature and the public key concatenated with it. It then verifies the signature according to the signature scheme used, and checks that the two public keys hash to the correct SHRINCS <code>pk</code> .</p></li></ul><h3>Algorithmic Agility</h3><p>A question we could try to give an answer to now is: Is this algorithmic agility?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mvKU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mvKU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png 424w, https://substackcdn.com/image/fetch/$s_!mvKU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png 848w, https://substackcdn.com/image/fetch/$s_!mvKU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png 1272w, https://substackcdn.com/image/fetch/$s_!mvKU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mvKU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png" width="557" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:557,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:350010,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/197656976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mvKU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png 424w, https://substackcdn.com/image/fetch/$s_!mvKU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png 848w, https://substackcdn.com/image/fetch/$s_!mvKU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png 1272w, https://substackcdn.com/image/fetch/$s_!mvKU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02f740fa-2739-4291-8b27-5a16360bb78d_557x500.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>TL:DR: The short answer is no. Longer answer follows.</p><p>The Internet Engineering Task Force (IETF) gives a precise definition of this in <a href="https://datatracker.ietf.org/doc/html/rfc7696">RFC7696</a>, which states that &#8220;Algorithm agility is achieved when a protocol can easily migrate from one algorithm suite to another more desirable one, over time&#8221; due to the fact that &#8220;advances in computing power or advances in cryptoanalytic techniques will eventually make any algorithm obsolete&#8221;.</p><p>Thus, we can see algorithmic agility as the ability for a cryptography-based system to be ready for anything (&#8221;in omnia paratus!&#8221;) that could happen to the primitives in use.</p><p>On the other hand, the goal of the hybrid approach proposed by SHRINCS is not to provide an alternative cryptographic scheme in case the main one gets broken by advancements in research and technology. Instead, it aims to supply users with a fast and efficient signing algorithm, while at the same time providing a safety net that will prevent them from losing their funds due to its already known limitations.</p><h3>Why Does This Matter?</h3><p>One of the greatest drawback of PQ signatures scheme is their size. This is not a problem <em>per se</em>, but it becomes so in the context of a decentralized protocol with limited storage capabilities. The smallest PQ signature is 10x larger than the simplest key in use today, allowing for around 3 transactions-per-second (tps), against the 7 tps currently achievable through Schnorr.</p><p>SHRINCS is a clever solution, that helps demonstrate the problem space of how to compress known hash-based signature schemes to work for the Bitcoin use case in a PQ world while retaining the current static-backup, 12-word experience that users are accustomed to. The SHRINCS innovation is a great approach for maintaining user experience while balancing the realities of limited blockspace.</p><p>On May 12th, Blockstream Research <a href="https://blog.blockstream.com/op_checkshrincs-a-hash-based-signature-opcode-for-post-quantum-bitcoin/">presented</a> a first proposal for a hash-based signature Opcode for Post-Quantum Bitcoin, called <code>OP_CHECKSHRINCS</code> , leveraging SHRINCS as the chosen signature scheme. Research is continuing to prepare a quantum-secure future for Bitcoin.</p>]]></content:encoded></item><item><title><![CDATA[bitcoin++ exploits edition: hackathon retrospective]]></title><description><![CDATA[The Hackathon]]></description><link>https://insider.btcpp.dev/p/bitcoin-exploits-edition-hackathon</link><guid isPermaLink="false">https://insider.btcpp.dev/p/bitcoin-exploits-edition-hackathon</guid><pubDate>Tue, 24 Mar 2026 14:01:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!whKg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!whKg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!whKg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!whKg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!whKg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!whKg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!whKg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1938631,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/191972961?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!whKg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!whKg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!whKg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!whKg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a44f65c-7caa-4de2-8e6b-e06d754ac35e_1600x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>The Hackathon</h1><p>For those unfamiliar, we run a hackathon at nearly every Bitcoin++ conference. This time around (Exploits Edition) we split things into two tracks: our classic hackathon track where teams build projects (with bonus points for anything security or exploit themed), and a <strong>brand new bug bounty track</strong> where the objective was simple: find real bugs in real, open-source Bitcoin software.</p><p>We were nervous about this one. <em>We had no idea if people would actually find meaningful bugs in 22 hours</em>. By the end of the hackathon, <strong>10 real, meaningful bugs were found in open-source Bitcoin projects</strong>. Ten. In a single day.</p><p>22 hours, ~60 participants, 21 projects submitted, 10 meaningful bugs found.</p><h3>Projects</h3><p>There were <strong>many</strong> impressive projects, but here&#8217;s few standouts:</p><p>MineExploit <a href="https://x.com/jayrmotta/status/2028542289581101413">won first overall</a>. Think Metasploit, but purpose-built for Bitcoin mining tooling. The team didn&#8217;t just demo it either. They ran it against several codebases and turned up three bugs in real StratumV2 repos.</p><p>LocalProbe won second place, a project that demonstrated how Firefox can be used to fingerprint open ports on a machine. <a href="https://twitter.com/0xb10c">0xB10C</a> showed that simply navigating to a malicious website could allow an attacker to spam a Bitcoin node by firing HTTP requests at its open ports. <a href="https://x.com/0xB10C/status/2028442307494637962">On stage</a>, he had the audience DDoS his node, evicting other peers. Nasty stuff, and exactly the kind of research this hackathon was designed to surface.</p><p>Another team used fuzzing techniques to go after Alpen Labs&#8217; codebase and <strong>found a critical vulnerability that a professional security auditor had missed just three weeks earlier</strong>. Read that again. A team at a 22-hour hackathon, fuzzing on the fly, caught something that a paid audit didn&#8217;t. That alone should make you think about how much untapped value there is in getting more eyes on Bitcoin infrastructure.</p><p>Check out all the projects <a href="https://loot.fund/hackathons/bitcoin-exploits-edition/applications">here</a>.</p><h3>Conclusion</h3><p>Here&#8217;s the thing we keep coming back to: this hackathon produced tangible, lasting improvements to Bitcoin&#8217;s security infrastructure in under 24 hours. Critical bugs found, new offensive security tooling built, and novel attack vectors documented. If you&#8217;re an organization that funds Bitcoin development through grants, we&#8217;d encourage you to look at what a single hackathon can produce and compare that to what a typical grant cycle yields. The return on investment here is hard to ignore.</p><p>We&#8217;re already thinking about how to level up the bug bounty format for next time. Giving participants more time to study target projects ahead of the event, working more closely with specific projects to provide better scoping, and generally adding more structure to make the bounty track even more productive. If the first attempt is any indication, this format has serious legs.</p>]]></content:encoded></item><item><title><![CDATA[CLBOSS: Can a Lightning Node Learn Austrian Economics?]]></title><description><![CDATA[We take a look at Ken Sedgwick's automated liquidity manager plugin for core-lightning]]></description><link>https://insider.btcpp.dev/p/clboss</link><guid isPermaLink="false">https://insider.btcpp.dev/p/clboss</guid><dc:creator><![CDATA[Tuma (I WILL NEVER DM YOU)]]></dc:creator><pubDate>Wed, 11 Feb 2026 15:00:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!edIr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!edIr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!edIr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png 424w, https://substackcdn.com/image/fetch/$s_!edIr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png 848w, https://substackcdn.com/image/fetch/$s_!edIr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png 1272w, https://substackcdn.com/image/fetch/$s_!edIr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!edIr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png" width="1456" height="816" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:816,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5966240,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/187498254?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!edIr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png 424w, https://substackcdn.com/image/fetch/$s_!edIr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png 848w, https://substackcdn.com/image/fetch/$s_!edIr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png 1272w, https://substackcdn.com/image/fetch/$s_!edIr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F596b15b8-f058-4e65-8c8e-70fe343237e7_3240x1816.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>One of the greatest challenges of running a Lightning Network node is liquidity management. For those that are not familiar with this concept, liquidity means having sats available to be pushed to, or pulled from, the other peer in a lightning channel. You need enough sats ready to be pushed in order to complete a payment. This is &#8220;liquidity&#8221;, and making sure you have enough sats available when needed is the &#8220;management&#8221; part of it.</p><p>A node operator has to maintain his public channels to allow for payment routing to happen constantly. Rebalancing needs to happen as payments are completed and sats are moved. Rebalancing means adjusting the channel balances so that a lightning node has enough satoshis in the right configuration to forward payments. Most lightning node operators use specific services or have to manually monitor their channel balances to keep them liquid.</p><p>What if there was a project that could allow a user to put the Lightning node on autopilot?</p><h2>Enters CLBOSS</h2><p><a href="https://github.com/ksedgwic/clboss">CLBOSS</a> is an automated liquidity manager for Core-lightning routing nodes. The program uses a set of heuristics that continuously monitor the node&#8217;s channel balances and the state of its peers to adapt to changes in available liquidity as payment are routed through its channels. CLBOSS&#8217;s goal is to make it such that running a Lightning Network node is as simple as installing some software, funding a wallet, and provide internet and power to some hardware. That&#8217;s it.</p><p>CLBOSS is built from many components, called modules. Each module handles a specific responsibility and communicates over a shared event <a href="https://en.wikipedia.org/wiki/Bus_(computing)">bus</a>. A bus is a a communication channel that allows different parts of a program to exchange information and data. Components publish messages to the bus and subscribe to the messages they need for their internal processing, allowing them to remain loosely coupled while coordinating their behavior.</p><p>As of 2025, the project, originally designed by Lightning developer <a href="https://github.com/ZmnSCPxj">ZmnSCPxj</a>, is being maintained by <a href="https://github.com/ksedgwic">Ken Sedgwick</a> and a small group of Lightning enthusiasts.</p><p>While CLBOSS does not allow for complete automatic management (yet), it can already perform some impressive operations on a CLN node:</p><ul><li><p>It can <em>open channels</em> to other nodes when on-chain fees are low and funds are available. A specific set of modules in CLBOSS can propose a candidate node to open a channel to. CLBOSS then assess the health of the proposed node based on its uptime.</p></li><li><p>It can buy <em>inbound liquidity</em> through <a href="http://boltz.exchange">boltz.exchange</a>, swapping off-chain funds with on-chain bitcoins swaps. This feature is triggered when CLBOSS detects that the total amount of inbound liquidity is lower than a desired threshold.</p></li><li><p>It can <em>rebalance</em> open channels by leveraging circular self-payments, using either <em>just-in-time rebalancing</em>, which rebalances liquidity on-demand right before forwarding, or <em>earnings rebalancing</em>, which proactively looks for rebalancing opportunities based on earnings. This means it&#8217;ll initiate a payment to itself along a route, pushing the sats in the nodes inbound and outbound channels into a new configuration.</p></li><li><p>It can <em>adjust forwarding fees</em> to support channel balance and to be competitive on the market. It monitors both the current fee market and its internal state through a set of heuristics, which will be discussed below.</p></li></ul><p>Let&#8217;s take a deeper look at how these fee adjustments get made.</p><h2>Adjusting Fees</h2><p>The last point above is, in my personal opinion, the most interesting. CLBOSS performs a series of actions to maintain the fees to an optimal price, based on both market signals and internal states.</p><p>Basically, CLBOSS works as an automated market actor, adapting the price of its liquidity to changes in competitors fees, relative size of capacity with respect to its peers, channel balance, and past earnings.</p><p>There are four aspects of the pricing algorithm: baseline fees, a size multiplier, a balance multiplier, and something ZmnSCPxj called the &#8220;Price Theory&#8221; multiplier. Let&#8217;s break these down.</p><h3>Baseline Fees</h3><p>The baseline fee rates for a channel are decided by looking at channel fees set by all the other channels of your partner. CLBOSS checks all the incoming directions of every channel of the peer and computes the median of their baseline and proportional fee rates weighted by each inspected channel&#8217;s size.</p><p>Here, CLBOSS is working as an entrepreneur. It checks what the competition is charging for their liquidity and sets a baseline price for its own node. This way it is making sure to enter the market with a price that is deemed attractive by the network, compared to its competitors.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8qhS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8qhS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!8qhS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!8qhS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!8qhS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8qhS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png" width="1456" height="485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:485,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:211792,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/187498254?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8qhS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!8qhS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!8qhS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!8qhS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cd81182-4b14-4435-af1e-2c575e5d631c_1800x600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Changes over time of the baseline and proportional fee rates based on peer&#8217;s channels fee rates.</figcaption></figure></div><h3>Size Multiplier</h3><p>There are three multipliers that are then applied to the baseline fees.</p><p>The first multiplier is based on the relative size of the node&#8217;s total capacity with respect to its peers&#8217;. CLBOSS will apply a lower multiplier when the node is smaller compared to its peers, and a higher one if it is bigger.</p><p>In particular, CLBOSS discriminates according whether the node is larger or smaller than the median. In the former case, the resulting multiplier will be determined by a logarithmic function, in the latter by a square root function.</p><p>The idea is to apply a discount on the fee rate to drive more demand to the node if you&#8217;re smaller than your peers. On the other hand, a bigger node could leverage its higher routing capabilities (i.e. being able to route large payments without issues) to earn more from fees, so we charge a bit more, comparatively.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nfl5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nfl5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!Nfl5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!Nfl5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfl5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nfl5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png" width="1456" height="485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:485,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:65321,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/187498254?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Nfl5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!Nfl5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!Nfl5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfl5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919fd6f8-b4bc-4e1d-83c9-7ac5d43ce4b4_1800x600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Changes over time of the size multiplier.</figcaption></figure></div><h3>Balance Multiplier</h3><p>Another multiplier used to modulate the fee rate is based on the balance of the channel.</p><p>The balance multiplier allows the fees to swiftly react to changes in the channel liquidity, following a simple supply-demand principle. CLBOSS will apply a premium in case the channel has low balance while applying a discount on the fee rate when the balance is almost full.</p><p>CLBOSS is applying the law of diminishing marginal utility. In fact, CLBOSS finds more utility in the last sats left on the channel balance, selling them at a premium, than in the sats belonging to a full channel, which can be discounted to obtain more inbound liquidity.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NSt7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NSt7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!NSt7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!NSt7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!NSt7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NSt7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png" width="1456" height="485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:485,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:173668,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/187498254?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NSt7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!NSt7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!NSt7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!NSt7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd88a894-676d-465b-bc9e-fae0e2ac60a4_1800x600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Changes over time of the balance multiplier.</figcaption></figure></div><h3>Price Theory Multiplier</h3><p>The last pricing strategy used by CLBOSS to determine fees is based on an iterative feedback mechanism which tries to maximize routing profits. The algorithm is based on price theory which presumes that there are no local optima but rather a single global optimum price.</p><p>The algorithm works in the following way:</p><ol><li><p>At the first iteration, the <code>price</code> is set to <code>0</code> ;</p></li><li><p>A small &#8220;deck of cards&#8221; is initialized with <code>price - 2</code>, <code>price - 1</code>, <code>price</code>, <code>price + 1</code>, and <code>price + 2</code> values and shuffled. Shuffling is necessary to prevent locking onto some regular periodic phenomenon on the network:</p></li><li><p>The topmost card is picked and the multiplier is set according to <code>price</code> on the card. It will be equal to <code>0.8^ (-price)</code> in case of negative value and <code>1.2^price</code> in case of positive one. Every forwarding fee earned while the card is active, is recorded;</p></li><li><p>After 2 days, another card is picked and the multiplier is set according to the new <code>price</code> ;</p></li><li><p>When the deck is empty, the card with highest earnings is chosen as the new central <code>price</code> point, a new deck is created and the algorithm starts over.</p></li></ol><p>CLBOSS is actively doing price discovery. Once the deck is empty we set the new central <code>price</code> point on the level that maximized our earnings, which means on the fee rate at which our node performed better in terms of profits. This means that in the successive iteration, we will explore the space around the new <code>price</code> , trying to converge to the global optimum.</p><p>While the effect of this approach tends to be slower with respect to the other strategies, it allows to correct the behavior of the fee rate to maximize for earnings.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5bSQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5bSQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!5bSQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!5bSQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!5bSQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5bSQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png" width="1456" height="485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:485,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:67702,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/187498254?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5bSQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!5bSQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!5bSQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!5bSQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dcb59aa-1115-4fef-b2ef-946274d2c323_1800x600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Changes over time of the price theory multiplier.</figcaption></figure></div><h2>Principles of Economics in Action</h2><p>According to the theory of the Austrian school of economics, prices are nothing more than signals, a mechanism to convey information about what actors are willing to pay for resources or services.</p><p>In this context, CLBOSS works as an automated market actor, adapting the price of liquidity (the fee rate) to signal the rest of the network about changes in the market and in its internal state or willingness to exchange liquidity. In the following image is possible to visualize when each of the different adjustments acts to modulate the advertised fee for the node.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MJ5S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MJ5S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!MJ5S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!MJ5S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!MJ5S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MJ5S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png" width="1456" height="485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:485,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:225441,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/187498254?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MJ5S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png 424w, https://substackcdn.com/image/fetch/$s_!MJ5S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png 848w, https://substackcdn.com/image/fetch/$s_!MJ5S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png 1272w, https://substackcdn.com/image/fetch/$s_!MJ5S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55cd059e-6873-4145-bd4a-3477da598c59_1800x600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Changes over time of the overall baseline and proportional fees adjusted by the multipliers.</figcaption></figure></div><p>CLBOSS does so while minimizing the amount of internal information about the node leaked to the public. In fact, peers will not need to know that the balance of the node dropped, they will just receive the signal given by the change in the fee rate and will react deciding either to find a cheaper path or to accept the higher fee.</p><div><hr></div><p>Interested in learning more about how open protocols are building free markets? Join us in Vienna, Austria this coming May 27+28 for our first ever <a href="https://btcpp.dev/conf/vienna">bitcoin++ economics edition.</a></p>]]></content:encoded></item><item><title><![CDATA[The BitVM Bridge]]></title><description><![CDATA[stutxo explains rollups like I'm a Bitcoin maxi]]></description><link>https://insider.btcpp.dev/p/the-bitvm-bridge</link><guid isPermaLink="false">https://insider.btcpp.dev/p/the-bitvm-bridge</guid><dc:creator><![CDATA[stu]]></dc:creator><pubDate>Sat, 31 Jan 2026 14:58:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!vQpA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the before times, circa 2014, the original Blockstream <a href="https://blockstream.com/sidechains.pdf">vision</a> (BSV?) was to scale Bitcoin via multiple sidechains, connected by a two-way peg that let Bitcoin move back and forth between chains. In practice, building a bridge like this, while still letting users exit sidechains without trusting a third party turned out to be much harder than expected.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rG1B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rG1B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png 424w, https://substackcdn.com/image/fetch/$s_!rG1B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png 848w, https://substackcdn.com/image/fetch/$s_!rG1B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png 1272w, https://substackcdn.com/image/fetch/$s_!rG1B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rG1B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png" width="860" height="539" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:539,&quot;width&quot;:860,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rG1B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png 424w, https://substackcdn.com/image/fetch/$s_!rG1B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png 848w, https://substackcdn.com/image/fetch/$s_!rG1B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png 1272w, https://substackcdn.com/image/fetch/$s_!rG1B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13826988-50f2-49b5-bffb-2ef5682a8dc0_860x539.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Another narrative was that altcoins like Ethereum and Zcash were merely science experiments, testing ideas that would eventually make their way back to Bitcoin. That prophecy largely failed to materialize.</p><p>Until 2023, the year that the only other use case for blockchains &#8211; gambling on JPEGs and tokens &#8211; returned to Bitcoin in the form of <a href="https://rodarmor.com/blog/how-ordinals-came-to-be/">inscriptions</a> and <a href="https://docs.ordinals.com/runes.html">runes</a>. These protocols have made up the majority of Bitcoin transactions over the past few years, while more traditional monetary uses have yet to consistently outbid them for blockspace.</p><p>This matters, because blockspace demand is Bitcoin&#8217;s long-term security model. ETH maxis have long <a href="https://x.com/drakefjustin/status/1928025981270519924?s=20">worried about Bitcoin&#8217;s security budget</a>, and what will happen to miners incentives when the block subsidy ends in 114 years. Despite them having no idea what will happen with their chain in the next 3 months, it&#8217;s a criticism that merits our careful consideration.</p><p>Bitcoin&#8217;s blocks are full, but miners fees are low. By 2036 (3 halvings away) the block subsidy alone will be a mere 0.390625 BTC (at today&#8217;s prices, $1.7B USD/year seems a touch too light to secure the global economy). It is an open question if the subsidy will be enough to secure Bitcoin, especially if it continues to be seen as just &#8220;digital gold&#8221;, on-chain activity could be too low to pay our hard-working miners.</p><p>Fortunately, there is reason to be optimistic that miner incentives will not be an issue: a new demand for blockspace is coming in the form of rollups, the true inheritor of Blockstream&#8217;s promise of a functional 2-way peg..</p><h3><strong>Rollups</strong></h3><p>Since 2020, the Ethereum project has been working on a <a href="https://ethereum-magicians.org/t/a-rollup-centric-ethereum-roadmap/4698">roadmap</a> that focuses on rollups being the primary scaling solution for their chain. Meanwhile, Bitcoin devs have been focused on channel-based scaling (lightning network), sidechains (Liquid, Rootstock), and centralized custodial solutions (eCash, Bitcoin banks). More recently, there has been a resurgence in co-signing protocols (ark/statechains) which allow for more concentrated liquidity than channels, with fewer custodial tradeoffs.</p><p>Most Bitcoiners, myself included, lack a clear understanding of rollups, largely because <a href="http://bitcoinrollups.org">rollups</a> were long considered impossible on Bitcoin. The invention of <a href="https://bitvm.org/">BitVM</a> changes that, and it&#8217;s time we start paying attention.</p><p>Rollups combined with BitVM are one proposal for how to scale Bitcoin, with their own tradeoffs. Let&#8217;s look at how they work, and what those tradeoffs are. The standards for building on Bitcoin are high. Do these rollup designs live up to those standards?</p><h3><strong>What makes something an L2?</strong></h3><p>It&#8217;s very simple:</p><p>Every user can get their money back on to Layer 1 even if the L2 is malicious, either by playing dead, attempting to steal, or any other misbehavior.</p><h4><strong>What projects currently meet this requirement?</strong></h4><ul><li><p><a href="https://lightning.network/">Lightning</a></p></li><li><p><a href="https://ark-protocol.org/">Ark</a></p></li><li><p><a href="https://bitcoinops.org/en/topics/statechains/">Statechains</a></p></li></ul><h4><strong>Does a BitVM rollup meet these two requirements?</strong></h4><p>Not exactly no&#8230; But don&#8217;t despair! It&#8217;s not far off! In a BitVM rollup you require at least 1 of the bridge operators to be acting rationally and you can withdraw. (If the sequencer lets you, more on that later.)</p><h3><strong>Rollups, on Bitcoin</strong></h3><p>A rollup is a blockchain that executes transactions off-chain and submits proofs of state transitions to the underlying blockchain for validation. The rollup commits state diffs (or summaries of the changes made in the last set of off-chain transactions) to the L1. Posting the state diffs to the L1 allows anyone to reconstruct the rollup&#8217;s state by applying each batch&#8217;s state diff in order from genesis.</p><p>Let&#8217;s go through the components needed to create a rollup, and then move on to how BitVM, the Turing-complete scripting virtual machine fits in. There are different approaches and designs (Citrea, Alpen), but here we give a general overview.</p><p>A rollup has several components, the sequencer, the prover, full nodes and a DA or Data Availability layer,. In our case, the Bitcoin blockchain is the Data Availability layer.</p><h4><strong>The Sequencer</strong></h4><p>At the heart of every rollup sits the sequencer. The sequencer receives rollup transactions and assembles them into blocks, deciding ordering and inclusion.</p><p>You can think of it like a single miner with a private mempool.</p><p>The sequencer sets the speed of block generation on the rollup. Blocks are created as quickly as the rollup design decides, and this is configurable. In practice, it&#8217;s usually a few seconds (Citrea has 2-second block times).</p><p>Bitcoin is slow to make new blocks, and blockspace is scarce, so the sequencer doesn&#8217;t post every block on bitcoin L1, it &#8220;rolls up&#8221; blocks and submits them together. This batch of blocks also includes the state diff and a small piece of data called a proof, which proves the block followed the rules of the rollup.</p><p>Some rollups post data on-chain before the proof is ready, to pre-commit to the outcome (<a href="https://mempool.space/tx/47865de7e8de80adbee4f69991b2d10302085c1767604697661cc70f6cb7ecc5">Citrea commitment TX</a>). Others post a checkpoint that includes both the commitment to the rollup blocks and the proof that those blocks are valid (<a href="https://mempool.space/tx/26516042296b5ab634beda701db6c0a939dca63d426ffaf0e02a0c340501cba1">Citrea Proof TX</a>). This gives the rollup an L1 anchor for a set of rollup blocks.</p><p>The rollup batch size is configurable. It can be triggered after a certain amount of blocks, or earlier if the overall state diff reaches a certain size.</p><p>In these designs, rollup blocks are signed by the sequencer and full nodes/provers validate those signatures. Only state diffs/proofs go on Bitcoin; rollup full nodes still fetch rollup blocks from the sequencer or other rollup node peers. However it is entirely possible to sync a rollup full node using the state diffs posted on bitcoin. <br><br>The proof is mainly used for light clients and bridge operators to verify that a rollup transaction was included in a rollup block and finalized on to bitcoin.</p><h4><strong>The Prover</strong></h4><p>In the Bitcoin network, once a block is mined and sent to full nodes, the nodes verify that the block follows all the Bitcoin rules. Nodes execute every script in every transaction in the block, checking signatures and amounts along the way. This is relatively fast and easy to do.</p><p>On the rollup chain, full nodes do the same job. However, to reach a globally agreed upon state that light clients and bridge operators can use to quickly verify transactions, a prover needs to post the proof of the block&#8217;s execution on&#8209;chain. Anyone can create the proof, but it requires specialized software and a lot of computation, which can take time. So most systems use a dedicated service (&#8221;the prover&#8221;) to generate proofs.</p><p>To create the proof, the prover takes a rollup commitment from the sequencer, and the blocks in the range of commitments, re&#8209;executing them, and producing a proof that can be posted to the Bitcoin blockchain, typically via an inscription&#8209;style envelope. Once the proof is posted on L1 and sufficiently confirmed by 6 or more blocks, the rollup nodes accept this as a finalized state transition. A Bitcoin transaction reaches 6 confirmations to be considered final; a Rollup proof gets posted to the L1 for the transactions in that batch to be considered final.</p><p>The proof used in Citrea and Alpen is a ZK proof, but we won&#8217;t get into that here. You can just think of the proof as a way for bridges/light clients to verify the rollup state without replaying everything on a rollup node. Full nodes still re&#8209;execute blocks themselves.</p><h4><strong>The Fullnode</strong></h4><p>So it turns out that mastering Ethereum was actually a Bitcoin book after all. Alpen and Citrea both use the Ethereum Virtual Machine (EVM) as the execution environment for their rollup.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jiN7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jiN7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png 424w, https://substackcdn.com/image/fetch/$s_!jiN7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png 848w, https://substackcdn.com/image/fetch/$s_!jiN7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png 1272w, https://substackcdn.com/image/fetch/$s_!jiN7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jiN7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png" width="888" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:888,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jiN7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png 424w, https://substackcdn.com/image/fetch/$s_!jiN7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png 848w, https://substackcdn.com/image/fetch/$s_!jiN7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png 1272w, https://substackcdn.com/image/fetch/$s_!jiN7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d1f2bc1-c485-4bf7-acf2-5ff6e2491fb4_888x499.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Fees on the rollup are paid with bitcoin that&#8217;s been bridged to the rollup chain. It acts similar to <a href="https://www.wbtc.network/">WBTC</a> (wrapped bitcoin). As the rollup is using the ethereum virtual machine, fees are paid in &#8220;gas&#8221;, but instead of using ethereum, you use the bridged wrapped bitcoin instead.<br><br>Users and wallets send transactions to the sequencer, typically via a full node&#8217;s RPC interface. Full nodes poll the sequencer for new blocks, verify them as an Ethereum node would, and update their local state. Block times are determined by the sequencer.</p><p>Since all state diffs are committed to Bitcoin alongside proofs, a full node can also sync entirely from the Bitcoin L1: they go through the L1 blockdata to find all of the rollup&#8217;s published state diffs, and apply each one, in order, from the rollup&#8217;s genesis. The end result should match the current rollup state. No reliance on the sequencer required.</p><p>Until a proof is posted and confirmed on L1, blocks are only soft&#8209;confirmed by the sequencer. They&#8217;re accepted locally, but until the proof has 6 blocks or so, the state is not considered finalized.</p><p>A lot of applications that are running on the rollup will be fine with using the sequencer&#8217;s block data directly. For example if your contract was a game, then you can probably trust the sequencer alone, which makes the applications very quick. However, if you were making a large trade on a decentralized exchange contract, then you may want to wait for the block to be included in a proof on the Bitcoin blockchain.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TLK_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TLK_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png 424w, https://substackcdn.com/image/fetch/$s_!TLK_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png 848w, https://substackcdn.com/image/fetch/$s_!TLK_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png 1272w, https://substackcdn.com/image/fetch/$s_!TLK_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TLK_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png" width="960" height="868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:868,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TLK_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png 424w, https://substackcdn.com/image/fetch/$s_!TLK_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png 848w, https://substackcdn.com/image/fetch/$s_!TLK_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png 1272w, https://substackcdn.com/image/fetch/$s_!TLK_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1329595b-0d0d-4e44-87af-7dd918ac2197_960x868.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4><strong>Risk Factors</strong></h4><p>The prevalence of centralized sequencers is among the biggest safety risks for rollup users. Billions of dollars trust similar centralized setups in the ethereum world; and I&#8217;m happy about that for them. It would shock the conscience for Bitcoiners to agree to a similar threat model. So I don&#8217;t think they will. </p><p>Maybe I am biased. After all, I&#8217;m working on the <a href="https://x.com/char_btc">char.network</a>, which is essentially a decentralized sequencer for Bitcoin based rollups. And, most rollups state clearly that moving to a decentralized sequencer is a part of their roadmap.</p><p>Some projects, such as<a href="https://www.starknet.io/blog/starknet-grinta-the-architecture-of-a-more-decentralized-future/"> Starknet</a>, are already using a decentralized sequencer architecture. For Starknet this means 3 nodes run by 3 operators whose names all seem to begin with Stark and end with Net.</p><p>This also affects bridge operation (which we will get into next). The sequencer can always refuse to include the transaction that kicks off your bridge withdrawal. And if that transaction never makes it into a rollup block, there&#8217;s no path to getting your bitcoin back to the mainchain.</p><p>Ethereum rollups try to mitigate this with &#8220;<a href="https://docs.optimism.io/op-stack/transactions/forced-transaction">forced transactions</a>&#8220; (a way to bypass the sequencer and still get included). Forced transactions are still an open research problem that Bitcoin rollup projects are working on.</p><p>Another point to make is that whoever is privileged enough to run the centralized sequencer, makes a lot of money in transaction fees and <a href="https://ethereum.org/developers/docs/mev/">MEV</a>. You could say they are incentivised to play honestly, but they can still easily censor transactions and bridged bitcoin withdrawal requests.</p><p>One last risk users bear under this rollup architecture is the expense of committing to the state diff and proof data to the L1. Who knows what the blockspace fee market will look like in a few years? It could be incredibly expensive to commit these proofs to the Bitcoin chain. Rollups paying high fees is good problem for Bitcoin itself, but if the rollups are not getting used much, then paying high fees to commit data would not make economic sense, and users would be stuck with a pricey bill to remove their funds.</p><p>Sequencers, provers, rollup full nodes, and the EVM explain how the rollup is architected, but how does the &#8220;two-way&#8221; peg to the L1 work? How do we move bitcoin back and forth between the two systems?</p><h3><strong>The Bridge</strong></h3><p>Most Bitcoin bridges that exist today (Liquid, WBTC, etc.) rely on a federated multi-sig, where you need a threshold of signers to allow you to withdraw your bitcoin. We call this a 1-way peg, since you can send your bitcoin into the contract, but need help from enough of the multi-sig signers to get it back out again.</p><p>A BitVM-style bridge is also a 1-way peg, but the number of participants needed is different: you only need one active operator who plays by the rules to withdraw your bitcoin. There could be 100 operators in theory, so you can see how this gets interesting &#8211; as long as one of these operators is acting rationally, and is still online, you are able to get your bitcoin back to the mainchain. Maybe we can call it a 1.5-way peg.</p><p>You also rely on a challenger who can step in and prove fraud if an operator tries to cheat.</p><p>In a BitVM bridge, there are operators, signers, and challengers*.</p><ul><li><p>Signers exist to &#8220;lock in&#8221; the bridge rules during setup. Signers create an <em>emulated covenant</em> by pre-signing the only valid spend paths and then delete their keys. As long as at least one signer is honest and deletes their key, nobody can later create an alternate withdrawal path and send the money anywhere they like.</p></li><li><p>Operators do the day-to-day work during rollup operation: they watch the rollup, front withdrawals, and later claim reimbursement from the bridge.</p></li><li><p>Challengers keep operators honest by watching proofs posted to the L1 and challenging bad claims.</p></li></ul><p>*Citrea uses the concept of <a href="https://docs.citrea.xyz/glossary/glossary#challenge-and-dispute-transactions">watchtowers</a>, which is a permissioned set of challengers. We won&#8217;t get into that here though.</p><p>For simplicity, I&#8217;m going to assume the bridge signers and operators are the same group of entities, even though conceptually they&#8217;re different roles. The signer role could be removed entirely if Bitcoin had some kind of <a href="https://utxos.org/">covenant opcode (ctv btw).</a> Citrea&#8217;s bridge does follow a slightly different security model, which allows the signer to be <a href="https://docs.citrea.xyz/advanced/clementine-signers#security-model">upgraded</a>.</p><p>Operators create and manage BitVM instances. They run a SNARK prover off-chain, and use pre-signed Bitcoin transactions (plus a challenge window) to enforce a fraud-proof game around the prover&#8217;s output.</p><h4><strong>Depositing, or Pegging In</strong></h4><p>For each new deposit, a new BitVM instance is created. A deposit is expected to be around 0.5 to 100 BTC. The average user would most likely enter/exit via atomic swaps / liquidity providers (similar to how Liquid/Lightning get used today), and power users would deposit and withdraw large amounts of bitcoin from the bridge.</p><p>First, a user deposits their bitcoin into a staging address. This address allows the bridge operators to sweep the bitcoin into the bridge. If they do not initiate a bridge deposit, the user can withdraw their funds after a timelock.</p><p>The bridge operators deposit bitcoin into the bridge by creating an L1 transaction that locks their deposit funds into a BitVM bridge contract, or UTXO, on the L1 Bitcoin chain. The key property of this UTXO is that it&#8217;s pre-locked to a specific transaction flow created during setup, assuming at least one signer performed his role honestly, as mentioned previously. In other words, unless 100% of the signers cheated, the BTC can only move along the pre-defined &#8220;bridge rules&#8221;, which allows the transaction to be challenged if the operators are suspected of breaking the rules.</p><p>Once the deposit transaction is confirmed on Bitcoin, users or operators can call a rollup smart contract that emulates a Bitcoin light client, verifies the deposit is included in a Bitcoin block, and mints wrapped BTC to the user&#8217;s rollup address.</p><h4><strong>Withdrawing, or Pegging Out</strong></h4><p>Withdrawing is simple as long as one operator is active, and there&#8217;s at least one party willing to challenge fraud if needed.</p><p>Here&#8217;s the steps a user would follow to withdraw their bitcoin from the rollup back to the Bitcoin L1.</p><ol><li><p><strong>Burn on rollup</strong> - The user burns their wrapped BTC on the rollup (making it unspendable on the rollup).</p></li><li><p><strong>Operator fronts the Bitcoin withdrawal - </strong>The user creates an incomplete Bitcoin withdrawal transaction using an ANYONECANPAY-style sighash so that an operator can attach their own BTC input. Operators compete to front the BTC and publish the completed withdrawal transaction (they do this to earn a fee). One operator wins and the user receives their BTC on Bitcoin.</p></li><li><p><strong>Operator claims reimbursement from the bridge - </strong>This is where the BitVM game begins.<br>Once the operator has fronted the withdrawal, it broadcasts a claim transaction that pays itself the same amount from the bridge deposits. This starts a challenge period.</p></li><li><p><strong>Operator creates a BTC bond as collateral</strong> - Depending on the implementation this is done during the claim process, or when the BitVM instance was created. This bond can be slashed.</p></li></ol><ul><li><p>Anyone (including other operators, the user, or any third party watching) can verify whether the operator processed the withdrawal correctly, that the rollup burn happened and the corresponding Bitcoin withdrawal is truthful.</p></li><li><p>If nobody challenges within the window (1-2 weeks), the withdrawal finalizes and the operator gets reimbursed.</p></li><li><p>If the withdrawal is for less than the original bridged amount, then the remaining bitcoin goes back to the bridge. (The operators will need to make a new BitVM instance for this amount).</p></li><li><p>If someone challenges and the operator is proven wrong, the operator&#8217;s bond is slashed: a portion is sent to an unspendable output (effectively burned via an op_return), and the remainder is paid out as a bounty to whoever posts/completes the disprove transaction (often the challenger).</p></li></ul><h3><strong>The BitVM Game</strong></h3><p>Unlike the EVM rollup chain, the Bitcoin blockchain has no way of verifying a proof directly. This is where BitVM comes into play.</p><p>Operators run a prover program (similar to a Bitcoin light client) to which they pass in the following inputs:</p><ul><li><p>A previously known bitcoin block hash</p></li><li><p>A Bitcoin block hash from after the withdrawal transaction was broadcast</p></li><li><p>The L1 withdrawal transaction used to front the payout</p></li><li><p>A rollup proof that was committed to Bitcoin, that proves the wrapped bitcoin was burned on the rollup</p></li></ul><p>The output of the program is a proof that can be used to verify that the operator&#8217;s withdrawal was included between the blockhashes and paid out to the user on the Bitcoin L1.</p><p>Then the operator posts a reimbursement claim on Bitcoin with this proof.</p><ul><li><p>If nobody challenges during the window, the operator finalizes and gets reimbursed</p></li><li><p>If challenged, the operator has to commit to more details (Assert TX), and the challenger can force the protocol to check a piece of the verification logic on-chain (Disprove TX); if it fails, then the operator has lied and they get slashed (lose the bitcoin they put into the bond).</p></li></ul><p>With BitVM2, the transactions posted on-chain are very large. The Assert TX is 2 MB, and the disprove TX is 4 MB (close to a full block). However, recent discoveries using Garbled Circuits and Conditional Disclosure of Secrets (see Delbrag, Garbled Locks, BitVM3, BABE, and Argo)  should reduce these transactions to only 80 KB of data in total.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vQpA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vQpA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png 424w, https://substackcdn.com/image/fetch/$s_!vQpA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png 848w, https://substackcdn.com/image/fetch/$s_!vQpA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png 1272w, https://substackcdn.com/image/fetch/$s_!vQpA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vQpA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png" width="1030" height="1404" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1404,&quot;width&quot;:1030,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vQpA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png 424w, https://substackcdn.com/image/fetch/$s_!vQpA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png 848w, https://substackcdn.com/image/fetch/$s_!vQpA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png 1272w, https://substackcdn.com/image/fetch/$s_!vQpA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f29720-0fc3-4f72-b6af-d79dc4c9106e_1030x1404.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>What&#8217;s next?</strong></h3><p>Rollups combined with BitVM allow us to create what is very close to the two-way peg that Blockstream envisioned all that time ago. There are still some trade-offs (centralized sequencers, operator assisted withdrawals) that do not quite make them the holy grail of Bitcoin scaling, but new discoveries and breakthroughs are happening all the time.</p><p>Citrea <a href="https://x.com/citrea_xyz/status/2016149582942495044?s=20">launched</a> their BitVM2 rollup this week. Alpen is working on a BitVM3 implementation, and several other teams are building BitVM bridges.</p><p>If only a few of these rollups exist and become popular, their demand for blockspace will greatly increase Bitcoin&#8217;s security model for the foreseeable future.</p><p>Mitigations are being developed to the risks we mentioned earlier. Several teams &#8211; including Char Network &#8211; are explicitly focused on removing the sequencer trust assumption, which may turn out to be the final step that separates &#8220;interesting experiments&#8221; from true Bitcoin L2s.</p><p>The closer we get to a trustless two-way peg, the closer we are to having private, scalable digital cash. This is an exciting step towards that goal. An EVM rollup is just one example. Once we have a trustless bridge, the possibilities are endless. For example, <a href="https://gist.github.com/RobinLinus/d036511015caea5a28514259a1bab119">ZKcoins</a> is a very promising private, client side scaling solution that needs a BitVM-like bridge.<br><br>Anyway, I hope this helped explain what these rollups are and how BitVM fits in.</p><p>In conclusion, let&#8217;s activate drivechains.</p><p></p><p><em>Catch <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;stu&quot;,&quot;id&quot;:262366726,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!Jzpd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec788975-df2b-4fd5-b73c-0d13d6282b8f_181x181.jpeg&quot;,&quot;uuid&quot;:&quot;247c2c40-3d00-4e84-84f6-9d57f8353411&quot;}" data-component-name="MentionToDOM"></span> in person at bitcoin++ exploits edition in Florianopolis next month, talking about &#8220;building bridges to north korea&#8221; or how chain bridges have historically been exploited. Get a ticket with code INSIDER for 10% off!</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://btcpp.dev/conf/floripa26#tickets&quot;,&quot;text&quot;:&quot;Join us in Floripa!&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://btcpp.dev/conf/floripa26#tickets"><span>Join us in Floripa!</span></a></p><div><hr></div><p>Thanks to Niftynei, SuperTestnet, Otaliptus, Ponzini, ecurrencyhodler, Liran, Janusz and Jeremy Rubin for reading drafts of this, and Paul Sportz for the closing sentence.</p>]]></content:encoded></item><item><title><![CDATA[Shoehorning new features into existing on-chain UX (sucks)]]></title><description><![CDATA[Payjoin exposes this; silent payments fixes it]]></description><link>https://insider.btcpp.dev/p/shoehorning-new-features-into-existing</link><guid isPermaLink="false">https://insider.btcpp.dev/p/shoehorning-new-features-into-existing</guid><pubDate>Wed, 21 Jan 2026 15:02:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Iklv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Iklv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Iklv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Iklv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Iklv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Iklv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Iklv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2156408,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/185279216?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Iklv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Iklv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Iklv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Iklv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c2b6df-c21c-445b-ba0a-809c067984c5_1600x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>A guest article from <a href="https://x.com/Yashraj__">Yashraj</a></em> </p><div><hr></div><p>Bitcoin&#8217;s blockchain is transparent. Activity around any on-chain address is easy to inspect by using free, publicly-available blockchain explorers. As a result, existing on-chain transaction UX in privacy-conscious wallets revolves around one major concern: avoiding <a href="https://bitcoin.design/guide/glossary/address/#address-reuse">address reuse</a>. This pre-occupation has given rise to certain UX patterns that are standard in practically every self-custody wallet. Issuing (and communicating) new addresses for every transaction is inefficient and unintuitive. Users adapt to this routine over time, but the friction is significant. This friction becomes apparent when you consider steps taken outside of the wallet app itself.</p><p>Let&#8217;s walk through the steps new addresses require.</p><ul><li><p><strong>the receiver </strong>must 1) open their wallet app 2) click on Receive button 3) copy the on-chain address 4) share it with the sender.</p></li><li><p><strong>the sender </strong>must 1) ask the receiver for a fresh address, 2) obtain it from the receiver, then 3) enter this address into their wallet&#8217;s Send page (and construct the transaction) and 4) briefly review it before broadcast</p></li></ul><p>These steps are repeated for every single payment. Contrast this with other payment or communication protocols we use: email addresses, phone numbers and bank account information &#8211; you exchange this information once, and can use it repeatedly.</p><p>Bitcoin should be similarly easier to use, while still preserving privacy. New protocols like silent payments and payjoin provide an opportunity to re-examine (and maybe improve) on-chain transaction UX. In this post, we will do just that.</p><h2><strong>Enter silent payments</strong></h2><p>We discussed how avoiding address reuse is the basis for existing on-chain transaction UX. For example, a prominent Receive button allows the user to generate new on-chain addresses with each use. Send flows involve (and often start with) entering the recipient&#8217;s address.</p><p><strong>Silent payments is a protocol that was created to prevent address reuse.</strong> It gives us a new type of address that never appears on-chain, but is used by the wallet app to programmatically derive unique on-chain addresses during the transaction process. Silent payment addresses are meant to be reused. As many times as needed.</p><p>The 4 step process (as a recipient) to simply share a fresh address with the sender? Gone. Share your silent payment address once, and you&#8217;re done! Remember asking the receiver for a fresh address every single time you want to pay them? No more; just get their silent payment address once, and save it for future use. Silent payments is Efficiency Go Up technology!</p><p>Not just that, silent payments (along with BOLT 12 and BIP-353) make using bitcoin as easy as sending an email or making a phone call. With silent payments, wallet apps can provide Contacts functionality to its users, storing this reusable payment information. Adding a Contacts module allows applications to tap into a highly intuitive, long-established user pattern, while ensuring address re-use is prevented. Apps like Phoenix have already started doing this for BOLT 12 offers.</p><p>Of-course, silent payments can also fit into existing send flows, as existing implementations have done. But in this author&#8217;s view, existing user flows don&#8217;t do justice to silent payments... and to users frankly.</p><h2><strong>One-shot payment flow&#8230;</strong></h2><p>In spite of the cumbersome user steps described at the beginning of this post, one feature of the <em>existing</em> interaction model is that users are able to complete their actions within a single sitting.</p><p>After the receiver has shared their address, they are not required to do anything further. They never have to sign or review anything. This is a logical and familiar experience for the recipient of the payment.</p><p>The sender only comes online after they&#8217;ve received the address from the recipient. They are able to construct, review and broadcast the transaction in a single session too, usually taking less than a minute.</p><p>A one-shot payment flow. Nice. Except payjoin disrupts it!</p><h2><strong>Enter payjoin</strong></h2><p>Matters get more complicated when it comes to payjoin. In payjoin, both the sender and the receiver work together to construct a privacy-friendly transaction (see <a href="https://payjoin.org/docs/why-payjoin/privacy">why</a>). To do so, they pass around transaction drafts, to which each party adds their coins and signatures. With <a href="https://github.com/bitcoin/bips/blob/master/bip-0077.md">async payjoin</a>, this procedure can be done without either party having to run a server (to facilitate this coordination), or both parties needing to be online at the same time. Elimination of these constraints puts privacy within the reach of non-technical users, while also allowing it to be used in a wider set of scenarios.</p><p>For e.g. Alice and Bob decide to go to a bitcoin conference in Las Vegas for the first time. Alice buys the flight tickets for both of them. Bob has recently orange-pilled her, so she agrees to be paid back in bitcoin. Alice opens her bitcoin wallet and shares an invoice with Bob over chat. By the time he&#8217;s online to act on it, she&#8217;s on a flight. With async payjoin, they can still do a privacy-friendly transaction.</p><p>However, async payjoin comes with tradeoffs, specifically extra steps and potential delays. I wrote about this in my post about <a href="https://github.com/orgs/payjoin/discussions/706">payjoin UX challenges</a>.<br><br>Long story short, async payjoin adds bells &amp; whistles to the process of sending or receiving bitcoin, such as:</p><ol><li><p>receivers need tomust come online in the middle of the payjoin process</p></li><li><p>receivers may have to pay fees</p></li><li><p>senders must sign twice (once for initial draft, once after receiver adds their inputs), and come online to do so</p></li><li><p>both parties must wait for each other to come online and sign</p></li><li><p>this process (likely) spans multiple sessions for each user &#8211; breaking the one-shot payment flow</p></li></ol><p>These situations don&#8217;t fit very well within existing send/receive flows. Additionally, the above points are unlikely to be obvious to anyone, but the most tech-savvy users. The application must inform, assist or encourage users about these aspects. Payjoin transactions not only include additional manual steps, their async nature also means they might take a long time (hours) to execute. Where hardware signers and/or multi-sig setups are involved, the effort or just the situation might make it too onerous for the user to pursue a payjoin transaction. This highlights the need to help users form an appropriate mental model for payjoin, complete with optionality, feedback and suitable communication through the UI.</p><p>Furthermore, payjoin enables features (such as payment batching and timelock refresh) that might not fit into existing user flows.</p><p>Overall, it seems clear that new UI and user flows are needed for good UX and full-featured payjoin implementations. Shoehorning payjoin into existing UX seems barely possible and not desirable.</p><h2><strong>Wrapping up</strong></h2><p>Many consider bitcoin hard to use. The existing on-chain send/receive flows lend credence to this view, as we saw above. Silent payments can change this perception by helping match on-chain UX with that of email or fiat fintech by using a safely reusable payment method, transforming on-chain UX in the process.</p><p>Privacy is another area that&#8217;s not a strong suit for bitcoin. Payjoin addresses this, helping users to protect their privacy during the course of making/receiving a payment. However, as discussed above, async payjoin does not play well with prevailing on-chain UX.</p><p>The writing is on the wall &#8211; existing transaction UX leaves a lot to be desired. It&#8217;s time to move past it.</p>]]></content:encoded></item><item><title><![CDATA[A Knotty Irony]]></title><description><![CDATA[Bitcoin++'s Niftynei shares her thoughts on the OP_RETURN drama...]]></description><link>https://insider.btcpp.dev/p/a-knotty-irony</link><guid isPermaLink="false">https://insider.btcpp.dev/p/a-knotty-irony</guid><dc:creator><![CDATA[~nifty~]]></dc:creator><pubDate>Thu, 18 Sep 2025 13:58:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tZ8r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tZ8r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tZ8r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!tZ8r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!tZ8r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!tZ8r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tZ8r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2393283,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/173928240?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tZ8r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!tZ8r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!tZ8r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!tZ8r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bb8c5cc-bd4b-4060-a7df-7bd20a090f43_1600x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Bitcoin is a decentralized ledger. Its power comes from its ability to move value between any two people that are using the protocol, without having to ask a third party for permission to transact. To achieve this modern marvel, Satoshi Nakamoto invented a novel form of consensus, one that works so long as 51% of the network maintains their independence via mining.</p><p>The bitcoin protocol, unlike most other protocols like http or tcp which run the internet, doesn&#8217;t have a written specification. Instead the rules of how bitcoin works is embedded into code. That codebase we call bitcoin core.</p><p>Bitcoin core, as a project, is tasked with the responsibility of maintaining the network in an operational state. There are a few guiding principles which go into maintaining bitcoin&#8217;s implementation. These principles are occasionally tested.</p><p>For example, the blocksize wars was a test of the principles that bitcoin should follow from a resource consumption standpoint. That is to say, what kind of hardware would an individual need to personally own in order to be able to download and verify every block on the network. Some people believed that the ability of every man to run a node was less important than the number of transactions that bitcoin can handle in a second.</p><p>Others, the winning faction I should point out, believed that bitcoin could not be a success without keeping the storage requirements within the grasp of a man with a few hundred dollars they were willing to spend on a computer.</p><p>Decentralization at the node runner level was decidedly a central principle of the Bitcoin project. The blocksize wars were fought and the winners came out in favor of accessibility and &#8220;cockroach like&#8221; proliferation of nodes instead of transaction throughput.</p><p>For example, Jameson Lopp famously would publish reports on his attempts to start an Ethereum node from scratch. The hardware required was in the thousands of dollars. I&#8217;m not sure he successfully managed to sync the chain.</p><p><em>This is exactly the type of thing we want to avoid in bitcoin.</em></p><p>Which brings us to our current conundrum around op-return. The goal of changing the op-return rules is to <em><strong>preserve</strong></em> the ability of anyone to run a node. What&#8217;s the connection? Well, people want to put information inside of bitcoin transactions. You may disagree with this idea, but for them there is an economic rationale for doing it. They&#8217;re willing to pay good money to publish this information, much like someone might publish a classified ad in a newspaper.</p><p>The only problem is that how they choose to publish the data has real costs to the hardware required to run a node successfully (the amount of storage space and RAM your computer has). So bitcoin devs, in their desire to maintain the project in a state where it was still accessible to run, made a special carve out for data-only. This is called op-return.</p><p>It works because it allows nodes to effectively ignore the information contained in an op-return. This reduces the total amount of data a node needs to keep track of in working memory, which reduces the RAM requirements.</p><p>For the record, more people holding bitcoin, and more UTXOs being created, contributes to the resource requirements of a node. The goal is to get people to hold bitcoin but not use UTXOs for data. Op-return fixes this.</p><p>Except people couldn&#8217;t fit all the data they needed into 80-bytes, so they reverted to more resource intensive ways of publishing data. So the maintainers of bitcoin core, in order to head off potential loss of accessibility to running a node, opted to remove the relay restriction on op-returns.</p><p>I get that having data in blocks may be undesirable, but it&#8217;s not anything that can be stopped. Bitcoin core&#8217;s maintainers are working to preserve the ability of anyone to run a node, for the foreseeable future.</p><p>More people are running nodes now, because they want to make a statement about autonomy and choice. That ability is one that was fought for and continues to be defended by the maintainers of core. The recent op-return decision is one more example of the maintainers prioritizing ability to run nodes on cheap and accessible hardware over all other considerations.</p><p>More people are running nodes because of their decision to change op-return. That ability to spin a node up is exactly what the maintainers are safe guarding.</p><p>Speaking of decentralization, I think it&#8217;s quite ironic that more people are running nodes now in order to filter out transactions, because the act of filtering actually makes it harder for independent miners to compete for blocks.</p><p>By running a node that prevents the relay of transactions that are profitable for miners, you&#8217;re making it less likely that other nodes will be able to quickly verify blocks.</p><p>Every time a new bitcoin block is found, your node has to first get a copy of every transaction in the block. It verifies each of the transactions and then sends the block on to the next node in the network.</p><p>If you&#8217;ve ever played Base58&#8217;s Bitcoin at Work(shop), you&#8217;ve done this by hand. If transactions are missing from your node&#8217;s mempool, you&#8217;d have to request them from other nodes on the network. Until you&#8217;ve found them all, you can&#8217;t mark the block as valid. You can&#8217;t start mining on top of a block until you know it&#8217;s valid.</p><p>Not having transactions readily available means that your node is at a time disadvantage in hunting for the next block. As is any miner waiting for you to notify them of the current valid block. Requesting transactions means blocks move through the network slower, giving small miners less time to try finding a new block before more centralized miners that keep every transaction in their mempool.</p><p>OCEAN claims they&#8217;re aiming to help make mining more decentralized, and I believe they mean to do this. However their suggestion to filter out transactions leaves smaller nodes and Bitaxes at a disadvantage in terms of finding a block. Unfortunately this contributes to giving preference to larger miners who are more likely to have every transaction and be connected to more nodes so that they hear about blocks sooner.</p><p>Building your own block template is a great opportunity to filter out transactions. At the relay level, however, you&#8217;re only undermining the goals you set out to accomplish.</p><p>I fully believe in decentralized systems, as does every Bitcoiner I know. It&#8217;s incredible to watch the node running community grow and people feel empowered by helping keep bitcoin decentralized. If you&#8217;re not already running a Bitaxe, I&#8217;d recommend it. Filter the transactions going into your blocks your Bitaxe is mining if you want to have a say in data on bitcoin.</p><p>For the sake of maintaining bitcoin as decentralized system, however, I&#8217;d strongly suggest you reconsider filtering the mempool and restricting op-return data.</p>]]></content:encoded></item><item><title><![CDATA[SPHINCS+]]></title><description><![CDATA[A deep dive into the sig scheme in @roasbeef's proposal for post-quantum bitcoin sigs]]></description><link>https://insider.btcpp.dev/p/sphincs</link><guid isPermaLink="false">https://insider.btcpp.dev/p/sphincs</guid><dc:creator><![CDATA[~nifty~]]></dc:creator><pubDate>Thu, 24 Jul 2025 11:52:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!yorf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yorf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yorf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!yorf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!yorf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!yorf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yorf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1627159,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/168819974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yorf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!yorf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!yorf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!yorf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa130fdc2-5f9f-4b07-b1bf-9998c7c57aae_1600x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Presidio Bitcoin, a Bitcoin-only co-working space in San Francisco, held a summit last week about Quantum Bitcoin. <a href="https://x.com/roasbeef">@roasbeef</a>, lead maintainer of `btcd` and `lnd` and CTO of <a href="http://lightning.engineering/">Lightning Labs</a>, presented <a href="https://drive.google.com/file/d/12UlzfGvG09IwvzWscL2FT8CoewGBWlGD/view">a proposal</a> for adding a post-quantum signature scheme to Bitcoin, SPHINCS+. In today&#8217;s edition, Insider&#8217;s protocol-expert <a href="https://x.com/niftynei">@niftynei</a> breaks down the proposal.</em></p><h3>The Quantum Problem</h3><p>Most coins on chain in Bitcoin are secured with private keys. To move Bitcoins around on-chain, you prove that you have permission to spend them by creating a signature. A valid signature can only be produced by someone who possesses the correct private key. </p><p>In some sense, Bitcoin is &#8220;security by obscurity&#8221;, where the obscurity is how hard it is to guess your private key. The number of possible private keys is astronomically large. Guessing all the private keys would take more time and energy than anyone has access to in a reasonable timeframe (think hundreds of years).</p><p>However, current Bitcoin keys rely on math equations that are based on elliptic curves. Elliptic curves are a clever system to rely on for creating public and private keys, as they&#8217;re generally more secure and smaller than prime factorization (another &#8216;math system&#8217; that public/private key cryptography is often based on).</p><p>Elliptic curve cryptography has a problem, however. Shor&#8217;s algorithm, invented in 1994 by <a href="https://www.youtube.com/watch?v=wnhZPmB8KLg">Peter Shor</a> based on Fourier Transforms, means that a quantum computer with enough qubits can quickly compute the private key of any public key.</p><p>Shor&#8217;s algorithm means we <em>know</em> how to break elliptic curve cryptography, the tools to do it just don&#8217;t exist yet. Whether they will exist, and when, is a topic of much debate not just in bitcoin circles, but the wider cryptographic ecosystem. The security of every private key in bitcoin depends on the tools to execute Shor&#8217;s algorithm remaining out of reach of everyone for the indefinite future.</p><p>General consensus is that at <em>some</em> point, bitcoin will need to transition to a <em>post-quantum</em> cryptosystem for public and private keys. @roasbeef&#8217;s proposal at Presidio Bitcoin last week is based on the SPHINCS+ hash-based signature scheme. Let&#8217;s dig in briefly to how it works and why it&#8217;s potentially a good fit for securing bitcoins.</p><h2>Quantum secure but data heavy</h2><p>SPHINCS+ is a signature construction that&#8217;s built on hashes. At its core, it relies on cryptographic hashes to construct public keys and verify signatures, rather than elegant elliptic curve equations or hiding in large number prime factorization. Hash-based crypto schemes are safe from Shor&#8217;s algorithm because they <em>don&#8217;t</em> use functional math systems under the hood for their one-way functions. Instead, they rely on brute force data mashing of preimages. Brute force has no mathematical relationships or short cuts that are vulnerable to quantum computer Fourier transformations, of the likes that Shor&#8217;s algorithm uses.</p><p>A downside to mashed data, aka hash functions, is that their public keys and signatures require much more data to be shared. Elliptic curves were chosen for blockchains by Satoshi himself, precisely because of how <em>little</em> data needed to be shared to confirm a signature or lock coins up to a public key. I like to say that Bitcoin was the killer app of elliptic curve cryptography; prior to Satoshi&#8217;s use of secp256k1 in the protocol, the majority of cryptosystems used RSA, or prime factorization, as their underlying math system. According to the <a href="https://www.secg.org/SEC2-Ver-1.0.pdf">SEC 2</a> parameters paper, a 128-bit secure RSA signature would require 3072 bits for a public key; the elliptic curve equivalent only requires 256 bits.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3OhU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3OhU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png 424w, https://substackcdn.com/image/fetch/$s_!3OhU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png 848w, https://substackcdn.com/image/fetch/$s_!3OhU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png 1272w, https://substackcdn.com/image/fetch/$s_!3OhU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3OhU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png" width="1456" height="279" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:279,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116159,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/168819974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3OhU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png 424w, https://substackcdn.com/image/fetch/$s_!3OhU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png 848w, https://substackcdn.com/image/fetch/$s_!3OhU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png 1272w, https://substackcdn.com/image/fetch/$s_!3OhU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a4c6b5-99ae-4cc0-b0ae-89ed9103a2bf_1784x342.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Using very little data is important in blockchain systems, as any data that is added to the chain must be stored and sent to every single peer on the network.  Compact signatures and public keys mean that more transactions can fit into the same amount of data. Size savings is arguably <em>the</em> reason why Satoshi chose to use elliptic curves instead of RSA cryptography for bitcoin.</p><p>Post-quantum cryptosystems are impossibly large in comparison. SPHINCS+ systems have equivalent sized public keys to the current Bitcoin key system at 32-bytes but the signature sizes are thousands of bytes larger. A Segwit v1 Schnorr signature is 64-bytes of onchain data; comparable SPHINCS+ benchmark sigs are 3-7k bytes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PXFH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PXFH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png 424w, https://substackcdn.com/image/fetch/$s_!PXFH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png 848w, https://substackcdn.com/image/fetch/$s_!PXFH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png 1272w, https://substackcdn.com/image/fetch/$s_!PXFH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PXFH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png" width="980" height="354" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:354,&quot;width&quot;:980,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:63844,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/168819974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PXFH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png 424w, https://substackcdn.com/image/fetch/$s_!PXFH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png 848w, https://substackcdn.com/image/fetch/$s_!PXFH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png 1272w, https://substackcdn.com/image/fetch/$s_!PXFH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32798a-1515-44f4-b997-4f24100c3f1f_980x354.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From NIST SPINCS+ <a href="https://csrc.nist.gov/csrc/media/Events/2024/fifth-pqc-standardization-conference/documents/papers/a-note-on-sphincs-plus-parameter-sets.pdf">parameters paper</a></figcaption></figure></div><h3>SPHINCS+</h3><p>SPHINCS+ is a complex signature scheme, built using several layers of post-quantum signature &#8216;widgets&#8217;. When combined, SPHINCS+ produces a single quantum safe public / private keypair which can be used to sign many messages safely. Unlike XMSS (eXtended Merkle Signature Schemes), a prior post-quantum signature scheme that SPHINCS+ is an improvement over, you don&#8217;t need to remember anything about prior signatures made with the keypair for any subsequent signatures.</p><p>One SPHINCS+ &#8220;structure&#8221; produces a single pubkey that can safely sign many messages without revealing the secret key.</p><p>A SPHINCS+ 'structure&#8217; is constructed of three different pieces: </p><ul><li><p>FORS, or &#8220;Forest of Random Subsets&#8221;. This is at the bottom of the SPHINCS+ &#8220;structure&#8221; and is where the message is used to choose a series of preimages to reveal. This set of revealed preimages becomes the base of the SPHINCS+ signature. In SPHINCS+, the message is effectively &#8216;signed&#8217; using FORS. The next pieces are used to tie the FORS signature to the root public key for the SPHINCS+ superstructure, as I&#8217;m choosing to call it.</p></li><li><p>WOTS+, or &#8220;Winternitz One Time Signatures+&#8221;. This is a post-quantum hash based signing algorithm that can sign one message securely. SPHINCS+ uses WOTS+ signatures to tie the revealed preimages in the FORS into layered-XMSS Merkle trees. The root of the layered Merkle trees is the SPHINCS+ pubkey. (The only difference between WOTS and WOTS+ is that the + variant includes a random prefix in every hash operation, which mitigates multi-target hash attacks. The &#8216;+&#8217; in SPHINCS+ also means that every hash in the SPHINCS+ includes a randomly generated prefix.)</p></li><li><p>XMSS Merkle trees. An XMSS Merkle tree has WOTS+ public keys as each of the leaves. SPHINCS+ builds huge pyramid-like structures out of layers of XMSS Merkle trees. Trees on top of trees are also commonly referred to as &#8220;hypertrees&#8221;. Each leaf of the parent tree is a WOTS+ public key. The key is used to sign the root of the tree underneath itself in the structure. This ties the trees together. How many trees and how many layers are changeable depending on the desired size of the signature for a SPHINCS+ &#8216;superstructure&#8217;. The smaller the signature, the more hashing will have to be done to verify and produce signatures. Each leaf at the very bottom of all the trees is a FORS. Many layers of many Merkle trees means many many many FORS at the base of the pyramid that can be used for making secure signatures with very little possibility of reuse.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DCmr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DCmr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png 424w, https://substackcdn.com/image/fetch/$s_!DCmr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png 848w, https://substackcdn.com/image/fetch/$s_!DCmr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png 1272w, https://substackcdn.com/image/fetch/$s_!DCmr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DCmr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png" width="794" height="326" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:326,&quot;width&quot;:794,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37389,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/168819974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DCmr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png 424w, https://substackcdn.com/image/fetch/$s_!DCmr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png 848w, https://substackcdn.com/image/fetch/$s_!DCmr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png 1272w, https://substackcdn.com/image/fetch/$s_!DCmr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8dc0893-3d5d-4f0d-98ea-ec5d1ae8dc91_794x326.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Overly simplified hyper tree diagram. The PK in above would actually be the FORS signature in a SPHINCS+ situation. The `root` is the SPHINCS+ public key.</figcaption></figure></div><p>The general work of producing a SPHINCS+ public key is to generate all of the WOTS+ public keys that are at the root of the tree, and then calculate the Merkle root for that tree. The root of the top tree is the SPHINCS+ public key. The root of a Merkle tree is the same size as the hash function used to calculate the root. Typically we use SHA256 as the chosen hash function, which output 256-bits. This means that the root for such a Merkle tree is 32-bytes. This is where the SPHINCS+ public key comes from.</p><p>Creating a signature for SPHINCS+ requires using a hash of the message to randomly pick which sub-tree&#8217;s subtree the FORS signature will be connected to the SPHINCS+ &#8216;hypertree&#8217; at. Once the FORS signature is created, it&#8217;s then tied into the SPHINCS+ hypertree by signing the FORS signature with the WOTS+ private key at the randomly selected sub-sub-sub-tree leaf. From there, signatures and Merkle paths are collected until you reach the root SPHINCS+ public key. All of the of WOTS+ signatures, plus the FORS signature, plus the series of Merkle paths to trace from the root SPHINCS+ pubkey to the place where the FORS signature was tied into the structure are the signature of the message. This is a lot of data, as one can imagine, and is why the signatures for SPHINCS+ are orders of magnitude greater than a simple 64-byte elliptic curve equation result and nonce value.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!itJx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!itJx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png 424w, https://substackcdn.com/image/fetch/$s_!itJx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png 848w, https://substackcdn.com/image/fetch/$s_!itJx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png 1272w, https://substackcdn.com/image/fetch/$s_!itJx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!itJx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png" width="876" height="468" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:468,&quot;width&quot;:876,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:60562,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/168819974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!itJx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png 424w, https://substackcdn.com/image/fetch/$s_!itJx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png 848w, https://substackcdn.com/image/fetch/$s_!itJx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png 1272w, https://substackcdn.com/image/fetch/$s_!itJx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f9e5e1c-4116-4b93-8dcf-5d1c8a54e425_876x468.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Diagram of data that&#8217;s included in a SPHINCS+ signature. The &#8216;sign&#8217; process at right is a FORS signature; the &#8216;sign&#8217; in the middle of the diagram is a WOTS+ signature.</figcaption></figure></div><h3>Why SPHINCS+</h3><p>SPHINCS+ is quite layered. It&#8217;s much more kludgey and relies on several different &#8220;widgets&#8221; to produce signatures: Witnernitz signatures, FORS, and XMSS subtrees.</p><p>SPHINCS+&#8217;s complexity comes from its powerful set of features. It is a strict improvement on XMSS by itself, another post-quantum signature scheme that allows for signing multiple messages. Unlike XMSS, where you must track each Merkle leaf that has already been used to sign, SPHINCS+ uses randomness generated from the message digest to deterministically select a random sub-leaf in the hypertree.</p><p>In Bitcoin, you&#8217;re ideally rotating public keys for every transaction, which means generating a new SPHINCS+ superstructure for *every* bitcoin pubkey that you use. </p><p>Initially I was confused about why you would want such powerful re-signing capability into what&#8217;s (ideally) a single use public key. </p><p><a href="https://x.com/n1ckler">Jonas Nick</a> of Blockstream Research pointed out that you would want to be able to re-sign a transaction for fee bumps or if a transaction was lost for some reason; <a href="https://x.com/roasbeef">Laolu</a>, aka roasbeef, highlighted that off-chain protocols like Lightning require repeated signing of transactions for tracking private state transitions.</p><p>You likely wouldn&#8217;t need enormous resigning capability for Bitcoin, which would allow you to build smaller SPHINCS+ super structures under each pubkey. Smaller super structures would mean less data required for each signature, as the Merkle tree path data would be reduced. It also means that there&#8217;s less signatures that you can make before beginning to degrade the security. Unlike elliptic curve equations where nonce reuse immediately leaks the private key, over usage of a SPHINCS+ pubkey for signatures merely begins to degrade the security downwards from 128-bits as the FORS at the bottom get partially reused.</p><p>After digging into it, I have to say I&#8217;m quite a fan of roasbeef&#8217;s proposal to use SPHINCS+ as a post-quantum signature scheme. There&#8217;s still lots of design work to be done for exact parameters. I expect a draft BIP proposal, which he has indicated is in the works, will help fill in some of the gaps around depth of the super-structure and number of signatures that can safely be made from a single keypair.</p><p>Also worth pointing out, as mentioned in roasbeef&#8217;s presentation, SPHINCS+ doesn&#8217;t allow for seed/child derivation paths. This means that BIP32 hierarchical wallets and would be effectively dead. There&#8217;s other options here, but we&#8217;d likely lose the ability to describe keys in a wallet using hierarchical derivation paths, as is the custom these days for xpubs and child wallets.</p><h3>Which way Western man</h3><p>Bitcoin will move to a post-quantum signature scheme. When, what construction, and with what parameters is likely to be a hot topic of conversation for the next few years. </p><p>Roasbeef&#8217;s proposal for SPHINCS+ is a compelling option, despite the level of complexity built into the multi-layer tree superstructures. All hash-based post-quantum public key proposals are quite ugly in my opinion. SPHINCS+ is ugly because it offers the most features, specifically the <em>statelessness </em>of repeated signings.</p><p>With a better understanding of the role each piece plays in the protocol, I have a strong appreciation for the cleverness that led to it&#8217;s very layered setup.</p><p>Roasbeef still has his work cut out for him in writing the BIP, particularly in choosing the depth of each tree and the number of sub-tree layers, as well as the size of the Winternitz signatures and the FORS parameters. There&#8217;s a tradeoff between the size of signatures and the amount of hashes that are required to produce the signature. Choosing the right balance between computation and on-chain footprint is work that still needs to be done before publishing a formal BIP proposal.</p><p>And there&#8217;s a last question that remains to be answered:</p><p>Would moving to SPHINCS+ mean that Bitcoin is now a pyramid-scheme? Hard to say definitively, but it certainly looks that way.</p><h3>Credits</h3><p>Thanks to Jonas Nick and Olaoluwa Osuntokun for their help in explaining the reuse cases and tuning parameters for SPHINCS+.</p><h3>Further Reading</h3><p>Want to dig in further? Here&#8217;s some excellent resources that we relied on for writing this article</p><ul><li><p>Laolu&#8217;s <a href="https://drive.google.com/file/d/12UlzfGvG09IwvzWscL2FT8CoewGBWlGD/view">original presentation</a> given at the Quantum Summit at Presidio Bitcoin on July 17.</p></li><li><p><a href="https://sphere10.com/articles/cryptography/pqc/wots">Sphere10&#8217;s Winternitz signature explainer</a> unlocked the basics of post quantum signatures for me.</p></li><li><p>A <a href="https://er4hn.info/blog/2023.12.16-sphincs_plus-step-by-step/">deep dive blogpost</a> by software developer Ethan Rahn. Includes great diagrams and covers some of the history of post-quantum signature development.</p></li><li><p>Incredibly in-depth presentation on<a href="https://csrc.nist.gov/csrc/media/Presentations/2022/crclub-2022-10-19a/20221020-crypto-club-kelsey-slides-MD-hash-sigs.pdf"> SPHINCS+</a> by John Kelsey of NIST. The best detailed explainer I&#8217;ve seen, but definitely in the weeds.</p></li></ul><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Knock, knock. It’s Cashu, Bitch@]]></title><description><![CDATA[Calle teased a Bitchat application that natively supports Cashu payments. How does it work?]]></description><link>https://insider.btcpp.dev/p/knock-knock-its-cashu-bitch</link><guid isPermaLink="false">https://insider.btcpp.dev/p/knock-knock-its-cashu-bitch</guid><dc:creator><![CDATA[janusz]]></dc:creator><pubDate>Fri, 18 Jul 2025 15:33:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dt5e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dt5e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dt5e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!dt5e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!dt5e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!dt5e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dt5e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2226773,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/168638439?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dt5e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!dt5e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!dt5e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!dt5e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8743b5a9-8685-4a27-a65c-4ac84a27cdb5_1600x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I think there&#8217;s something brewing on the internet. Well, thousands of others do as well, but I will <a href="https://x.com/januszg_/status/1945958844594606428">claim</a> that we called it first.</p><p>If you&#8217;re on Nostr, or the Bird app, you might&#8217;ve seen the newly released Bitchat application from Jack Dorsey. It&#8217;s quickly gone viral and has caught the attention of a number of devs in the space. Calle, the creator of Cashu, has been building Bitchat&#8217;s <a href="https://github.com/permissionlesstech/bitchat-android?tab=readme-ov-file">android</a> implementation and&#8230; you guessed it:</p><p>A native Ecash wallet is <a href="https://x.com/callebtc/status/1945903479693705607">built</a> into the Bitchat mobile application.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QvkU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QvkU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png 424w, https://substackcdn.com/image/fetch/$s_!QvkU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png 848w, https://substackcdn.com/image/fetch/$s_!QvkU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png 1272w, https://substackcdn.com/image/fetch/$s_!QvkU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QvkU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png" width="584" height="815" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ca85890-5396-436b-b894-205a2a7b751f_584x815.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:815,&quot;width&quot;:584,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:374354,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/168638439?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QvkU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png 424w, https://substackcdn.com/image/fetch/$s_!QvkU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png 848w, https://substackcdn.com/image/fetch/$s_!QvkU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png 1272w, https://substackcdn.com/image/fetch/$s_!QvkU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca85890-5396-436b-b894-205a2a7b751f_584x815.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><a href="https://github.com/permissionlesstech/bitchat/blob/main/WHITEPAPER.md">Bitchat</a> combined with Chaumian E-cash has the potential to create a new tool for anonymous, offline payments on mobile devices. What used to require pigeons can leverage noise. What used to require paper notes can leverage Chaumian E-cash.</p><p>Here&#8217;s my take: Bitchat and Cashu are a promising tool for anonymous, offline bitcoin payments. There&#8217;s tradeoffs, but in certain situations, they can provide users a convenient way to transmit value offline. This can even be critical infrastructure in times of crisis.</p><p>And funnily enough, our team was debating this combination&#8217;s capabilities a few hours before the announcement was posted. This piece is a reflection of those discussions.</p><h1>Breaking down Bitchat</h1><p>Bitchat is a peer to peer messaging app that uses Bluetooth to send messages to nearby peers. The tech stack for it is built in three different layers: Bluetooth mesh networking for message sending and receiving, the noise protocol for private communications, and ephemeral peer IDs for ensuring identities are only provided to those you trust.</p><h2>Bluetooth mesh networking</h2><p>First is a bluetooth mesh networking layer. A mesh network is a local network created between local, co-located peers. Different nodes (mobile phones or laptops with bluetooth chips) find and connect to each other. Once connected via Bluetooth and the networking protocol, they can transfer data amongst themselves.</p><p>In a mesh network, each phone is both a sender and a relayer of data packets. This means that a device can either be the recipient of a piece of data, or can relay this piece of data to another recipient in the network. Individual Bluetooth ranges are limited, so this local-peer relay feature extends the reach of each peer in the network past what their device is capable of on its own.</p><p>Here&#8217;s a quick example. Alice needs to send a message to Charlie, who is 200 yards away. In between them is Bob, who is 100 yards away from each. Alice, Bob, and Charlie are all on the same mesh network. Alice sends the message out over the broadcast band, Bob relays it, and Charlie receives it. Once Charlie has the data, they&#8217;re ready to decrypt it and read what&#8217;s inside.</p><p>For the encryption and decryption of the data packets that are relayed across the network, bitchat uses noise.</p><h2>Noise protocol</h2><p>The <a href="https://noiseprotocol.org/noise.html#introduction">Noise Protocol</a> was pioneered at OpenWhisper Systems, the founders of encrypted chat app Signal, as a framework for establishing encrypted communications between two peers who want to exchange private messages.</p><p>It&#8217;s primarily a &#8220;handshake protocol&#8221; which allows two peers to use the Diffie-Hellman key exchange in order to establish a secure, encrypted connection for ongoing private communications. Using just Diffie-Hellman key exchange, the Noise protocol enables end-to-end encryption, forward secrecy, identity hiding, and authentication.</p><p>Bitchat uses a 3-step Noise XX handshake. Users establish a secure channel (known as Noise sessions) between each other, all subsequent messages exchanged between them will be private communications.</p><p>To establish this connection, one peer initiates the handshake phase, the other peer responds. After a successful 3-message handshake, the peers are able to continue communicating using a shared encryption key.</p><p>The session is rekeyed, or &#8220;refreshed&#8221;, after 10,000 messages or a timeframe of 1 hour enabling strong forward secrecy.</p><h2>Ephemeral peer IDs</h2><p>Bluetooth allows peers to exchange data packets; the Noise handshake protocol allows for peers to encrypt messages into those data packets. Now how do you know who you&#8217;re talking to, but maintain anonymity over time?</p><p>Insert Ephemeral peer IDs.</p><p>Ephemeral peer IDs ensure the rotation of peer IDs within some time frame. This means users&#8217; IDs within a chat change periodically during random intervals. In Bitchat, this happens every 5-15 minutes or when a session terminates. Bitchat&#8217;s session management <a href="https://github.com/permissionlesstech/bitchat/blob/main/bitchat/Identity/SecureIdentityStateManager.swift">framework</a> ensures that these peer IDs are appropriately discarded after a session has expired.</p><p>During a noise handshake, the application <a href="https://github.com/permissionlesstech/bitchat/blob/main/bitchat/Services/NoiseEncryptionService.swift">links</a> the current ephemeral IDs and maps them to a SHA256 fingerprint of the respective users&#8217; public keys. This ensures that even after a session expires, users who have authenticated their relationship can retain a persistent identity for each other. Users can also assign social names to their peers whose relationship has been authenticated.</p><p>Users can maintain secure relationships with their peers, while preventing tracking in the broader network.</p><h2>Bitchat enables fully offline, private transfers of data</h2><p>With Bluetooth for mesh networking, Noise for encrypted channels, and ephemeral ids for identity, Bitchat enables users to connect and send encrypted messages through a broader peer-to-peer network. Users do not reveal themselves to network participants unless a secure connection is established.</p><p>Bitchat can be useful in a wide range of <a href="https://github.com/permissionlesstech/bitchat/blob/main/WHITEPAPER.md#real-world-applications">circumstances</a>. It can be used in situations where internet infrastructure and cell towers are not functioning. Or, it can be used in more mundane circumstances - like when you&#8217;re at a concert and your cell signal isn&#8217;t coming through.</p><p>For the privacy conscious, it provides an alternative to internet-based encrypted chats. Connecting through Bluetooth means that you don&#8217;t expose your location to local cell towers.</p><p>If only we could maintain that level of opsec when sending bitcoin around&#8230;</p><h1>Combining it with E-cash</h1><p>Calle demonstrated another use case for Bitchat yesterday: transferring bitcoin-backed tokens across a mesh network while offline.</p><p>Calle invented the Cashu protocol in 2022, a Chaumian e-cash payments protocol which enables users to use bearer tokens to transfer funds. Chaumian payment systems rely on a mint, which holds the underlying asset in exchange for e-cash tokens which users can use as payment instruments. Bitcoin-denominated e-cash mints hold user deposits of on-chain Bitcoin. The mint operator is expected to secure the funds until redeemed by e-cash token hodlers and keep the bearer tokens in the mint pegged. Mints are also responsible for not issuing more e-cash tokens than they have bitcoin holdings. It&#8217;s expected that the value of e-cash tokens in circulation match 1:1 with the mint&#8217;s on-chain bitcoin balance. By removing on-chain custody concerns, e-cash mints lower the barrier to entry for setting up bitcoin custodial services for friends, families, and communities.</p><p>The Cashu protocol provides a feature for offline payments. If a sender doesn&#8217;t have an internet connection, they can still transact using e-cash by sending the token to the receiver over a communication channel; bluetooth or NFC are both common local comms channels for sending e-cash tokens. But, there is a catch with using e-cash offline. One of the peers in the payment needs to be online to finalize the exchange.</p><h2>Example 1: Offline receiver, online sender</h2><p>If the receiver doesn&#8217;t have internet access, the sender can lock the tokens to the receiver&#8217;s pubkey. Cashu&#8217;s Pay-to-Public-Key (P2PK) feature allows users to lock e-cash tokens to a receiver&#8217;s public key. Only the receiver&#8217;s private key can produce a valid signature to unlock the e-cash.<br><br>Let&#8217;s walk through an example from the <a href="https://github.com/cashubtc/nuts/blob/main/11.md">documentation</a>. When a receiver is offline, the sender constructs a transaction to pay to the offline receiver's public key. Then the sender forwards the transaction to the mint with the recipient&#8217;s public key embedded as a secret. The mint then provides a blind signature on that secret enforcing that the receiver is the only party that can unlock the funds. The sender takes this transaction, blind signed by the mint, and sends it over to the receiver who can uniquely produce a signature to unlock the E-cash tokens.</p><pre><code>{
"amount": 1,
"secret": "[\"P2PK\",{\"nonce\":\"859d4935c4907062a6297cf4e663e2835d90d97ecdd510745d32f6816323a41f\",\"data\":\"0249098aa8b9d2fbec49ff8598feb17b592b986e62319a4fa488a3dc36387157a7\",\"tags\":[[\"sigflag\",\"SIG_INPUTS\"]]}]",
"C": "02698c4e2b5f9534cd0687d87513c759790cf829aa5739184a3e3735471fbda904",
"id": "009a1f293253e41e",
"witness": "{\"signatures\":[\"60f3c9b766770b46caac1d27e1ae6b77c8866ebaeba0b9489fe6a15a837eaa6fcd6eaa825499c72ac342983983fd3ba3a8a41f56677cc99ffd73da68b59e1383\"]}"
}</code></pre><p>In the snippet above, we have an &#8220;amount&#8221;, a &#8220;secret&#8221;, a &#8220;C&#8221; or blind signature from the mint, &#8220;id&#8221;, and &#8220;witness&#8221; field.</p><p>The &#8220;amount&#8221; is the amount of e-cash being spent in the transaction. In this example we have a value of `1`, which would be 1 satoshi for a bitcoin-denominated note.</p><p>The &#8220;secret&#8221; is the receiver's public key.</p><p>When the sender sends the transaction to the mint, the mint produces a blind signature, that is stored in proof &#8220;C&#8221;. Only the recipient can produce a valid signature to unlock the funds sent to their public key.</p><p>Upon coming online, the receiver of the e-cash token produces a signature on the serialized string of data in &#8220;secret&#8221;, which is then added to the witness field.</p><p>In this example, the receiver is unsure if the blind signature in field C is actually a valid signature from the mint. To prove this, we can leverage <a href="https://github.com/cashubtc/nuts/blob/main/12.md">DLEQ</a>, or Discrete Log Equivalence, proofs for each signature. These proofs allow us to verify the mint&#8217;s signature belongs to the mint&#8217;s private key, without having to come online and verify the signature with the mint. The receiver can have confidence that the e-cash token she received is a valid token for the mint.</p><p>This example <em><strong>requires </strong></em>the sender to be <strong>online</strong> to send this P2PK transaction, as the mint needs to produce a blind signature that is locked to the recipient&#8217;s pubkey.</p><h2>Example 2: Offline sender, online receiver</h2><p><em>I made an error when reviewing the Cashu protocol specs. I assumed that a P2PK transaction could be constructed by an offline sender. This is false. Below is a revised example after discussions with Cashu contributors.</em></p><p>Can the reverse of this be true? Can we use the mint to enforce spending conditions of an offline transfer if the <em>sender</em> is offline?</p><p>The short answer is no. Senders cannot construct custom proofs offline. This means they can not construct a P2PK transaction that locks Ecash to a receiver&#8217;s pubkey, or split the denominations of their tokens, while in offline mode.</p><p>But, senders can still send tokens they hold client-side when they are offline. They take the token, send it to the receiver through an offline channel, and then the <em><strong>receiver</strong></em> is responsible for swapping it with the mint. After the receiver performs the swap with the mint, the transaction is considered finalized.</p><p>There is some trust involved. If the receiver doesn&#8217;t immediately redeem a new Ecash token with the mint, the sender could double spend them. So, in a scenario where the sender is offline, receivers should look to finalize the transaction as quickly as possible with the mint.</p><h2>There&#8217;s a few other considerations</h2><p><strong>In both examples, one party needs to be online to finalize the payment</strong>. There are also some other considerations for offline payments:</p><ul><li><p>Users are restricted to the denominations held in their wallets. To split the denominations, you need to directly interact with the mint to create e-cash tokens of different amounts.</p></li><li><p>Users can&#8217;t spend newly received tokens until they come back online and &#8220;melt&#8221; the tokens into their wallet balance.</p></li><li><p>If the mint operator is also offline, we&#8217;re trusting that they have the necessary back ups to come back online.</p></li></ul><ul><li><p>If the mint operator is offline, no transactions between peers can be finalized.</p></li></ul><p>So is Cashu over Bitchat a permanent, &#8220;we&#8217;re offline for months&#8221; solution? Probably not. But in certain circumstances, sending E-cash tokens while offline is a viable option for parties who don&#8217;t have, or don&#8217;t want, access to the internet.</p><p>Example #1: I need to pay my friend for a beer at a concert but I have no cell signal cause there's 10000 people. He went to another stage with less people and had service. So I just message him an E-cash token worth a few thousand sats that he can finalize since he&#8217;s got some service.<br><br>Example #2: A hurricane just hit, and my family doesn&#8217;t have gas for our generator. I need to go into town to get some. I go into town, but I forgot the wallet on my phone doesn&#8217;t have any E-cash &#129318; So I open a chat with my wife, and the merchant, via Bitchat and have her forward the E-cash to the merchant directly. The gas station has power (their generator is on), so they are able to connect to WiFi. The payment gets finalized with the mint and added to the merchant&#8217;s wallet.</p><p>Either way, both of these exchanges can be communicated through Bitchat. No internet connection needed for the sender. And, since connecting through the bitchat mesh network is able to extend an offline party&#8217;s reach, there are dozens of other scenarios where an offline sender, or receiver, could use the Bitchat/Cashu combination to exchange value.</p><h2>But we&#8217;re all friends and family here&#8230; would they really double-spend me?</h2><p>There seems to be some misconceptions around whether one of the participants in an E-cash transaction needs to be online. Yesterday, I thought both parties could be offline. But after chatting with <a href="https://x.com/niftynei">niftynei</a> and <a href="http://primal.net/p/nprofile1qqsfvst7m8feycms4zr5xr70jz6xlwcfa2jgj8hvn0wg06gzv6cz54grfrkq8">Tuma</a>, and looking through the protocol specifications, I was able to see that one of the parties needs to be connected to the mint to ensure that the transaction can finalize (as pointed out above).</p><p>Bitchat enables users to establish secure communication channels with people that they trust: friends, contracts, etc. If you&#8217;re communicating or transacting with parties that you trust, you can continue to transact while both parties are offline. As long as the e-cash tokens aren&#8217;t duplicated, they can theoretically be exchanged completely offline and redeemed, or melted, into a user&#8217;s wallet once reconnected without issues.</p><p>What if wallets embedded in the bitchat application allowed offline-to-offline payments between parties that have secure, verified connections with one another? You&#8217;d have to trust that each party&#8217;s bitchat app wasn&#8217;t saving copies of forwarded tokens, but it&#8217;d work.</p><p>In the hurricane example above, if neither the merchant nor I have an internet connection, we&#8217;d be able to use this fully-offline mode of bitchat to create a transaction for me to pay the merchant. The merchant then communicates with the mint when they regain an internet connection to claim the tokens.</p><p>The sender needs to be honest in this scenario and not double-spend the receiver if the sender comes online first. And, current wallets may not even allow sending unmelted notes. But if it <em>can</em> work, the example above could be a way for peers to transact, fully offline, in a trusted, communal environment.</p><h1>Ack the tradeoffs, enjoy the ride, and hell, use it (if you want)</h1><p>E-cash over Bitchat is a cool experiment. Offline payments are a huge unlock for E-cash, and the synergies with the Bitchat application are promising.</p><p>One of the participants in the transfer needs to be online. Through Bitchat&#8217;s networking capabilities, we can extend the range that the offline party has to make, or receive a payment. This a new frontier; not just for bitcoin, but for the broader payments application space as a whole.</p><p>There&#8217;s an explicit tradeoff that bearer tokens used in E-cash are not native bitcoin. We must follow the developers&#8217; lead and continue to honestly tell users that the protocol is custodial. But using bitcoin off of the mainchain is <em>always</em> about tradeoffs.</p><p>Within certain circumstances, Bitchat and Chaumian E-cash can provide (maybe at times critical) temporary payments infrastructure. It&#8217;s also a user-experience improvement for those who simply don&#8217;t have (or want) an internet or cellular connection for a period of time. Offline mode payments would give them the freedom to transact off-chain in an open, albeit trusted, manner.</p><p>Cashu and Bitchat are not dependent on each other. Both solutions can continue to be developed and gain more adoption, completely irrespective of their counterparts' success.</p><p>But come on, the fact that someone sent an E-cash token through Bitchat makes a kid wonder about the future of fully offline payments.</p><p>And can you blame him?</p>]]></content:encoded></item><item><title><![CDATA[F2Pool and MARA are mining Taproot Annexes]]></title><description><![CDATA[What it is and why it matters...]]></description><link>https://insider.btcpp.dev/p/f2pool-and-mara-are-mining-taproot</link><guid isPermaLink="false">https://insider.btcpp.dev/p/f2pool-and-mara-are-mining-taproot</guid><dc:creator><![CDATA[~nifty~]]></dc:creator><pubDate>Thu, 10 Jul 2025 15:57:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!2Khj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2Khj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2Khj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!2Khj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!2Khj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!2Khj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2Khj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:987548,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://insider.btcpp.dev/i/167927620?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2Khj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!2Khj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!2Khj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!2Khj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d51fa67-b2be-4b09-b32d-2e377f61f10e_1600x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Good afternoon subscribers! <a href="https://x.com/peterktodd/status/1940070152663421272?s=46">Last week, Peter Todd reported that F2Pool is now mining annex-containing transactions</a>, which now brings the total number of known pools mining them to two, including <a href="https://x.com/robin_linus/status/1942678577608286325">MARA</a>. Here&#8217;s a tl;dr on what an annex is and why it&#8217;s worth paying attention to. Got questions? Tag us in a tweet or post on Nostr, and we&#8217;ll get to answering it </em>&#128578;</p><h2>What is an annex?</h2><p>An annex on a house is an additional room for extra space or storage or another dining room. The taproot upgrade that went live in 2021 included an &#8220;annex&#8221; space, which is kind of like a data &#8220;attic&#8221; on a bitcoin transaction. Currently transactions that include annexes aren&#8217;t allowed to be relayed across the network, but if you include one in a block it&#8217;s valid.</p><h2>Where is the annex in taproot?</h2><p>It&#8217;s extra data in the witness stack. You put it at the end of the stack on a taproot spend. It&#8217;s unstructured data and practically unlimited in size. It&#8217;s only available for script path spends.</p><p>From BIP341:</p><blockquote><p>The annex (or the lack thereof) is always covered by the signature and contributes to transaction weight, but is otherwise ignored during taproot validation.</p></blockquote><h2>What&#8217;s the annex for?</h2><p>The annex&#8217;s use cases are unspecified which is to say there&#8217;s no rules or expectations of what to use it for. It&#8217;s basically a big data blob. The Taproot spec authors left it unspecified, but they also made including an annex non-standard. This means you can mine a transaction with an annex in a witness stack, but you can&#8217;t relay it across the normal mempool gossip network. This is where the F2Pool news comes in &#8212; you can send your annex transaction to them directly, and it&#8217;ll get included in a block.</p><p>The annex data is included in the signature for a taproot spend, so they have data security guarantees (no one can edit your annex data).</p><h2>Who&#8217;s this useful for?</h2><p>Anyone who wants witness discount &#8220;unlimited&#8221; data storage on bitcoin. Op-returns have a smaller stack limit (even when removing the 80-byte &#8220;datacarrier&#8221; limit, the maximum allowed for a bare script is 10k bytes[1]) and pay full price per byte. Annex data is a v1 taproot script. There is no limit on the size of v1 taproot witness scripts; instead you can&#8217;t exceed the blocksize limit of 4MB. Annex data is witness data, so it pays 25% of the fees the same data in an op-return or bare script would.</p><p>Another nice thing about using annexes for data is that it directly commits data into the chain, without needing to do the commit and reveal two-transactions step that the Ordinals Inscription protocol uses. It&#8217;s very similar to OP-RETURNs except it&#8217;s lower cost, allows for data up to the blocksize limit, and currently is not allowed to be relayed.</p><h2>Should I use the Annex?</h2><p>It is considered risky to add an annex to your transaction, as future softforks may add meaning to the data blobs in the annex, which may result in your funds being unspendable.</p><p>There&#8217;s a warning to this effect in the specification BIP341:</p><blockquote><p>The annex is a reserved space for future extensions, such as indicating the validation costs of computationally expensive new opcodes in a way that is recognizable without knowing the scriptPubKey of the output being spent. Until the meaning of this field is defined by another softfork, users SHOULD NOT include <code>annex</code> in transactions, or it may lead to PERMANENT FUND LOSS.</p></blockquote><h2>I want to send a transaction with an annex. How can I do this?</h2><p>Use <a href="https://x.com/peterktodd/status/1750019647586320440">Libre Relay</a>, Peter Todd&#8217;s bitcoin-core client with less restrictive relay rules. <a href="https://x.com/rot13maxi/status/1942681750930330055">As rot13maxi notes</a>, however, you&#8217;ll need to set the first byte in the annex to 0x00. You can find the most recent Libre Relay <a href="https://github.com/petertodd/bitcoin/tree/libre-relay-v29.0">code here.</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JSPW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JSPW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png 424w, https://substackcdn.com/image/fetch/$s_!JSPW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png 848w, https://substackcdn.com/image/fetch/$s_!JSPW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png 1272w, https://substackcdn.com/image/fetch/$s_!JSPW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JSPW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png" width="1228" height="570" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:570,&quot;width&quot;:1228,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:124497,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://btcpp.substack.com/i/167927620?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JSPW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png 424w, https://substackcdn.com/image/fetch/$s_!JSPW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png 848w, https://substackcdn.com/image/fetch/$s_!JSPW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png 1272w, https://substackcdn.com/image/fetch/$s_!JSPW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bacad34-e474-4c6b-8fac-5876125e6265_1228x570.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Specific details about the annex can be found the Taproot <a href="https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#rationale">BIP341</a>:</p><p>[1] <a href="https://bitcoin.stackexchange.com/a/117595">https://bitcoin.stackexchange.com/a/117595</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://insider.btcpp.dev/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">btc++ insider edition is a reader-supported publication. Consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item></channel></rss>