Skip to content
Crypto.world

The Ledger

Bitcoin census puts 35.6% of unspent BTC behind public keys or scripts

A Delving Bitcoin post counts 7,164,754.12 BTC in unspent outputs whose public key or script is already public at block 975,019. It breaks down the total by output type and reports counts of keys reused across types.

Bitcoin census puts 35.6% of unspent BTC behind public keys or scripts

A Bitcoin census puts 7,164,754.12 BTC, or 35.6% of the 20,109,207.36 BTC in unspent outputs at block 975,019, in outputs whose public key or script is already public, according to a Nov. 18 post on Delving Bitcoin. The analysis was posted by duncan0k and follows an earlier proposal for classifying exposure in existing outputs.

How the census classifies outputs

The post measures unspent outputs at block 975,019, with BTC amounts rounded to 0.01 BTC. Its tally combines outputs where a public key or script appears in the analysis’s tables with output types counted as public by their form. The post says exact amounts and output counts are available on its method page.

The classification varies by output type. P2PKH and P2WPKH count when their program appears in pubkey_hash_index.bin; P2SH counts when its program appears in that index or script_hash_index_20.bin. A P2WSH program must appear in script_hash_index_32.bin. P2TR, P2PK and bare multisig count because their key is in the output script, while other forms do not count.

The post says the tables contain hashes derived from public keys published on chain and from revealed scripts. P2PK, P2TR and bare multisig account for 1,937,232.46 BTC of the exposed total. The remaining 5,227,521.66 BTC—about 73% of the total—is in P2PKH, P2WPKH, P2SH and P2WSH outputs that qualified through a table match.

Breakdown by output type

P2PKH has 4,502,293.81 BTC in unspent outputs, of which 1,162,510.91 BTC, or 25.8%, meets the post’s public-key-or-script test. P2WPKH has 8,310,066.71 BTC unspent and 2,137,831.72 BTC counted, a 25.7% share.

For P2SH, the figures are 3,678,167.10 BTC unspent and 1,177,704.69 BTC counted, or 32.0%; that row includes nested P2WPKH. P2WSH has 1,678,829.15 BTC unspent, with 749,474.34 BTC counted, or 44.6%.

All of the 222,545.28 BTC in P2TR outputs and all of the 1,714,618.81 BTC in P2PK outputs are counted under the rules. Bare multisig has 68.36 BTC unspent and 68.36 BTC counted. The “Other” category has 2,618.15 BTC unspent and none counted.

Reuse counts and limits

The post also reports counts of keys paid to under multiple output forms. It found 40,385 keys paid to as both P2PK and P2PKH. The largest pair, P2PKH and P2WPKH, had 189,857 keys in any encoding on either side; 5,011 keys were paid to as P2PKH or P2WPKH in both compressed and uncompressed form.

Those counts cover public keys found on chain by block 975,019, counted once per x-coordinate and matched in all six encodings. A key counts for an output form if any output, spent or unspent, ever paid to it in that form. Same-hash reuse was measured only for unspent outputs: 6,927 distinct 20-byte hashes had unspent outputs under both P2PKH and P2WPKH, holding 93,972.89 BTC in all. Those BTC are already included in the output-type totals.

For 3,301 of those hashes, holding 49,154.61 BTC, the tables had no match; the post says a spend from either form would put the key on chain for both. The author cautions that the census’s rules differ from the EXPOSED_AT_REST category in the BIP 362 draft, with differences in both directions and some cases not measured. The post says it cannot determine whether the draft’s definition would count more or less.

As a check on uncounted outputs, the author reports sampling 250 each of P2PKH, P2WPKH, P2SH and P2WSH outputs. None in the sample had a scriptPubKey spent from at or before block 975,019; the post gives a one-sided 95% upper bound of 1.19% for each type. It describes this as a sample, not a full pass, and says the check used a public Esplora API independent of the tables.

The post links the code, extraction rules and result files. It says a full rescan reproduced the tables byte for byte in about 3.9 hours, reading blocks on a Bitcoin Core node’s best-chain list. Producing the UTXO figures requires a dumptxoutset at block 975,019, in snapshot format version 2 written by Bitcoin Core v28.1.0.

Sources

  1. Original source Delving Bitcoin delvingbitcoin.org

Related stories

Explore

More articles