How many UTXOs have a marginal fee cost that's higher than its worth?

5

4

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

Posted 2017-03-07T04:50:50.283

Reputation: 7 067

1

Interesting question! Note, that a P2PKH input is 147 or 148 byte: How big is the input of a P2PKH transaction?

Murch 2017-03-07T10:16:22.260

1Yes, that's for compressed pubkey. Uncompressed would be 32 more, which is 179 or 180, so I suppose it's impossible to tell which is which. Same with p2sh, which can have any redeemScript with compressed or uncompressed keys. An estimate is fine, though.Jimmy Song 2017-03-07T13:27:17.913

Answers

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

Posted 2017-03-07T04:50:50.283

Reputation: 1 532

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 2017-06-21T16:38:47.210

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 2017-06-21T17:24:24.190

@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 2017-06-21T17:43:41.593

I mean, it's not impossible, since other transaction types do exist. But it would be surprising if true.Nate Eldredge 2017-06-21T17:50:34.663

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 2017-06-21T18:46:40.180

2Random 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 2017-06-26T01:07:07.857