Soft fork vs. hard fork: Differences explained

<p dir="ltr">Cryptocurrencies like Bitcoin (<a href="">BTC</a>) and Ethereum (<a href="">ETH</a>) are powered by a decentralized open-source software called a blockchain. A fork is a change to the blockchain&rsquo;s underlying protocol. A blockchain fork is an important upgrade to the network and can either represent a radical change or a minor one and can be initiated by developers or community members.</p>

<p dir="ltr">It requires node operators &mdash; machines connected to the blockchain that help validate transactions on it &mdash; to upgrade to the latest version of the protocol. Every node has a copy of the blockchain and ensures new transactions do not contradict its history.&nbsp;</p>

<p dir="ltr">A hard fork is a radical upgrade that can make previous transactions and blocks either valid or invalid and requires all validators in a network to upgrade to a newer version. It&rsquo;s not backward-compatible. A soft fork is an upgrade to the software that is backward-compatible and has validators in an older version of the chain see the new version as valid.</p>

<p dir="ltr">Effectively, a hard fork, more often than not, leads to a permanent chain separation, as the old version is no longer compatible with the new version. Those holding tokens on the old chain are granted tokens on the new one as well because they share the same history. Hard forks can happen for a number of reasons.&nbsp;</p>

<h2 dir="ltr">Understanding hard forks</h2>

<p dir="ltr">To understand what a hard fork is, it&rsquo;s essential to first understand blockchain technology. A blockchain is essentially a chain made out of blocks of data that work as a digital ledger in which each new block is only valid after the previous one has been confirmed by the network validators. Data on the blockchain can be traced all the way back to the first-ever transaction on the network. This is why we can still see the<a href=""> first</a> block on the Bitcoin blockchain.&nbsp;</p>

<p dir="ltr">A hard fork is essentially a permanent divergence from a blockchain&rsquo;s latest version, leading to a separation of the blockchain, as some nodes no longer meet consensus, and two different versions of the network are run separately.</p>

<p dir="ltr">This essentially means that a fork is created on the blockchain where one path keeps following its current set of rules, while the second path follows a new set of rules. A hard fork is not backward compatible, so the old version no longer sees the new one as valid.</p>

<p dir="ltr">Hard forks are often seen as dangerous because of the chain split that often occurs. If a split occurs between the miners who secure the network and the nodes that help validate transactions, the network itself becomes less secure and more vulnerable to attacks.</p>

<p dir="ltr">A common way to undertake malicious action against a blockchain would be to perform a 51% attack, which is when a cabal of miners manages to have over 51% of the computing power that secures a network and use it to alter the blockchain&rsquo;s history. Some networks created as a result of hard forks have, in fact, suffered numerous 51% attacks where <a href="">bad actors double-spent the same funds.</a> These attacks have bad actors leveraging their superior computing power in the network to reorganize blocks, allowing them to double-spend.</p>

<p dir="ltr">Another vulnerability that&rsquo;s possible with hard forks is replay attacks. Replay attacks occur when a malicious entity intercepts a transaction on a forked network and repeats that data on the other chain. Hard forks without replay attack protection see both transactions become valid, meaning someone can move another users&rsquo; funds without controlling them.</p>

<h2 dir="ltr">Why do hard forks happen?</h2>

<p dir="ltr">If hard forks can drastically reduce the security of a blockchain, why do they happen at all? The answer is simple: Hard forks are upgrades that are necessary to improve the network as blockchain technology continues to evolve. Several reasons can be behind a hard fork, and not all of them negative:</p>

    <li aria-level="1" dir="ltr">
    <p dir="ltr" role="presentation">Add functionality</p>
    <li aria-level="1" dir="ltr">
    <p dir="ltr" role="presentation">Correct security risks</p>
    <li aria-level="1" dir="ltr">
    <p dir="ltr" role="presentation">Resolve a disagreement within a cryptocurrency&rsquo;s community</p>
    <li aria-level="1" dir="ltr">
    <p dir="ltr" role="presentation">Reverse transactions on the blockchain</p>

<p dir="ltr">Hard forks can also happen by accident. Often, these incidents are swiftly resolved and those that were no longer in consensus with the main blockchain fall back and adhere to it after realizing what had happened. Similarly, hard forks adding functionalities and upgrading the network usually allow those who fall out of consensus rejoin the main chain.</p>

<h2 dir="ltr">Accidental hard forks</h2>

<p dir="ltr">The Bitcoin blockchain has seen many accidental hard forks throughout its history. These are more common than one would think and are often resolved so quickly that they are barely noteworthy.</p>

<p dir="ltr">Most accidental hard forks occur whenever two miners find the same block at nearly the same time. As consensus on the network is distributed, both initially see the block as valid and keep mining on different chains before they or another miner adds a subsequent block.</p>

<p dir="ltr">That subsequent block dictates which chain becomes the longer one, meaning that the other is abandoned to maintain consensus. Miners move on to the longest chain since the abandoned one is no longer be profitable for mining Bitcoin on, as they would be mining a fork of the network.</p>

<p dir="ltr">When these forks happen, the miner who found the abandoned block loses coinbase and transaction fee rewards. However, no transactions would be invalidated as both blocks found were identical and contained the same transactions.</p>

<p dir="ltr">Other accidental hard forks were part of code issues that led to short-chain splits. In 2013, for example, a block with a larger number of total transaction inputs than previously seen was mined and broadcasted, while some nodes did not process it,<a href=""> leading</a> to a split. The issue was resolved after some nodes downgraded their software to reach consensus and reject this larger block.</p>

<h2 dir="ltr">Difference between hard forks and soft forks</h2>

<p dir="ltr">Hard forks are not the only way to upgrade the software behind a cryptocurrency. Soft forks are, by contrast, seen as a safer alternative that is backward compatible, which means that nodes that do not upgrade to newer versions will still see the chain as valid.</p>

<p dir="ltr">A soft fork can be used to add new features and functions that do not change the rules a blockchain must follow. Soft forks are often used to implement new features at a programming level.</p>

<p dir="ltr">To better understand the difference between hard forks and soft forks, it can be thought of as a basic operating system upgrade on a mobile device or a computer. After the upgrade, all the applications on the device will still work with the new version of the operating system. A hard fork, in this scenario, would be a complete change to a new operating system.</p>

<h2 dir="ltr">Notable hard fork examples</h2>

<p dir="ltr">There are numerous historical examples of hard forks in the cryptocurrency world and not all of them happened with the Bitcoin blockchain. Here are some of the most popular hard forks in history and how they influenced the industry.</p>

<h3 dir="ltr">SegWit2x and Bitcoin Cash</h3>

<p dir="ltr"><a href="">SegWit2x was a proposed upgrade</a> designed to help Bitcoin scale. It was set to implement Segregated Witness (SegWit) and increase the block size limit from one MB to two MB on the cryptocurrency&rsquo;s network.</p>

<p dir="ltr">The implementation of SegWit2x was decided in the controversial New York Agreement reached on May 23, 2017. The agreement saw that a number of Bitcoin business owners and miners representing over 85% of the network&rsquo;s hash rate decided the future of BTC behind closed doors.</p>

<p dir="ltr">SegWit would be implemented through a soft fork, while the block size limit would be implemented through a hard fork later on. The proposal was controversial because it did not include any developer behind the main codebase of Bitcoin, Bitcoin Core, and was seen as a centralizing force &mdash; a group of businesses deciding the fate of the network without miners and nodes reaching consensus. The agreement came after years of debate on scaling Bitcoin.</p>

<p dir="ltr">Small block proponents argued that larger blocks would make it harder to host a full node, potentially centralizing the cryptocurrency. Those who supported larger blocks argued that BTC&rsquo;s rising transaction fees would harm its growth and price some users out of the network.</p>

<p dir="ltr">On Bitcoin&rsquo;s network, user-activated soft forks are possible. In this scenario, wallet operators, exchanges and other businesses running full nodes can move to a new version of the blockchain that will have an activation point in the future, forcing miners on a network to &ldquo;fall in line&rdquo; and activate the new rules. If they don&rsquo;t, the network could end up splitting.</p>

<p dir="ltr">Bitcoin users<a href=""> campaigned for a user-activated soft fork</a> at the time, in response to the closed-door meeting dictating the future of Bitcoin and to stop a precedent from being set. They called for <a href="">implementing</a> the<a href=""> </a>Bitcoin Improvement Proposal (BIP) 148, which sought to implement SegWit on the Bitcoin network and argued that SegWit2x was a contentious hard fork that made the network vulnerable to a replay attack. It was released in March 2017 and was set to be implemented on August 1, 2017.</p>

<p dir="ltr">Fearing that the SegWit2x plan would not be fulfilled and seeing the community support SegWit, some big-block supporters decided to fork the Bitcoin blockchain on August 1, 2017. The result was the creation of Bitcoin Cash (<a href="">BCH</a>). Its supporters did not see the split as the creation of a rival network, but rather as the continuation of Satoshi Nakamoto&rsquo;s original vision.</p>

<p dir="ltr">The Bitcoin Cash blockchain was created with an eight MB block size that has since increased to 32 MB. To this day, Bitcoin Cash supporters maintain that its low transaction fees will help it scale and bank the unbanked, believing BTC will be left behind because of its larger transaction fees.</p>

<p dir="ltr">The Bitcoin Cash hard fork saw the possibility of a hard fork enter the limelight, and shortly after, numerous other Bitcoin forks were created. These include Bitcoin Gold (BTG), Bitcoin Diamond (BTCD) and others.&nbsp;</p>

<h3 dir="ltr">The DAO Hack</h3>

<p dir="ltr"><a href="">Another major historical hard fork</a> was associated with<a href=""> </a>the decentralized autonomous organization (DAO) that was launched in 2016 on the Ethereum network. Ethereum runs a set of smart contracts, which are essentially chunks of code that automatically execute whenever a set of criteria has been met. These contracts make money programmable and are behind decentralized finance applications (DApps).</p>

<p dir="ltr">At the time, the DAO raised $150 million worth of ETH in one of the earliest crowdfunding efforts in crypto, before the initial coin offering (ICO) craze of 2017. It was essentially an early iteration of the decentralized governance models DeFi protocols use, wherein token holders vote on the future of the protocol.</p>

<p dir="ltr">After its launch, the DAO was hacked for $60 million worth of ETH from 11,000 investors. At the time,<a href=""> Ethereum was trading below $10</a>, so around 14% of all circulating Ether was invested in the DAO, and the hack was a major blow to confidence in the network.</p>

<p dir="ltr">A debate within the Ethereum community ensued, as everyone scrambled to figure out how to respond to the attack. Initially, Ethereum founder Vitalik Buterin proposed a soft fork that would blacklist the attacker&rsquo;s address and prevent them from moving the funds.</p>

<p dir="ltr">The attacker, or someone posing as them &ndash; responded to the community claiming the funds had been obtained in a &ldquo;legal&rdquo; way and in accordance to the smart contract&rsquo;s rules. They claimed they were ready to take legal action against anyone who tried to seize the funds. Tensions rose as the attacker said they would thwart soft fork attempts by bribing ETH miners with the funds.</p>

<p dir="ltr">Debate once again ensued until a hard fork was proposed. The hard fork was ultimately implemented and it rolled back the Ethereum network&rsquo;s history to before the DAO attack occurred, reallocating the stolen funds to a smart contract where investors could withdraw their funds.</p>

<p dir="ltr">The move was extremely controversial, and in the eyes of some, affected the blockchain&rsquo;s censorship resistance and immutability: Investors were, in their eyes, being bailed out. Those who saw things this way rejected the hard fork and supported an earlier version of the network, now known as Ethereum Classic (<a href="">ETC</a>).&nbsp;</p>

<h3 dir="ltr">Hashrate Wars: ABC vs. SV</h3>

<p dir="ltr">Bitcoin Cash was created through a hard fork of the Bitcoin blockchain in August 2017, and would later split into two networks as groups within its community feuded. On one side, there was Bitcoin Cash ABC (BCHA), a development team trying to improve the technology behind it. On the other side, there was Bitcoin Cash SV (<a href="">BSV</a>), a team supported by self-proclaimed &ldquo;Satoshi Nakamoto&rdquo; Craig Wright, trying to raise the block size from 32 MB to 128 MB.</p>

<p dir="ltr">At block 556,767, the blockchain split in two, and the<a href=""> battle for the BCH ticker symbol began</a>. Miners on both sides deployed every resource they could to have a hash-rate advantage over the other. Many were calling for a 51% attack on the other network to reorganize its blocks, so its proponents would be forced to move to their side.</p>

<p dir="ltr">Cryptocurrency exchanges and other businesses revealed that they would attribute the BCH ticker to the blockchain that came out on top. Some mining pools diverted all of their resources to the hash wars, with Bitcoin Cash ABC ultimately having majority of the hash rate and fending off any 51% attack attempts. It later claimed the BCH ticker on exchanges and other services, with the other network choosing BSV as its ticker.</p>