Cryptocurrencies exist in a decentralised network called the blockchain. A fork is a change in the underlying protocol of a particular blockchain. It amounts to an essential upgrade of the network and can represent minor or major changes to the network. This upgrade can be initiated either by developers or members of the network, which makes this technology open source. There are both hard and soft forks. Sometimes, but not always, a fork leads to a permanent separation of the blockchain, resulting in a new cryptocurrency deriving from the original protocol.
What is a soft fork?
In blockchain technology, a soft fork is a change in the protocol whereby the rules become stricter. Because the old nodes will also recognise the blocks made according to the new rules as valid, a soft fork is backward compatible.
Suppose a particular blockchain says that all blocks must be red. All the nodes will therefore check whether the blocks are red. At some point, a soft fork is initiated: from now on, all blocks must be red and have a perfectly square shape. Nodes that have received this update check every block for their red colour and perfectly square shape. Old nodes that have not received this update will continue to check for the red colour and will also approve these new blocks, because for the old nodes it is only important that a block is red.
A typical example of a soft fork is the addition of a new type of transaction to the network. Only the participants (senders and receivers) and the miners must understand the new type of transaction. A soft fork can also happen by accident. If miners use non-upgraded nodes, a temporary split in the blockchain can occur because these minders are violating a new consensus rule that their nodes do not yet know about.
Since all blocks that have accepted the soft fork follow both the new rules and the old rules, it is not necessarily necessary for all nodes to update to maintain consensus. This is why old customers are also accepted in a soft fork, as long as they at least follow the old rules. Soft forks cannot be reversed, as a soft fork by definition only allows the set of valid blocks to be a correct (stricter) subset of what was a valid (less strict) pre-fork. This kind of fork only requires a majority of miners to upgrade and thus enforce the new rules. The more miners accept the new rules, the safer the network will be. If 75% of miners recognise the soft fork, it is not guaranteed that the remaining 25% will follow the new rules. It is therefore possible that 25% of the blocks are valid for the old nodes that do not know about the new rules, but these blocks will be ignored by 75% of the nodes that do respect the new rules.
What is a hard fork
A hard fork is a permanent deviation from the current blockchain and leads to a separation of the blockchain because some nodes no longer comply with the new rules. This creates two different versions of the network that are executed separately.
A hard fork is by definition not backward compatible. Suppose a particular blockchain says that all blocks must be red and perfectly square. All the nodes will therefore check whether the blocks are red and have a perfectly square shape. At some point, a hard fork is initiated: from now on, all blocks must only be red. From now on, nodes receiving this update will only check each block for its colour, not its shape.
However, old nodes that have not received the update will still check for colour and the perfectly square shape. The old nodes will therefore reject blocks that are not square, even though this rule has actually been removed from the network. The old nodes are no longer compatible with the new system. Two different paths are created, as it were: one path that continues to follow the current set of rules and one path that follows the new set of rules.
Dangers of a hard fork
Hard forks are often seen as dangerous because of the frequent breakage of the blockchain. If a split occurs between the miners securing the network and the nodes helping validate transactions, the entire network becomes less secure and more vulnerable to attack.
A 51% attack is a well-known way of gaining control of a blockchain network. If a group of miners decide to carry out a hard fork, it is possible that after the split they suddenly have 51% of all miners under their control, which means they can control and manipulate the entire blockchain.
Replay attacks are also a danger when performing a hard fork. If a fraudulent miner intercepts a transaction on the forked network and repeats it at a later date, the miner is performing a replay attack on the network. If a hard fork has no additional replay protection, it will approve both transactions as valid. This way, someone can move coins from another user without checking them.
What is the difference between a hard and soft fork?
Basically, a fork means a change to the software underlying a cryptocurrency. This can be done with a hard fork or a soft fork. The difference is in the way the fork is constructed.
A soft fork is considered a safer method, as it is backward compatible. However, a soft fork is limited in its possibilities, as it has to be backward compatible. The upgrade should only bring about changes that do not fundamentally alter the rules that a blockchain must follow. A soft fork can be seen as a new upgrade of a device’s operating system, for example if you update your computer from Windows 7.1 to Windows 7.2. After the update, the old applications, such as Microsoft Word or Acrobat Reader, will still work on the device with the new operating system. Thus, the old nodes that did not receive the update still remain compatible with the network. A soft fork only needs a majority to be implemented.
A hard fork is a change that alters the basic rules of the system. The entire operating system is thrown overboard and a new operating system is installed, for example a major update from Windows 7 to Windows 10. With such an update, the programs on your computer should also be updated. A hard fork requires that all nodes accept and execute the fork. Nodes that do not accept the hard fork will not be compatible with the new network from then on. This creates a split in the blockchain.
With such serious drawbacks, why are hard forks still performed? Because the blockchain needs them. Hard forks are upgrades that the blockchain needs to improve the network. Blockchain technology is still evolving every day. This means that every day new innovations are developed to which the blockchain must be adapted. A good reason to perform a hard fork is, for example, to resolve a security risk, to add important new functionalities, or to reverse previously performed transactions, although the latter is very controversial.
Key examples of hard forks
Below are the two main examples of hard forks that have occurred in the past.
SegWit2x and Bitcoin Cash
SegWit2x was a proposed update designed to help scale Bitcoin. The fork was intended to implement Segregated Witness (SegWit) on the network and increase the block size limit from one MB to two MB. The intention was to implement SegWit via a soft fork and later increase the block size limit via a hard fork.
The implementation of SegWit2x was decided in the New York Agreement on 23 May 2017. The agreement is controversial because it allowed a number of Bitcoin owners and miners who collectively held more than 85% of the network’s hash rate to decide the future of Bitcoin behind closed doors.
Bitcoin users campaigned for a soft fork at the time, in response to the closed-door meeting that dictated Bitcoin’s future and to avoid setting a precedent. They called for the implementation of Bitcoin Improvement Proposal (BIP) 148, which sought to implement SegWit on the Bitcoin network, and argued that SegWit2x was a controversial hard fork that made the network vulnerable to a replay attack.
On 1 August 2017, it was decided to fork the Bitcoin blockchain. The fork came in response to the desire to create larger blocks, and reflected the community’s fear that the SegWit2x plan would not be implemented. The result was the creation of Bitcoin Cash (BCH). The users behind the hard fork did not see the split as a new network, but as a continuation of Satoshi Nakamoto’s original vision.
The DAO Hack and Ethereum Classic
A second important hard fork in the history of cryptocurrencies is related to a decentralised autonomous organisation (DAO). The DAO was launched on the Ethereum network in 2016. In 2016, the DAO raised over $150 million, about €133 million, in ETH through crowdfunding. Crowdfunding was still prevalent at the time, before initial coin offerings (ICOs) became popular in 2017.
After the launch of DAO, it was immediately hacked for $60 million in ETH from 11,000 investors. The hack caused a major breach of trust within the community. A debate followed within the Ethereum community. Ethereum founder Vitalik Buterin proposed a soft fork to blacklist the address of the hacker(s) so that they could no longer move the money. The hacker(s) responded by stating that they had obtained the money legally by following the rules of the DAO.
Once again, debate ensued within the community and it was finally decided to perform a hard fork to reverse the history of the Ethereum network just prior to the DAO hack. The stolen money was thus returned to the investors. The hard fork was controversial because it could be interpreted as an attack on the immutability of the blockchain and extreme protection measures for investors. Users who interpreted the hard fork in this way did not agree to the hard fork and remained loyal to the earlier version of the network. The earlier version was renamed to Ethereum Classic (ETC).
A fork is a change to the software underlying a cryptocurrency. This change can be implemented with a soft fork or with a hard fork. A soft fork is, as it were, an upgrade to the operating system and therefore, by definition, also backward compatible. Nodes that do not implement the upgrade are still compatible with the network. A hard fork, on the other hand, is not backward compatible. The change in software can be compared to switching to a completely new operating system. Each node must therefore accept the hard fork, otherwise they will no longer be compatible with the new network. If they do not, the blockchain will split.
A fork is performed to make a change to the software. This may be to add new functionalities, resolve previous security risks, or reverse executed transactions.