6

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.

  • 1
    Interesting question! Note, that a P2PKH input is 147 or 148 byte: How big is the input of a P2PKH transaction? – Murch Mar 7 '17 at 10:16
  • 1
    Yes, 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 Mar 7 '17 at 13:27
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.

  • 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 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
  • 1
    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 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.