A fork can be described as a change in the code of an open source project. There are three types of forks cryptocurrency traders should be aware of; code forks, soft forks and hard forks.
A code fork is simply a modified copy of a cryptocurrency protocol.
For example, Litecoin is a code fork of Bitcoin since it shares the same code base and has similar features, but is an entirely separate network and protocol. When Litecoin was launched, individuals had to either mine litecoins or buy them and were not distributed to bitcoin holders.
A soft fork is a backwards compatible upgrade. For instance, Segregated Witness (SegWit) was implemented as soft fork, meaning that the change to the Bitcoin protocol was compatible with older versions.
The block size limit of 1MB for Bitcoin was also introduced with a soft fork, as well as Check Lock Time Verify (which allowed bitcoins to be locked to be spent after a certain period).
A soft fork does not involve the creation of a new blockchain or coin. The protocol is simply being upgraded with a new feature or being fixed in some way.
A hard fork refers to a change in the code that makes previous versions of the protocol incompatible with the upgraded version.
Hard forks are used to implement upgrades in cryptocurrency but they are risky because the whole ecosystem should transfer over to the new version, otherwise two blockchains arise from one. If a ledger is split into two, this also means there is a native asset for each chain.
However, if there is no support for an older version of a blockchain and all of the nodes support the new rules, then a hard fork is considered successful, and will not result in the creation of a new cryptocurrency.
Two examples of hard forks in cryptocurrency are:
- The DAO hack which resulted in Ethereum hard forking to reverse the DAO hack and resulted in the continuation of the old Ethereum chain, which eventually evolved into Ethereum Classic. This resulted in the creation of a new coin (Ethereum Classic) which was credited at a one-to-one ratio to each holder of ether.
- The Bitcoin-Bitcoin Cash split. In reaction to the SegWit upgrade on the Bitcoin network, a user activated hard fork was initiated to maintain the old Bitcoin chain without SegWit. This resulted in the creation of a new coin (bitcoin cash) which was credited at a one-to-one ratio to each bitcoin holder.