What is behind the SegWit discount?

SegWit Resources
1 min readJan 10, 2017

--

Witness scripts are “discounted” because their cost to the network is less than the rest of the transaction data. Unlike outputs they do not go into the UTXO set, and do not need to be maintained on disk or in RAM for fast processing of future transactions.

To better understand, here is an example:

Consider that you have three unspent outputs in your wallet, two of 0.5 BTC and one of 1 BTC. Someone requests a payment from you for 0.75 BTC. As of today, a typical wallet will attempt to minimize fees and split the 1 BTC output to send 0.75 BTC to your recipient and create a change address. They do so because under the current protocol, it takes more bytes to spend a transaction than to split a transaction and therefore is more expensive. From the perspective of the network though, combining the 0.5 BTC outputs (using two inputs) is preferable because it defrags the UTXO set.

The discount balances those input consumption bytes and output creation bytes so there is no longer a financial incentive to create dust which is bad for UTXO bloat.

--

--

SegWit Resources

An information page about Bitcoin’s segregated witness soft-fork