1

How much transaction fee will Segwit embedded inside P2SH save fee compared to P2PKH?


Update 1

I found a similar question.

or they can be nested in a legacy P2SH 3... address which are backwards-compatible (although less efficient)

He said less efficient. I want to know how much? Transaction size will be smaller than normal...?

How do transaction costs compare between Bech32 addresses and legacy Bitcoin addresses?


Update 2

I found another one. I'm reading it.

SegWit transaction fee/byte


Update 3

The following page describes block weight. P2SH is used in the example. I think P2SH-wrapped segwit addresses has benefit for cheaper transaction.

Block weight

https://en.bitcoin.it/wiki/Block_weight

Someone posted the following table. I don't know if it is correct or not. But seems segwit(p2sh) has benefit than I expected.

Quick table. Sizes in bytes (virtual bytes for segwit, including the segwit discount)

enter image description here

How do I calculate my fees for a transaction sent from a Segwit address?

https://www.reddit.com/r/Bitcoin/comments/7m8ald/how_do_i_calculate_my_fees_for_a_transaction_sent/

Murch
  • 75,206
  • 34
  • 186
  • 622
zono
  • 1,935
  • 1
  • 20
  • 35

1 Answers1

3

Spending a P2PKH output in an input of a transaction requires 4 * (36 + 1 + 1 + 33 + 1 + 72 + 4) = 592 weight units. Spending a P2SH-P2WPKH in an input of a transaction requires 4 * (36 + 1 + 1 + 22 + 4) + 1 + 33 + 1 + 72 = 363 weight units. Thus, given the same fee rate in BTC per weight unit, it will be cheaper to spend from a P2SH-P2WPKH output than it is to spend from a P2PKH output.


He said less efficient. I want to know how much? Transaction size will be smaller than normal...?

P2SH-P2WPKH (P2SH nested segwit) is not less efficient than P2PKH (non-segwit). It is less efficient than P2WPKH (native segwit).

Ava Chow
  • 70,382
  • 5
  • 81
  • 161