Fork
A fork is a change to a blockchain's protocol rules, creating either a temporary or permanent divergence in the chain's transaction history.
Key Takeaways
- A fork occurs when a blockchain diverges into two potential paths, either temporarily (when two miners find a block simultaneously) or permanently (when protocol rules change). Forks are how decentralized networks upgrade and resolve disagreements.
- Hard forks break backward compatibility and can split a chain into two separate cryptocurrencies, while soft forks tighten rules in a backward-compatible way that keeps the network unified.
- Forks serve as the ultimate governance mechanism in decentralized systems: when a community cannot reach consensus, any group can fork the chain and pursue a different vision.
What Is a Fork?
A fork is a divergence in a blockchain's transaction history, where the chain splits into two or more branches. The term borrows from open-source software development, where "forking" means copying a codebase and developing it independently. In blockchain, a fork produces two versions of the ledger that share a common ancestor block but follow different rules or contain different transactions going forward.
Forks can be accidental (a natural byproduct of distributed block production) or intentional (a deliberate change to protocol rules). They range from momentary events that resolve in minutes to permanent chain splits that create entirely new cryptocurrencies. Understanding forks is essential for anyone holding, building on, or operating infrastructure for a blockchain network.
How It Works
Every blockchain operates by a set of consensus rules that determine which blocks and transactions are valid. When all participants agree on the same rules and the same chain history, there is a single canonical chain. A fork happens when this agreement breaks, whether by accident or by design.
Accidental Forks
Accidental forks occur when two or more miners solve the proof-of-work puzzle and broadcast valid blocks at nearly the same time. Different nodes on the network receive different blocks first and temporarily follow different chain tips. On Bitcoin, this happens roughly every 60 blocks.
These temporary forks resolve naturally through the longest chain rule (more precisely, the chain with the most cumulative proof-of-work). Whichever branch receives the next block first becomes the canonical chain, and the competing block becomes a stale block. Transactions from the abandoned block return to the mempool for inclusion in a future block. No funds are lost.
Intentional Forks: Hard vs. Soft
Intentional forks are deliberate changes to a blockchain's consensus rules. They come in two forms:
| Property | Hard Fork | Soft Fork |
|---|---|---|
| Compatibility | Not backward-compatible | Backward-compatible |
| Node upgrade | All nodes must upgrade | Only miners must upgrade |
| Rule change | Loosens or changes rules | Tightens or adds rules |
| Chain split risk | High (creates new chain if contentious) | Low (old nodes still accept new blocks) |
| New cryptocurrency | Possible (e.g., Bitcoin Cash) | No |
A hard fork changes the consensus rules so that blocks valid under the new rules are invalid under the old rules. Non-upgraded nodes reject the new blocks and continue following the old chain. If both chains retain miners and users, two permanent blockchains result.
A soft fork tightens existing rules: blocks valid under the new rules are still valid under the old rules, but not vice versa. Non-upgraded nodes continue to accept new blocks without knowing the rules have changed. This makes soft forks less disruptive but limits the scope of changes they can introduce.
The Fork Choice Rule
When competing branches exist, nodes need a way to decide which chain is canonical. This algorithm is called the fork choice rule. Bitcoin uses the heaviest chain rule, selecting the chain with the most cumulative proof-of-work. Ethereum (post-Merge) uses LMD-GHOST combined with Casper FFG, following the subtree with the most validator attestation weight.
Notable Examples
Bitcoin Cash: Contentious Hard Fork
On August 1, 2017, at block height 478,558, Bitcoin Cash (BCH) split from Bitcoin over a disagreement about scaling. Bitcoin Cash increased the block size limit from 1 MB to 8 MB (later raised to 32 MB), while Bitcoin pursued scaling through SegWit and Layer 2 solutions like the Lightning Network.
Every Bitcoin holder at block 478,558 received an equivalent amount of BCH controlled by the same private keys. This "free coins" effect became a defining feature of contentious hard forks, though the combined value of both assets often remained close to the original's pre-fork price.
SegWit: Backward-Compatible Soft Fork
Segregated Witness activated on Bitcoin at block 481,824 on August 24, 2017. Defined in BIP 141, SegWit moved signature (witness) data outside the base block, effectively increasing capacity without changing the block size limit. Because it only tightened rules (treating new transaction formats as valid within existing constraints), non-upgraded nodes continued operating normally.
SegWit's activation path was notably complex, involving BIP 9 miner signaling, BIP 91 (a lowered threshold compromise), and the threat of BIP 148: a user-activated soft fork where node operators would enforce new rules regardless of miner signaling. This demonstrated that Bitcoin governance involves a balance among miners, developers, and node operators. For a deeper history, see the soft fork activation history research article.
Ethereum Classic: The DAO Fork
On June 17, 2016, an attacker exploited a reentrancy vulnerability in The DAO smart contract, draining approximately 3.6 million ETH (around $60 million at the time). On July 20, 2016, at block 1,920,000, the Ethereum community executed a hard fork that reversed the theft by moving funds from the attacker's contract into a recovery contract.
Those who rejected this intervention on the grounds that blockchains should be immutable continued the original, unaltered chain as Ethereum Classic (ETC). This fork crystallized a fundamental debate: should a blockchain community intervene to undo theft, even when doing so violates the principle of immutability?
How Forks Affect Token Holders
When a hard fork creates a permanent chain split, the entire UTXO set (or account state) is duplicated. Holders of the original asset end up with equivalent balances on both chains, controlled by the same private keys. This has several practical implications:
- Wallet support: users need wallets that support the new chain to access forked coins. Major exchanges typically credit users automatically.
- Replay attacks: because both chains share transaction history and address formats, a transaction broadcast on one chain can be replayed on the other if no replay protection exists. Bitcoin Cash implemented strong replay protection; SegWit2x (a proposed fork that was ultimately cancelled) did not, which was a major factor in its failure.
- Price discovery: forked assets undergo rapid price discovery as markets determine their independent value. The combined value of both assets often approximates the original's pre-fork price initially.
- Tax implications: many jurisdictions treat forked coins as taxable income at the time of receipt, creating compliance obligations for holders.
Governance Implications
In decentralized systems with no central authority, forks serve as the ultimate governance mechanism. They provide an exit right: when a community cannot agree, any group can fork the chain and pursue a different direction. This preserves the voluntary nature of participation that distinguishes blockchains from centralized systems.
The Bitcoin scaling debate of 2015 to 2017 illustrated the power dynamics at play. The SegWit2x proposal (the "New York Agreement") was backed by a majority of miners and dozens of companies, yet it was cancelled on November 8, 2017, because it lacked broader community consensus and full node operator support. This demonstrated that no single constituency: not miners, not companies, not developers: can unilaterally change Bitcoin's rules.
The high coordination costs of forks (exchanges must add support, wallets must update, users must choose sides) act as a natural check against frivolous changes. This friction is a feature: it ensures that only changes with broad support actually happen on the canonical chain.
Forks and Layer 2 Solutions
Forks primarily affect the base layer (Layer 1), but they have significant implications for Layer 2 protocols built on top. Lightning Network channels, for example, rely on the base chain for settlement. A contentious hard fork that splits the base chain could force Layer 2 operators to choose which chain to support or maintain infrastructure on both.
Layer 2 solutions like Spark reduce the need for contentious base layer changes by moving transaction throughput off-chain. By handling payments and state transitions at a higher layer, these protocols can evolve without requiring the base chain to fork.
Risks and Considerations
Network Fragmentation
Contentious forks split not just the chain but the community: developers, miners, users, and economic activity. Both resulting chains may end up weaker than the original. The Bitcoin/Bitcoin Cash split fragmented development resources and community attention for years.
Replay Attacks
Without proper anti-replay protection, transactions on one fork can be replayed on the other, potentially causing unintended fund transfers. Users must exercise caution when transacting on newly forked chains, especially before replay protection is confirmed.
Security Reduction
In proof-of-work chains, a fork that splits the mining hashrate leaves both chains more vulnerable to 51% attacks. The minority chain faces the greatest risk, as it retains less computational security. Ethereum Classic suffered multiple 51% attacks in 2019 and 2020, partially attributable to its lower hashrate relative to Ethereum.
Ecosystem Disruption
Forks impose costs on the entire ecosystem. Exchanges must decide whether to list the new asset. Wallet providers must add chain support. Smart contract developers may need to redeploy. Payment processors must handle potential confusion between assets sharing similar names and addresses.
This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.