5

I define marginal fee cost as the number of bytes required to add that UTXO as an input to a TX multiplied by the satoshi/byte rate of the blocks being found.

So for a normal p2pkh UTXO, this would currently be roughly 180 bytes (number of bytes this UTXO would take up in a TX as an input) * 200 satoshi/byte, or 36000 satoshi. So the answer would be however many UTXOs exist that are 36000 satoshi or below for p2pkh. Essentially, I want to know how many UTXOs are currently in the UTXO set that would not be worth redeeming should the fees be above a certain satoshi/byte.

I would like this data at 100 satoshi/byte, 200 satoshi/byte, 300 satoshi/byte, 500 satoshi/byte and 1000 satoshi/byte.

Jimmy Song
  • 7,759
  • 17
  • 35

1 Answers1

3

Here are the results at block 472236

Processed 41823253 P2PKH txouts

  • Fee is 0 satoshi/byte: 41823253 txouts are spendable having total value 12504138.52 BTC
  • Fee is 50 satoshi/byte: 28693175 txouts are spendable having total value 12503686.97 BTC
  • Fee is 100 satoshi/byte: 21753912 txouts are spendable having total value 12502819.35 BTC
  • Fee is 200 satoshi/byte: 16426255 txouts are spendable having total value 12501503.34 BTC
  • Fee is 300 satoshi/byte: 14808011 txouts are spendable having total value 12500784.29 BTC
  • Fee is 500 satoshi/byte: 13208366 txouts are spendable having total value 12499668.03 BTC
  • Fee is 1000 satoshi/byte: 10998782 txouts are spendable having total value 12496954.83 BTC

This output was generated using a fork of bitcointools. This script reads utxo from .bitcoin/chainstate directory of a bitcoin node. Feel free to fork/use the script to generate related data later.

dark knight
  • 2,017
  • 9
  • 25
  • That's a great collection of stats. Going back to the original question, how many txouts are less than what's now the typical transaction fee? – MrJLP Jun 21 '17 at 16:38
  • Hm. Are you saying that the grand total of P2PKH txouts is 7.4 million BTC? Given that about 16.4 million BTC have been mined, that's surprising. – Nate Eldredge Jun 21 '17 at 17:24
  • @NateEldredge You are right. There seems to be an error in calculating the value, the number of txouts is correct https://p2sh.info/dashboard/db/pay-to-pubkey-hash-statistics?orgId=1. I am checking the script for errors. Will update in sometime – dark knight Jun 21 '17 at 17:43
  • I mean, it's not impossible, since other transaction types do exist. But it would be surprising if true. – Nate Eldredge Jun 21 '17 at 17:50
  • Fixed the error in value decompression method https://github.com/shivaenigma/bitcointools/commit/fb97687b9f67ab4af2caa5fb65f088e04208ee27 and updated the post. Results now match stats from other sources – dark knight Jun 21 '17 at 18:46
  • 2
    Random request: it would also interesting to see the total number of utxos in each category (to get a feeling how many bytes in the database are effectively dead weight). – Pieter Wuille Jun 26 '17 at 01:07