In software development, a fork is a branching or splitting of code into separate projects. Cryptocurrency forks happen all the time, and there’s generally nothing to worry about.
As all blockchain projects (what is blockchain?) involve software of some kind, that’s what we mean when we talk about forking. By forking a project, you are taking a copy of the code at a specific moment in time, and then building on that code as a separate project.
An example of a fork is Bitcoin and Bitcoin Cash. Bitcoin Cash started from the Bitcoin codebase, but now runs as an independent project. Any changes made to Bitcoin do not transfer across to Bitcoin Cash, and each set of tokens are separate.
Forking doesn’t have to be a bad thing. Many companies fork their own software. This could be to maintain support for two very different operating systems, for example, or to maintain an old or outdated version alongside a more up-to-date version.
Cryptocurrency forks are no different to any other software fork. For example, developer A believes a blockchain project should do X, but developer B believes it should do Y. If X and Y are too far removed from each other, developer A or B may choose to make a fork. Each developer can go and develop their own features without interfering with each other.
Forks may also happen with risky or experimental features.
If the developers get along with each other, or an agreement or compromise occurs, the forked version may merge back into the original code later on, or the original code might be abandoned in favor of the new, forked code.
This all sounds good, but what’s it got to do with cryptocurrency users like you and me? Well, as many cryptocurrency projects are open source, forks can and do happen all the time—sometimes for legitimate reasons (like improved speed or security), sometimes for selfish reasons (like making mining easier on certain hardware).
Hard Forks vs. Soft Forks in Cryptocurrency
A soft fork often involves minor code changes. This could be terminology or changes which don’t alter the way a given blockchain operates. Soft forks are often non-intrusive and can co-exist alongside the unforked version.
With soft forks, miners may choose to switch to the new code. As there are no major changes, any nodes running older software should still be able to accept blocks generated by the new nodes—however, new nodes will reject blocks generated by old nodes. If enough miners switch to the forked version, there won’t be enough nodes on the old code to get any transactions processed. The new nodes would all reject the blocks by the old nodes, forcing them to switch over.
Here’s where it gets problematic: If a soft fork is risky or unpopular, miners may not switch to it. If only a minority of nodes run the new code, it may die out and get replaced in the code.
A hard fork is often much more troublesome. Hard forks usually need the whole network to switch over to the new code. If some nodes were to run the unforked code, the nodes may generate data in different ways and fall out of sync. While it is possible to run hard-forked and unforked nodes on the same blockchain together, it’s rarely done. Each set of nodes would reject each other, and you’d get into a heap of trouble.
So much trouble, in fact, that blockchain developers may insist that every node upgrades to the fork. This is often done at a date in the future after the mining of a specific block. This allows every node time to upgrade.
If a hard fork happens in the code but some developers disagree with the change, things can get messy. The miners themselves may find themselves in the middle of a bitter battle and be forced to pick a side. If things get really bad, a brand new project may arise—based on the original code, with the changes made by the hard fork. The unforked code continues as it always has, and the hard forked code has to start again.
This is called a chain split, and such a divorce of code can often be bad news. The original project may lose supporters, nodes, or financiers to the hard-forked project, but the new project may also need to find a source of revenue or a collection of nodes to run the network. This bitter battle rarely ends well for either party.
When a chain split happens, the developers may choose to keep a copy of the records alongside the code, meaning anyone who has tokens on the original network will also have tokens on the new network. Free cryptocurrency may sound awesome, but there are some potential hazards that can severely impact such a project.
Without careful fork management, network users may be able to double spend coins. If a transaction happens before the fork but does not get recorded until after the fork, you may have tokens on the new network which were not present on the old network. For this reason, most hot wallets, exchanges, and nodes will stop processing transactions for a small maintenance window before and after the designated forking time.
If you’re using your own secure cryptocurrency wallet, you may need to migrate your coins depending on the fork.
Cryptocurrency Forks: Wrapped Up
One of the core values behind public, open-source cryptocurrency projects is security. Forking often increases security, but hard forks can be problematic.
If you’re a cryptocurrency user, you often won’t have anything to worry about. If you’re a miner running your own nodes, then you’ll need to keep track of the project’s development status and current community consensus.
What are your experiences with forking? Maybe you’ve been running a node when a fork happens, or perhaps you’re the person on the development team making the fork. Let us know in the comments section below!