Overview
The witness discount is a key feature of Segregated Witness (SegWit) that applies a 75% discount to witness data when calculating a transaction's "weight" for fee and block size purposes. Non-witness data counts at 4 weight units per byte, while witness data counts at 1 weight unit per byte. This creates an economic incentive for wallets to use SegWit transaction formats and effectively increases the block's transaction capacity.
Weight Calculation
Weight Units Calculation:
Non-witness data: 1 byte = 4 weight units (WU)
Witness data: 1 byte = 1 weight unit (WU)
Block weight limit: 4,000,000 WU (4 MWU)
Example transaction (250 bytes total):
Non-witness data: 150 bytes × 4 = 600 WU
Witness data: 100 bytes × 1 = 100 WU
Total weight: 700 WU
Equivalent legacy transaction (250 bytes total):
All data: 250 bytes × 4 = 1,000 WU
SegWit tx uses 30% less block weight for same byte size!
Why the Discount Exists
The witness discount was designed to address several goals simultaneously:
-
Backward compatibility: By introducing a weight-based system rather than simply increasing the block size limit, SegWit maintained backward compatibility as a soft fork. Non-upgraded nodes see blocks within the old 1 MB serialized size limit.
-
UTXO set protection: Creating outputs (which become part of the UTXO set stored by every node) costs more weight than providing witness data (which is only needed during verification). This correctly aligns costs with the long-term burden on the network.
-
Incentivized adoption: By making SegWit transactions cheaper in terms of fee rate, users and wallets are economically motivated to adopt the new format.
Effective Block Size Increase
The witness discount means that a block full of SegWit transactions can contain more transaction data than a block full of legacy transactions:
- Legacy-only blocks: Maximum ~1 MB of transaction data
- SegWit blocks: Maximum ~2-2.3 MB of actual data (with a typical mix of transaction types)
- Theoretical maximum: ~4 MB if a block consisted entirely of witness data (unrealistic but the mathematical upper bound)
Impact on Fees
Users who send from SegWit addresses (P2WPKH, P2WSH, P2TR) benefit from lower fees because their transactions consume fewer weight units. The savings are most significant for transactions with many inputs, as signature data (the largest component of witness data) scales with the number of inputs.
Common Misconceptions
The witness discount does not mean witness data is "free" or unimportant. It is still transmitted, stored, and validated by all full nodes. The discount is an economic mechanism that adjusts the relative cost of different data types to better reflect their impact on the network.