I have thousands of UTXOs that were created for experimental purposes back in 2016, programmatically, using P2PKH transactions, each generating hundreds of 10K-ish sat outputs.

Since these are now worth a few thousands $, I'd like to consolidate these outputs (and retrieve them to some wallet for convenience).

However, given the current fee market (on avg, above 50sat/vB, for a while now), each transaction I attempted to build turns out to be super heavy and hence requires paying fees that amount for more than 60% of the total value transacted (or it'd be stuck in the mempool forever).

As far as I understand, because the inputs all have P2PKH scripts, there is no way to use SegWit, Taproot, and so on.

Any suggestion on how to handle this situation?



1 Answer 1


There really is no better answer than "wait for fees to come down". That might not be the most satisfying answer, but fees were below 2 sat/vB only a month ago, and the vast majority of transactions currently sitting in the mempool pay no more than a much more pleasant 12 sat/vB (see mempool.space's fee distribution chart).

Every output created has a predetermined (minimal) spending weight, which for P2PKH is 147 vB (assuming the signature is grinded to 71 bytes). For P2WPKH it's only 67.75 vB, but as you correctly understand, that doesn't make your pre-SegWit outputs any cheaper to spend. Since a transaction's fee is the product of its weight and fee rate, and there's nothing you can do about the weight, your only option is to set a low fee rate.

  • Slightly unrelated theoretical question: Since all these outputs were created using a HD key (non-hardened), wouldn't there be a way to leverage this cryptographically speaking, that is, signing the tx globally with the Master key (parent node) and somehow embed the root derivation path root together with corresponding master pubkey, in the transaction? I understand this is not currently possible with P2PKH, but is there anything like this?
    – nakwa
    Commented Dec 1, 2023 at 12:33
  • 7
    @nakwa Bitcoin transaction inputs require a signature per UTXO spent today. There does exist research into cross-input signature aggregation, which could one day permit spending multiple UTXOs with a single signature (even if they were created with distinct root keys, FWIW). You'd still need a separate input per UTXO though (just not a signature per input), so the cost savings for this top out at ~20% or so. Commented Dec 1, 2023 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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