What is SegWit?

Segregated Witness (SegWit) is an update of the protocol developed in 2015. This concept was presented as a solution to the scaling problems that blockchain networks have faced and continue to face.

On average, the Bitcoin network verifies every 10 minutes a new block, each of which contains several transactions. Thus, the block size affects the number of transactions that can be confirmed in each block. Currently, the Bitcoin blockchain can handle about 7 transactions per second.

The main idea behind SegWit is to reorganize data in a block so that signatures are kept separate from transaction information. In other words, the SegWit update consists of separating witnesses (signatures) from transaction data. This allows more transactions to be stored in a single block by increasing network bandwidth.

Since Bitcoin can only handle about 7 transactions per second, processing a transfer on the network can sometimes take a long time compared to traditional payment solutions and financial networks that can handle thousands of transactions per second.

SegWit was developed in 2015 by Bitcoin developer Pieter Wuille along with other members of Bitcoin Core. In August 2017, the SegWit update was implemented as a soft fork on the Bitcoin network.

Today, several cryptocurrency projects use SegWit, including Bitcoin and Litecoin. The protocol upgrade brought many benefits, such as improved transaction speed and block capacity. In addition, SegWit solved the so-called transaction malleability (flexibility) bug (discussed below).


The benefits are provided in SegWit

Increase in bandwidth

One of the main advantages of SegWit is the increase in block capacity. Due to the removal of signatures from transaction data at the output, it is possible to fit a larger number of transactions in one block.

Transactions consist of two main components: inputs and outputs. Essentially, the input data contains the public address of the sender, and the output data contains the public address of the recipient. However, the sender must prove that he has the funds to be transferred and he does so with a digital signature.

Without SegWit, these signatures can occupy up to 65% of the entire block. SegWit allows signatures to be removed from incoming transaction data. This increases the block capacity from 1 MB to about 4 MB.

Note that SegWit does not involve increasing the size of the block itself. This is an engineering solution that allows you to use the entire potential of the block without the need to increase its current size (which is possible only in the case of a hard fork). The actual block size is still 1 MB, but the effective block size will be 4 MB.

SegWit also introduced the idea of ​​block weight. We can consider the weight of a block as a concept that replaces ideas about its dimensions. Essentially, block weight is a measurement that contains all of the block's contents, including transaction data (1MB) and signatures (up to 3MB), which are no longer part of the input field.


Increasing the speed of transactions

With a block that can store more transactions, SegWit can also increase the speed of transactions as more transactions can pass through the blockchain. Although mining a block may take the same amount of time, it processes more transactions, so the TPS size is higher.

The increased speed of transactions has also helped reduce operational costs on the Bitcoin network. Before the update, you usually had to pay more than $30 per transaction. SegWit has dramatically reduced the fee to less than $1.


➟Want to start trading cryptocurrency? Buy Bitcoin (BTC) on Binance!


Correction of plasticity of transactions

One of the main problems with Bitcoin was the ability to forge the cryptographic signature of a transaction. If even the smallest change is made to the signature, it can lead to corruption of the identifier, which will accordingly affect the entire transaction between the two parties. Since the data stored in the blockchain is practically immutable, such transactions can remain forever in its history.

SegWit signatures are no longer part of the transaction data, which eliminates the possibility of changing this data. This patch allowed for continued innovation in the blockchain community, including the Layer 2 protocol and smart contracts.


SegWit і Lightning Network

The development of layer 2 protocols was made possible in part by eliminating transaction plasticity. In simple terms, second layer protocols are new platforms or products built on top of a blockchain such as Bitcoin. One of the most popular second-layer protocols is the Lightning Network and the off-chain micropayment network.

The Lightning Network is a second layer protocol that runs on top of the Bitcoin network. The main goal of the Lightning Network is to allow more transactions to be confirmed in a shorter amount of time, allowing users to exchange cryptocurrency faster. Transactions are collected and buffered outside the main blockchain for further processing on the Bitcoin network.

The Lightning Network was originally designed for Bitcoin. However, several other cryptocurrency and blockchain projects are working on implementing this technology for their networks. This will not only reduce the time of transaction confirmation, but also contribute to the development of new solutions to the problem of scalability.


SegWit video SegWit2x

SegWit is a soft fork of backwards compatibility updates. In other words, Bitcoin nodes not updated to include SegWit can still process transactions. However, there was another proposed SegWit implementation called SegWit2x (S2X) that required a hard fork update.

The main difference between SegWit and SegWit2x is that the hard fork variant not only changes the transaction batching order, but also increases the block size (from 1 MB to 2 MB). Such changes may increase the load on nodes and miners, due to the processing of larger volumes of data.

Another notable difference is that the SegWit update was supported and implemented by the Bitcoin community. Such an event created a concept called UASF (from the English User-activated soft fork), which means a soft fork activated by users.

On the other hand, SegWit2x proposed a significant change to one of the fundamental rules governing the operation of Bitcoin. But since the developers were never able to come to a consensus on the adoption and implementation of the update, the development of SegWit2x was eventually put on hold.


Nested SegWit vs. Native SegWit (bech32)

In short, Native SegWit (also known as bech32) is an updated version of Nested SegWit. The bech32 format offers increased transaction speed, better error detection mechanisms, and even lower transaction fees. Also, bech32 addresses are lowercase, making them easier to read.

Note that blockchain transactions between non-SegWit (Legacy), Nested SegWit and Native SegWit (bech32) addresses are fully compatible. However, not all exchanges and crypto wallets support SegWit, so you won't be able to withdraw funds directly to a SegWit address.

Binance exchange supports SegWit deposits and withdrawals for Bitcoin (BTC). You can find more information in the SegWit FAQ.


Results

The implementation of SegWit marked the biggest update to the Bitcoin protocol, and the fact that it was supported and implemented by a decentralized community makes it even more interesting.

The SegWit soft fork was an important step in solving many problems related to Bitcoin and other blockchain networks, especially scalability problems. Thanks to the combination of SegWit and second-layer protocols, blockchains can more efficiently process more transactions at a lower cost.

Despite the fact that this is a powerful and innovative solution, not all network members have fully upgraded at this time. Now, the percentage of Bitcoin addresses using SegWit is around 53%.