TeachMeBitcoin

Fee Savings and the Discount

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

Nested SegWit: Fee Savings and the Discount

The main reason users switched to Nested SegWit was the Economic Incentive. By using the Witness field, users could pack more transactions into a single block and pay fewer "Sats per Byte" on average.

1. The Weight Calculation

SegWit introduced the concept of Weight Units (WU).

2. Comparing P2PKH vs. Nested SegWit

In a standard P2PKH spend, the signature and public key are in the ScriptSig, costing 4 WU per byte. In a Nested SegWit spend, those same bytes cost only 1 WU per byte.

Transaction Component P2PKH Cost Nested SegWit Cost
Transaction Header 4 WU/byte 4 WU/byte
Outputs 4 WU/byte 4 WU/byte
Signatures 4 WU/byte 1 WU/byte
Public Keys 4 WU/byte 1 WU/byte

3. Real-World Impact

On average, a Nested SegWit transaction is about 25% cheaper than a Legacy transaction. For a user making hundreds of transactions, this adds up to significant savings. It also allowed the network to process more transactions per block, effectively increasing the "Block Size" without actually changing the 1MB limit for legacy nodes.

4. The "Nested" Tax

Nested SegWit is slightly more expensive than Native SegWit (Bech32).

Type Virtual Size (vByte) Avg. Fee Savings
Legacy 148 vB 0%
Nested 110 vB ~25%
Native 104 vB ~30%

In the final section, we will build a Python Nested SegWit Auditor.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!