---
title: "A post-quantum BTC spend costs ~$3 on a 4090"
date: 2026-12-04
url: https://amapel.me/a-post-quantum-btc-spend-costs-3-on-a-4090
x_url: https://x.com/amapel/status/2128647183154942153
tags: ["Crypto", "Security", "Engineering"]
author: Amadeo Pellicce (@amapel)
---

# A post-quantum BTC spend costs ~$3 on a 4090

A post-quantum BTC spend costs ~$3 on a 4090. LFG 🔥

> Quoting [@Dola\_porr](https://x.com/Dola_porr/status/2128410443811086391):
>
> I'm a solo dev and I mine Bitcoin with my own hashrate. I read the PQB paper this week as someone who would have to mine these transactions, and one part kept bothering me.
>
>  So I ran my own study, had some promising findings and wrote a proposal for it.
>
> This is my open sourced study and proposal for a Post-Quantum Bitcoin protocol.
>
> About 6.26 million BTC, roughly 30% of the supply, sits behind keys already visible on chain. Shor's algorithm breaks a visible key. Against a hash, Grover only halves the exponent: 2^128 becomes 2^64. Hashes survive, keys don't.
>
> On 1 December Fireblocks published PQB (Oren Yomtov, building on Binohash and QSB). It locks bitcoin behind hashes with the rules Bitcoin already has. No fork. One 4,696-byte script, 199 of the 201 allowed opcodes. Lock in block 975,813, spend in block 975,838, paid 4,743 sats for 1,508 vB.
>
> The maths, from the paper. A spend solves three hash puzzles, each passing with p = 2^-45.43.
> Owner, one after another: 3 x 2^45.43 = 1.4 x 10^14 tries. About 8 hours on one RTX 4090, about $3.
> Thief, all three on one try: (2^45.43)^3 = 2^136.28. Minus log2(6 x 12 x 4) = 8.17 for the key forms: 2^128.1 classical, 2^64.05 with Grover.
> I ran it at toy size, three 5-bit puzzles: owner 95.9 tries, thief 33,294.7. Theory says 96 and 32,768.
>
> What bothered me: the spend is valid but can't travel the network.
>
> It breaks four relay rules, so it never enters the public mempool.
> It has to be handed to a miner. By default that is one pool's private endpoint.
> A miner on stock node software can't include one. That is me.
> The fee is fixed, so an ignored holder can't bid higher.
> After a reorg it's the same door with the same bytes. A second, different spend drops 2^64.05 to 2^44.94.
> The one design the paper found that does relay costs about $269k per spend.
>
> So I wrote the road to the block
>
> Enter PQB Open Relay
>
> Recognise the one PQB script byte for byte.
> Accept and mine: for that script alone, relax exactly those four rules. Any miner, pool or solo, can include it.
> Relay between opted-in nodes, with two peer slots kept for each other.
> Hold the spend through a reorg, so the holder never resends.
> Opt-in, off by default, no consensus change.
>
> Why two slots. A node dials 8 peers. With a share p opted in and random peers, an opted-in node has about 16p opted-in neighbours. A random network needs that above 1, so p \> 1/16 = 6.25%. My model of 2,000 nodes agrees: 5% opted in reaches 2.1%, 10% reaches 32.1%, 20% reaches 83.5%. With two reserved slots it reaches 100% from 1% upward.
>
> The repo has the proposal, a checker that recognises both mainnet transactions and refuses look-alikes, and both models.
>
> Next I want AI agents working on it constantly: hunting look-alike scripts, checking every new PQB lock on chain, re-running the numbers when a new quantum result lands. Then the node patch and the Bitcoin developers.
>
> If you run a node or mine like I do, check my maths and tell me where it breaks.
>
> pqbhash.tech
>
> github.com/Dolaporr/pqb-o…
