2015-06-10

Handling bitcoins during a hard fork - pondering Bitcoin XT

As everyone might've heard by now, there is a big debate in the Bitcoin community about whether or not we should increase the block size limit. Some core devs are pushing for the size increase with the Bitcoin XT version, and it looks like some people might be committed to the hard fork even if the community would be against it. This can be a potentially dangerous move that fragments the Bitcoin world to those that use Bitcoin QT and those that use Bitcoin XT. If this was to happen and both of the versions were to coexist, there is a lot more than just confusion to be had for anyone that holds funds on behalf of their customers.

Hard fork and the transactions


Initially, when the hard fork happens, all transactions will be interchangeable between the two blockchains - after all, they will be spending the same outputs using the same algorithms. You could broadcast the same transaction to both blockchains and they will be able to get into the blocks just fine. However, this also means that any withdrawal from shared wallet, like from an exchange or CoinBase, may siphon the funds out of both chains even if the service is using only one chain. If a service was to ever switch over to the other chain, their balances might be out of order.

Over time, the networks will start drifting apart. Any transaction that spends the coinbase transaction of a block minted post-fork won't be copyable to the other chain. Similarly, any conflicting transactions will only be valid on one chain.

Since Bitcoin network currently has a lot of unspent outputs (such as the ones tied in physical bitcoins), we will probably see transactions valid on both chains for years to come.

Confusion about addresses


After the fork happens, there can be a lot of confusion as to what network everyone is on. If the address structure remains identical, someone asking you "to send 1BTC to 1PiachuEVn6sh52Ez7o6Fymvw54qvQ4RBm" might be confused when you send that amount of money to the listed address, but on a different network.

Maybe the devs behind BitcoinXT will take some precautions to prevent such mistakes by altering the Base58 alphabet in a similar fashion to Ripple (yes, Ripple addresses are identical to Bitcoin with the difference of the final Base58 alphabet used). Perhaps BitcoinXT addresses would start with an X instead of 1 without changing the underlying mathematics behind address creation or net bytes?

Recommendations for exchanges and other services


Even if one side of the fork will be more likely to stick around than the other, it is still useful to be prepared to exist on both sides of the fork. My recommendation for any exchange or service relying on a shared wallet is to make a backup of all user balances on the day the fork occurs. Since those Bitcoin balances would be valid on both chains, if the service was to support both sides of the fork, users should receive the same balance in BitcoinQT and BitcoinXT.

After that, both the hot and cold wallet balances should be spent on both chains in a conflicting fashion (send all funds to A on BitcoinQT, and all funds to B on BitcoinXT). After both transactions are confirmed on the separate forks, there will be no chance of the same transaction being copied between the chains. The balance of whichever chain is not used should be safely stored for the time being along with the backup of user balances.

If an exchange was to support both of the chains, supporting them straight away would create the least amount of confusion. Users should receive the same balance on BitcoinXT as they currently have on BitcoinQT, with their fiat balance remaining intact. Afterwards, the users would be free to trade both coins like they would be separate altcoins.

Conclusions


A Bitcoin hard fork might be coming. Exchanges and hosted wallets should have a plan of action if both chains were to co-exist.

No comments:

Post a Comment