Glossary

Witness Discount

The witness discount is a SegWit feature that counts witness data at one-quarter weight, incentivizing use of Taproot and other witness-based spending.

Key Takeaways

  • The witness discount is a fee pricing rule introduced by SegWit (BIP 141) that charges witness data at 1 weight unit per byte instead of 4, giving it a 75% discount relative to non-witness data.
  • The discount reflects the true cost to the network: witness data (signatures and scripts) is validated once and discarded, while non-witness data grows the UTXO set that every node must keep in memory.
  • Combined with Taproot and Tapscript, the witness discount makes P2TR spends the cheapest input type and is also what makes inscriptions economically viable.

What Is the Witness Discount?

The witness discount is a two-tier fee structure in Bitcoin that assigns different costs to different parts of a transaction. Non-witness data (version, inputs, outputs, locktime) counts at 4 weight units per byte, while witness data (signatures, public keys, witness scripts) counts at just 1 weight unit per byte. This means witness bytes are effectively 75% cheaper than non-witness bytes when calculating transaction fees.

Introduced as part of the Segregated Witness soft fork in August 2017 (block 481,824), the witness discount replaced Bitcoin's original flat fee model where every byte cost the same regardless of its impact on network resources. The change was designed to align transaction fees with the actual costs that different data types impose on nodes.

The discount is not applied directly during fee calculation. Instead, it is embedded in the weight unit system. Fees are denominated in satoshis per virtual byte (sat/vB), and virtual bytes are derived from weight (weight / 4). Since witness bytes contribute fewer weight units, they translate into fewer virtual bytes and therefore lower fees.

How It Works

BIP 141 defines a transaction's weight using the following formula:

Transaction weight = Base size × 3 + Total size

Where:
  Base size  = transaction serialized WITHOUT witness data (bytes)
  Total size = transaction serialized WITH witness data (bytes)

This formula is mathematically equivalent to multiplying non-witness bytes by 4 and witness bytes by 1:

weight = (non-witness bytes × 4) + (witness bytes × 1)

// Proof:
// base_size × 3 + total_size
// = base_size × 3 + (base_size + witness_size)
// = base_size × 4 + witness_size

The block weight limit is 4,000,000 weight units. A block filled entirely with non-witness data would max out at 1 MB (1,000,000 bytes × 4 WU = 4 MWU), preserving backward compatibility with the old 1 MB block size limit. A block consisting entirely of witness data could theoretically reach approximately 4 MB. In practice, real blocks contain a mix and typically fall between 1.6 and 2.3 MB.

Weight Multipliers by Field

Transaction FieldMultiplierCategory
Version×4Non-witness
Input count×4Non-witness
Outpoints and scriptSig×4Non-witness
Output count×4Non-witness
Output values and scriptPubKey×4Non-witness
Locktime×4Non-witness
Marker and flag (SegWit)×1Witness
Witness stack (signatures, keys)×1Witness

Fee Calculation Example

Consider a transaction with 116 non-witness bytes and 110 witness bytes:

Weight   = (116 × 4) + (110 × 1) = 574 WU
Vbytes   = 574 / 4 = 143.5 vB
Raw size = 226 bytes

// Without the discount (flat pricing):
// 226 bytes × fee_rate = full cost
// With the discount:
// 143.5 vB × fee_rate = ~36% cheaper

The 110 witness bytes effectively count as only 27.5 virtual bytes instead of 110, saving the user significant fees. For a deeper look at how fees interact with block space demand, see Bitcoin fee market dynamics.

Why the Discount Exists

The witness discount was not an arbitrary subsidy. It was designed to correct a long-standing misalignment between transaction fees and actual resource costs. Under Bitcoin's original flat-rate model, every byte cost the same regardless of its impact on the network. This created perverse incentives.

UTXO Set Growth

The UTXO set is the database of all unspent transaction outputs that every full node must keep in memory for fast validation. Transaction outputs grow this set, while inputs (which spend UTXOs) shrink it. Under flat pricing, creating many small outputs was no more expensive than spending them, even though creating outputs imposes a persistent storage cost on every node.

The witness discount makes input-heavy transactions (which reduce UTXO bloat) relatively cheaper, because inputs carry large signatures that now benefit from the discount. Output-heavy transactions (which increase UTXO bloat) see a smaller benefit, since outputs consist mostly of non-witness data.

Validation Asymmetry

Witness data (primarily signatures) is validated once when a transaction enters the mempool and once more during block validation. After that, it serves only as a historical audit trail. Pruned nodes can discard witness data entirely without affecting their ability to validate new transactions. Non-witness data, by contrast, must be retained indefinitely because it defines the UTXO set.

Concrete Impact

A 2-of-3 multisig transaction spending 3 inputs with 2 outputs (net effect: reducing the UTXO set by 1) drops from roughly 25,710 satoshis to 8,130 satoshis under the witness discount. A transaction with 2 inputs and 3 outputs (net effect: growing the UTXO set by 1) sees a smaller reduction from 18,990 to 12,045 satoshis. The discount realigns incentives so that UTXO-reducing transactions become relatively cheaper.

Impact on Address Types

The witness discount directly determines the relative cost of different Bitcoin address types. Because newer address formats place more data in the witness, they benefit more from the discount:

FormatInput Cost (vB)Fee Savings vs Legacy
P2PKH (Legacy)148Baseline
P2WPKH (Native SegWit)68.25~54% cheaper per input
P2TR (Taproot)57.75~61% cheaper per input

P2TR inputs are the cheapest because Schnorr signatures (BIP 340) are exactly 64 bytes (fixed size), compared to ECDSA signatures that vary between 71 and 73 bytes. All of this signature data sits in the witness and benefits from the 75% discount. For multi-input transactions like UTXO consolidation, Taproot's smaller input size dominates and delivers the largest savings.

For a comprehensive comparison of how these address types evolved, see the research article on Taproot and Schnorr signatures.

Use Cases

Lower Fees for Everyday Transactions

Any wallet using native SegWit (bech32) or Taproot addresses automatically benefits from the witness discount. Users pay lower fees without needing to understand the underlying weight mechanics. This is the most widespread impact of the discount: billions of dollars in cumulative fee savings across millions of transactions since 2017.

Cheaper Complex Scripts

Complex spending conditions like multisig, timelocks, and hash locks produce large witness data. The discount makes these advanced Bitcoin Script patterns practical by reducing their cost. Without the discount, HTLCs in Lightning channels and multi-party signing schemes would be significantly more expensive.

UTXO Management

The discount incentivizes UTXO consolidation during low-fee periods. Because each additional input carries discounted witness data, combining many small UTXOs into a single output costs less per input than it would under flat pricing. This helps wallets manage their UTXO sets efficiently and reduces long-term pressure on the global UTXO database.

The Inscription Consequence

The witness discount had an unintended side effect that reshaped Bitcoin's block space market. In January 2023, Casey Rodarmor launched the Ordinals protocol, which embeds arbitrary data (images, text, code) into Bitcoin transactions using the witness field.

Inscriptions exploit the witness discount by placing data inside an OP_FALSE OP_IF ... OP_ENDIF envelope within a Tapscript spend path. Because this data sits entirely in the witness, it costs only 1 weight unit per byte instead of 4. A 100 KB image inscription consumes approximately 100,000 weight units (25,000 virtual bytes), paying roughly 75% less than if the same data were placed in non-witness space.

Two Taproot changes enabled this: the removal of the 10,000-byte script size limit in BIP 342 (Tapscript validation rules), and the introduction of script-path spends in BIP 341. Combined with the pre-existing witness discount, a single transaction can theoretically embed up to approximately 4 MB of data. At peak adoption in 2023, inscription-related transactions consumed over 50% of Bitcoin's block space. For more on how this changed block space economics, see the research on block space demand and the evolution of Ordinals and BRC-20.

Risks and Considerations

Block Space Subsidization

Critics argue that the witness discount subsidizes large witness payloads at the expense of non-witness transactions. Because inscription data receives the full 75% discount, data-heavy transactions can fill blocks while paying relatively low fees per byte of actual data stored. This means nodes must download, validate, and store more data per unit of fee revenue.

Cannot Be Changed Easily

The witness discount is a consensus rule. Modifying it would require a soft fork (to make it stricter) or a hard fork (to relax it). Proposals to adjust the discount ratio have surfaced in community discussions, but any change would affect the economics of every existing address type and every application built around current fee assumptions.

Misunderstood Fee Calculations

The two-tier weight system can confuse users and developers who expect a simple bytes-times-fee-rate calculation. A transaction's raw size in bytes does not correspond directly to its fee. Tools that display raw transaction size rather than virtual bytes can lead to incorrect fee estimates.

Incentive Debate

While the discount was designed to incentivize UTXO set reduction, inscriptions create a new dynamic where large witness payloads are used for data storage rather than signatures. Some argue this undermines the original incentive alignment, since inscription witnesses do not reduce the UTXO set. Others view the fee market competition as healthy for miner revenue and network security.

This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.