These days, many developers are attempting to establish their own fork of the world's largest cryptocurrency. Though many enthusiasts eagerly wait to get their hands on "free money," depending on how a fork is implemented, there can be serious security and financial drawbacks.
This article will help you understand how to stay safe and secure during a Bitcoin Fork, and will also in the process guide you through Replay Protection, and important forking concept to understand.
We'll cover hard forks through these sections:
Let's hop in!
The original creator of cryptocurrencies, who goes by Satoshi Nakamoto, first published the code for Bitcoin almost a decade ago. However, the code has largely been left unchanged since, with only minor changes which are still completely backwards-compatible.
However, what happens when a developer wants to introduce change? Depending on the type of the proposed change, either a soft fork or a hard fork would occur.
A fork in general refers to a "splitting of paths." Think of a trail in the forest, where the road suddenly forks into two paths— something very similar happens in the blockchain.
A soft fork is when changes that are optional are applied to the blockchain. Segregated Witness (SegWit) was a soft fork, because though the changes are now available for everyone, not everyone needs to use it. Though many miners do mine SegWit blocks, not all of them do.
Soft forks allow those who aren't updated for the fork to still utilize the blockchain and work normally. Soft forks generally don't change major features because those may not be backwards-compatible. SegWit was backwards-compatible in that non-SegWit miners and non-SegWit users could still use Bitcoin without updating, and it didn't require a hardware/software update.
Hard Forks seem to be the most popular ones, and also seem to cause the most chaos or disagreement. Here's a diagram of all of the planned soft and hard forks:
When there isn't consensus, a new cryptocurrency might form out of the new fork, which is what happened with the Bitcoin Cash (BCH) fork. The developers of hard forks generally add radical new features that are not backwards-compatible, from blocksize increases to a change of the mining algorithm.
However, an important feature that some choose to ignore is something called "replay protection". Let's explore this in the next section.
Replay Protection is an important feature that distinguishes cryptocurrencies born out of hard forks.
In general, Bitcoin Transactions are relayed as text that contains the recipient, sender, and the amount.
They also contain a signature, or *witness from the sender that tells the blockchain the sender is who they say they are, and transactions are identified by their SHA-256 hash.
However, the format of the transaction for the Bitcoin blockchain is very particular. Only if a transaction follows that particular format (let's call it the BTC Format) can get accepted by the blockchain. However, if any valid transaction follows the BTC format, it can be sent to a miner on the blockchain and confirmed/verified.
Replay protection basically means that the forked cryptocurrency has a different transactional format than the original one. This means that transactions from the forked cryptocurrency are completely invalid on the original chain, and vice-versa.
If a fork does not have replay protection, users can be seriously harmed when sending coins. The upcoming Bitcoin Gold (BTG) fork currently does not have implemented replay protection, so we'll use it as an example.
Say I have 2 BTC in my wallet, and I receive 2 BTG through the forking process. Now, I send 0.5 BTC to an exchange. I sign my transaction, and relay it on the blockchain.
Now, a replay attacker or hacker decides that he wants to relay my BTC transaction on the Bitcoin Gold blockchain as well.
Thus, he copies the public transaction Send 0.5 BTC from me to exchange from the BTC blockchain, and broadcasts it to the Bitcoin Gold chain.
However, Bitcoin Gold doesn't have replay protection! This means the transaction format is the same for both BTC and BTG, and the Gold blockchain accepts the attacker's broadcast. Effectively, now both 0.5 BTC and 0.5 BTG have been transferred to the recipient/exchange address, even though I didn't intend to transfer the 0.5 BTG as well.
However, things would be even worse if I meant to transfer the BTG, and the attacker relayed my BTG transaction onto the BTC chain. This would mean I would lose 0.5 BTC rather than BTG, and with BTC at nearly $6000 right now, that would leave me in lots of trauma!
I highly recommend reading @mooncryption's comment below this post, for a sidenote on the Bitcoin Gold (BTG) fork coming soon.
The Bitcoin Cash (BCH) fork did have replay protection, so let's model using that fork. Suppose I transfer 0.5 BCH from my wallet to the exchange.
An uneducated replay attacker attempts to replay my BCH transaction on my BTC wallet. (which, if it worked, would send 0.5 BTC to the exchange as well!) However, BCH does have replay protection, meaning its transaction format is slightly different from BTC's.
This means that the BTC blockchain and BTC miners wouldn't accept the replayed transaction, and my BTC is safe.
In this section, let's go over some tips to keep your coins secure and to stay safe during forks.
In general, don't make transactions on either chain a few hours before and up to a few days after the fork. Your transactions may become invalid or may be used maliciously, and you may end up losing coins! Additionally, don't make any purchases or sells during forks, even though it might be tempting to do so.
If the fork does not have replay protection, avoid making transactions until instructions are given. If you create a transaction on one chain, it might become accepted on the other, effectively spending your coins on both chains.
To avoid this, you need to split your coins. You can click here for a detailed how-to on splitting your fork coins in case this happens.
After you've split your coins, you're safe from any attempted replay attacks and can begin creating transactions on either chain. A lot of people immediately sell their forked coins without splitting or waiting for instructions, and replay attackers can prey on these people by replaying their transaction on the other chain, effectively emptying their pockets of all cryptocurrency.
Lastly, look to your wallet provider for information regarding the hard fork. If your wallet provider did not give any information or press releases on the subject, try contacting them. For the upcoming Bitcoin Gold (BTG) fork, @mooncryption's comment below this post should serve as a good outline.
Bitcoin's forks can cause a lot of chaos and disagreement in the cryptocurrency community, with lots of developers announcing their own ideas on how to make Bitcoin "better." These forks, if unorganized, can lead to lots of financial loss. Remember to follow the above tips to keep all of your cryptos safe during any forks!
Thanks for reading,
— @mooncryption