theymos

Legendary



Offline



Activity: 3878

Merit: 7918







AdministratorLegendaryActivity: 3878Merit: 7918

[Guide] Handling splits: UASFs, BIP148, etc. July 10, 2017, 06:32:40 PM

Last edit: August 18, 2017, 08:01:27 AM by theymos Merited by ETFbitcoin (1), HabBear (1) #1 Although it is very undesirable, it is possible for Bitcoin to split into two non-negligible separate currencies.



Why is this possible? / What causes a split?



There is no actual BTC in your Bitcoin wallet: there are only private keys which are used to unlock and then transfer ownership of BTC stored in the Bitcoin system. BTC never actually leaves the Bitcoin system. A split creates a clone of the original cryptocurrency, but with modifications preventing the two cryptocurrencies from actually being the same; after the split, you cannot send coins from one side of the split to the other. After the split, your private key can be used to unlock your coins on both the original system and the modified system.



It's like if someone got their hands on a copy of the google.com database and created super-google.com starting with the google.com database but with different features. You could use the same login credentials to login at either google.com or super-google.com. But after the clone was created, if you received mail.google.com email, it would not show up at mail.super-google.com, and vice-versa. Similarly, you can use the same private key to spend money on the original currency or the modified currency, but after the split they diverge.



Anyone can create a split. It only requires a few lines of code changes. But splits only matter if people of economic significance actually use the split (ie. they must run the modified software).



Splits happen in the following situations:



- In a contentious hardfork.

- In a user-activated softfork (UASF) which lacks both majority mining power at the time of activation and near-unanimous support from the economy. If it has one or the other, then a split does not result.

- In a BIP9-style miner-triggered softfork where a very large number of miners are lying about their enforcement of the softfork. (Unlikely.)



What happens to my bitcoins in a split?



It's similar to a stock spin-off. You have x BTC beforehand, and afterward you have both x BTC and x "BTC-X". But very importantly, your wallet will not magically know that it is now able to unlock both currencies. If your wallet is not updated to account for the split, then you will only be able to spend one of the currencies, probably the more "status-quo" one. Another possibility is that your wallet could be updated, but only to support a different currency than it would've otherwise, not to support both. It is not unreasonable for wallets to support only one currency, since they really weren't originally designed/intended to support multiple. But if your wallet only supports one of the currencies, then you will usually end up throwing away some or all of the other currency when you next send coins after the split, as a side-effect of the transaction -- this is called "replay".



Value is unpredictable. Like a stock split or spin-off, you'd vaguely expect the value of BTC immediately before the split to equal the sum of the values of "BTC" and "BTC-X" immediately after the split. But if a split like this is anything close to a 50-50 split (in relation to economic adoption/value, not node or miner adoption), then the whole thing will probably be unbelievably, catastrophically messy, which may result in the combined value crashing. On the other hand, if the minority currency is pretty small and things don't get too messy, the minority side could be speculatively overvalued (similar to altcoins) without affecting the majority side too much, causing the combined value to rise somewhat.



Which side of the split is the real Bitcoin?



That depends on a wide variety of factors, and to some degree it is subjective. The most important factor is which currency people/businesses/exchanges accept: if for example one currency is accepted by 95% of the pre-split economy, and the other is accepted by only 5% of the pre-split economy, then the 95% one is probably truly Bitcoin, and the other one can be considered a Bitcoin-derived altcoin. Note that mining power has very little influence here.



Some might say that both currencies post-split are valid incarnations of Bitcoin, but it is my philosophy that only one Bitcoin can exist at any one time; any uncertainty is only a temporary feature, and at least in hindsight there will be a single unbroken path from Satoshi's original Bitcoin to the current one.



What should I do to secure my bitcoins?



First of all, remove all bitcoins possible from banks/exchanges/"hosted wallets". If you can't export your private keys, then you don't actually control the bitcoins. This is a good idea in general, but it's especially important in case of splits. If you're using a Bitcoin bank, then you will have no control over what happens to your coins. Quite possibly, the bank will end up stealing/losing one of the currencies that you should have access to, either through greed/malice or technical incompetence, and the currency they throw away might well be the only one that ends up having any long-term value.



Possible splits are usually predictable some time in advance (see the next section). If in doubt, avoid sending transactions or trusting received transactions 12 hours before and up to a few days after the split time, and check the forum for more news. If a major split happens, I will very likely make a post and news item explaining how to handle the situation. Coins at rest are not at risk.



Generally, after a split:



- If you want to completely ignore (ie. discard) one of the currencies, and your wallet is already set up to ignore that currency, then you don't have to do anything.

- If you want to completely ignore (ie. discard) one of the currencies, and your wallet is set up to support only that currency, then you might be able to change the software's settings after the split, or you might have to switch to different wallet software.

- If you want to use both currencies at the same time or sell one of the currencies, then you will probably have to follow a somewhat-complicated series of steps possibly involving running some extra software in order to cleanly split your coins and eliminate the possibility of replay.



Note that in the Bcash split on Aug 1, 2017, it was relatively easy to split coins, and the above risks mostly did not apply. This is because Bcash had a feature called replay protection. It is possible for a split to lack this feature, in which case the above more stringent measures are necessary.



About the near future / "SegWit2X"



SegWit is already locked-in in Bitcoin. There is zero doubt that Bitcoin will support SegWit. With SegWit, the max block size will be roughly 4MB.



"SegWit2x", also known by the abbreviation B2X, is a potential split proposal. Despite the name, it has nothing to do with SegWit. It doubles the max block size (under SegWit) from 4MB to 8MB. If its supporters go forward with it, B2X would definitely cause a split. As mentioned previously, if you have x BTC before the split, you'll be technically able to claim x B2X as well after a split. However, B2X lacks replay protection, so it will be more difficult to safely acquire your B2X than it was to acquire your BCH in the Bcash split.



The next time when a split is predicted to possibly happen is block 494,784, sometime in November, which is the fork time currently planned by B2X supporters.



OK wallets



The following wallets give you some theoretical way of exporting your private keys, so they should be safe to hold BTC during any split. Depending on what happens after a split, you may have to export your private keys and use different software, though. (Do not go doing this willy-nilly in a panic, though -- wait for agreement and clear instructions from several sources. There will be no rush.)



The ones in bold are ones that I also tend to like for other reasons. The ones in italic seem to make it difficult to export your private keys, or I particularly dislike them for other reasons.



Mobile

Electrum

Mycelium

Bitcoin Wallet for Android

breadwallet

Simple Bitcoin Wallet

Bither

ArcBit

Coin.Space



Desktop

Bitcoin Core

Electrum

Bitcoin Knots

mSIGNA

Armory

Bither

ArcBit



Hardware

Ledger

Trezor

Digital Bitbox

KeepKey



Web

Green Address*

Coin.Space



* Note for Green Address: You must either use a 2of3 account or have nLockTime transactions emailed to you in the settings. Otherwise you're trusting Green Address too much.