Blockchain without Bitcoin? No.

I’ve lost count of the number of headlines and interviews in the last year which lay out the case that Bitcoin may well be a bust, but “blockchain technology” will still transform the world.

Here is a representative Forbes headline (but I am certain you’ve seen plenty yourself if you read financial headlines or watch any daytime finance shows):

Forget Bitcoin, It’s All About Blockchain

Forbes also has a list of companies touting their forays into Blockchain, including American Express, Oracle, Facebook, Prudential, Disney, IBM, Goldman Sachs, Amazon, Intel, Morgan Stanley… well here’s their list:

The 50 largest public companies exploring blockchain

Those of us who followed the technology before the recent boom and bust are sitting here scratching our heads. Blockchain without Bitcoin…? Huh?

Just this morning I read an article lamenting the poor investors who jumped into Bitcoin just before the bubble exploded about one year ago today. The article wraps up trying to highlight the silver linings: Bitcoin may have made a mess of many investors’ lives, but at least it gave us Blockchain Technology, which needs to be separated from Bitcoin since it has it’s own great value.

Claims like these seems rooted in a total misunderstanding of the blockchain, and they get gas from the bitcoin talking heads who can no longer tout skyrocketing prices as a testament to the “revolution” which, otherwise, ended rather unceremoniously. I’m going to throw my 2 cents in and explain why I don’t see any real future for blockchain divorced from crypto-coin. I’ll try not to get too technical.

How banks store data: the database

In this day and age, I don’t think you have to be in the computer field to be familiar with the concept of a database. By and large, you can think of a database as a big Excel spreadsheet, one which programs can ask questions to, and requests updates to. Here are some common “queries” that a banking program might ask of the bank’s central database:

  • “Database, show me the spreadsheet, but only the rows dated for today.”
  • “Database, add up all the debits in the spreadsheet which belong to John Doe.”
  • “Database, add a new debit for John Doe from today in the amount of $12 to Starbucks.”

Behind the scenes, this is how your balances and your transactions are stored.

What if you wanted to change the past?  Maybe you went grocery shopping last week after skipping breakfast and walked out with $500 worth of baked goods. It sure would be nice to pretend that never happened, and get the $500 back. In a database, changing the past is easy:

  • “Database, on row number 353224 dated last week, change the debit amount from $500 to $5.”

Just like that, $495 shows up back in your account. Maybe there are backups one could use to show the discrepancy, or else logs that record such a change which might come to light during an audit, but fundamentally speaking, nothing is meant to prevent this kind of change from happening in a database. Nothing.

That actually isn’t so dangerous as it sounds. Why? Because a bank’s database is centralized and controlled by “an authority” with a vested interest in maintaining the database’s integrity: the bank, a legal and regulated entity. Any Joe Shmoe can’t come along and send commands to the database. Any transactions that are sent go through bank-provided means, and into a clearing and validating processes BEFORE they are allowed to talk to the database. This is why your balance is always right, your transactions don’t disappear, and what you did a year ago can’t be changed today.

Decentralizing.

Imagine if a bank, say, Bank of America, decided not to take responsibility for their database anymore. Instead, they made it public so arbitrary third parties could host copies of it, and they were each responsible for keeping it in sync with one another on the honor system. Bank customers would be able to transact with any of these parties, since they all have a copy of the balances and transactions on that mighty spreadsheet.

As you can imagine, pandemonium would ensue. How many minutes would it take before some versions of this database showed old bills or dues mysteriously erased, strange payments made from random customers to the new host, etc?

People would arrive in troves to Bank of America trying to withdraw mysterious fortunes from their previously empty accounts, and they would be able to point to one of the third party hosts (the one they’d modified in their favor) and say, “See? There’s my balance! I’ll take that in hundreds, please.”

This would obviously be ridiculous.

Even if all the third parties were honest, there are reasons decentralization doesn’t work. What if I deposit $100 and wait for all the holders of this database to update my balance, then I go to two of them, separately but in quick succession, and send that money to two different recipients? I could easily spend my $100 twice before the two hosts compared notes and realized what I’d done.

The goal of Bitcoin, made clear from its establishing white paper, was to solve these problems and create a reliable decentralized currency. That means anyone — you, me, any company, any state — could participate and hold a copy of the official database (ledger, in blockchain terms), and still avoid pandemonium. How on Earth can we do that and still have a reliable financial system when you can’t trust any of the hosts or any of the networks used to transmit information? That is impossible, right?

Actually, no.

The Blockchain.

The amazing thing about bitcoin is it IS completely decentralized. You could download a client today, download the entire blockchain (a.k.a., database), and you would instantly be one of the thousands of distributed authorities. Some people’s transactions would start going through you, others would check their balances on your copy of the blockchain, and your version of the blockchain would be downloaded as other clients came online. And this works even if all the participants, including you, are (independently) corrupt and all networks insecure.

How can this be?

The reasons are very technical and groundbreaking in the field of computer science. I’ll summarize them in lay terms, since only portions are important in understanding the inseparable relationship between bitcoin and blockchain.

Proof of work.

We talked about a database as a large spreadsheet. You can think of a blockchain as a series of smaller spreadsheets, each one called a block, all lined up in a list. For visual purposes, imagine the first block is a spreadsheet showing the first 100 transactions of Bitcoins. Then a brand new spreadsheet, block #2, is next in the list, and it shows the next 100 transactions of Bitcoin, and so on (as I’m working on this paragraph, we’re up to block #554,939). By starting at the beginning and moving forward, you can follow the course of all Bitcoins in existence, and determine where they end up, a.k.a., who currently owns them.

This is all secured using clever computer science techniques call hashing. How hashing works is not important here, but the key is this: a hash is like a fingerprint unique to that block. If you change anything in that block — a date, or an amount, or a recipient, or ANYTHING — the fingerprint changes. Block #2 includes within its records the fingerprint for Block #1. Block #3 includes within its records the fingerprint for Block #2, etc.

So, you can see, if someone decides to tweak a transaction in Block #1–say, to transfer a coin to themselves, or even just to fake a date — it will change the fingerprint, and no longer match the one recorded in Block #2, and everyone on the network would know to disregard this tampered version of Block #1. In order to get away with this theft, they would need to update the fingerprint stored in Block #2.

…but that will change Block #2’s fingerprint also! Remember, ANY change in the block changes its fingerprint, including changing the record of the previous block’s fingerprint. So now Block #2 won’t match to Block #3’s record of the previous fingerprint, so you have to update that one too… and on and on.

For technical reasons that don’t matter, it is very expensive — in computer terms — to publish a block. Millions of computer cycles are spent, around the world, trying to accomplish this “proof of work” algorithm in order to publish the new block. One person wins the race, the block is published, and everyone starts on the next one. Once calculated, however, it is very very inexpensive — in computer terms — to verify the fingerprint matches up.

This makes it infeasible for our would-be-thief to pull off their heist. While they are scrambling to recalculate block #4 and #5 and #6, the rest of the world has added even more blocks to the front end of the chain. They will never catch up, which means anyone presented with their corrupted version of the blockchain would easily see mismatched fingerprints, and know to request the real blockchain from someone else instead. This is easy to do, since there are THOUSANDS of blockchain hosts.

This is why participants in Bitcoin transactions are told to wait for 6 “confirmations” before considering a transaction finalized. A confirmation means a new block was published in front of your transaction, so after 6 confirmations, your transaction is buried 6 spreadsheets deep. At this point, it is technologically infeasible for someone to modify a transaction in your block and recalculate the other 5 (but constantly increasing) fingerprints ahead in the line. In fact, there are other more complex safeguards which make it unlikely anyone could modify a block even 2 or 3 confirmations back down the chain, but by 6, you are as safe as could be.

Just as it sounds, all this is a LOT of extra work. The bank just keeps a spreadsheet, and they are good to go. They don’t need hashes and fingerprints and new blocks pointing to one another.  Compared to a database, a blockchain is tons of extra overhead, making it cumbersome and very slow. You would never bother with all this unless it was serving a purpose. For Bitcoin, that purpose is decentralization.

Why does this work in practice?

There is only one thing that maintains the needed environment for decentralization to flourish: Lots of hosts of the blockchain (a.k.a. “miners”)

That is all.

If you have a lot of miners, then combined with the protocols of Bitcoin, you have a reliable decentralized blockchain. Thereby, you justify the gross overhead of storing your data in this way. Let’s see why, and this will ultimately be the point that loops us back to my original thesis, that blockchain makes no sense with Bitcoin:

Miners

“Miners” is the term for anyone hosting the blockchain and spending cpu cycles trying to calculate new blocks. There are a lot of them. When becoming a miner, you simply download some software and agree to follow the protocol, which includes an important built-in concept of majority rule. A dishonest miner, of course, can ignore the protocol and do whatever they want, but since everyone else is obeying the protocol and the majority rules, that bad miner will basically be ignored.

When I say “everyone else” I actually mean, at least 51% of all miners. As long as the majority follows the rules, the whole thing works.

If I come along and present my corrupted blockchain with mismatching fingerprints to the network, any other hosts who are obeying the protocol (which requires them to validate my version of the blockchain) will quickly note the mismatches and choose to reject my version of the blockchain. This prevents new blocks from getting added to my version and ultimately prevents my version from spreading to any other hosts.

Even if I control several hosts and try to spread my version from many sides, because so many participants are following the rules, they will continue to wall off the spread of my version, until I inevitably fall behind as new blocks are added to the real chain and I am not able to keep my fake chain up to date.

Per the protocol: Majority rules, and majority sides with the longest valid chain.

What if there were very few participants, say, only 3? In this case, if 2 of them were corrupted to the same purpose, they could simply agree NOT to follow the protocols. They could choose to make an exception and accept my corrupted blockchain as authoritative. By majority rule, everyone who owns bitcoins is now subject to my version of the ledger.

But since there are hundreds of thousands of participants — some companies, some states, some individuals — all in separate jurisdictions and with non-aligned goals, this can’t really happen in practice. You would need to control (or convince) 51% of the “hash power” to stop following the rules specifically in order to get your self-serving version of the blockchain accepted, and this just can’t happen. Right now, the biggest single entity controls 18% of the hash power which isn’t even close to the needed 51% to become a self-possessed majority.

Bottom line: With lots of miners, and more than half of them following the rules, the complicated blockchain-style ledger works as a trusted — yet decentralized — database.

Why are there a lot of miners?

Mining is expensive. I already noted that calculating new blocks is extremely expensive in computer terms, but that translates to actual money. You need dedicated hardware worth thousands of dollars and lots of electricity to run them. You need a fast and reliable network connection, and you also generate piles of excess heat.

Why would anyone bother, except for the fanboys? Why, in fact, are there hundred of thousands of participants?

The answer is very simple:

If you find the next block, you get a reward. The reward? New Bitcoins! Currently 12.5, worth (today) something like $50,000USD (which was a quarter of a million dollars a year ago).

Yes, for downloading a piece of software and letting it spin your CPU and GPU day and night, you get paid as a miner, and you get paid in Bitcoin. Basically, whoever signs off on the new block gets to add one more row to the end:

“12.5 new bitcoins transferred to me!”

This creates incentive on several layers:

  1. It encourages people to participate in mining — lots of people — because they get paid!
  2. It encourages people to follow the protocols. You can only get your reward if your new block is accepted by the majority, so you better follow the rules or you wasted your time.
  3. It encourages miners to use and support Bitcoin as a currency, since they are getting paid in it.

If you removed the reward, miners would evaporate like an oasis.

Putting it all together.

We now have all the parts needed to explain the issue:

Blockchain is a revolutionary technology for allowing a secure database to be supported in a decentralized and insecure manner, but not really in any other sense. As a pure database, it is just slow and cumbersome. The reason we put up with the extra overhead is because it enables decentralization when hosted by a large number of participants (miners). Those miners are compensated for their efforts with Bitcoin.

Let’s say GoDaddy decided to adopt Blockchain and make a public ledger of who owns all of their domain names. It would be cool to decentralize this and make it public. But why would anyone bother maintaining the copies and mining new blocks? What would incentivize these participants to spend money on mining and ultimately obey any protocol rules? And why would we want to deal with all the extra cryptographic overhead for data that can just as easily be stored without it?

Without a reason for miners to participate, you aren’t going to get the environment needed for decentralization to protect itself from corruption. Few participants, or participants without incentive to play by any rules, will make it easy for attacks on the network to bring it down. And for what benefit?

The benefit for Bitcoin is part of the package. It is money that is government-agnostic, open to all, and not depending on any potentially untrustworthy authority (a.k.a., bank or state). That, in and of itself, makes sense to a lot of people. When you are talking about money, which can be subjected to various government-imposed inflations, taxes, regulations, limitations, it makes sense some people would seek freedom. But do we need that for every kind of data set? Not really.

Need or no, the fundamental issue remains:

What decentralized participants are going to bother maintaining a blockchain if they are not compensated for it? What keeps them honest?

There is no clear answer unless the blockchain is ITSELF part of a currency, and thus we come to my point:

Blockchain exists to allow Bitcoin to exist.

Bitcoin finances the maintenance of the blockchain.

Neither makes sense without the other.

Bitcoin: How to claim your BitcoinCash after the Hard Fork

Before the August 1st, 2017 hard fork, I moved all of my Bitcoins (BTC) to cold storage on various paper wallets, each protected by BIP0038. The fork itself was relatively uneventful, which is a testament to the technology underlying Bitcoin. The currency has survived, not because it has never yet been attacked, but rather because it is designed to survive DESPITE continuous attacks. This proved true once more after the fork.

And then the truly strange happened: everyone with Bitcoins suddenly got free money. Like, actual free money. The new alt coin BitcoinCash (BCH) emerged and has been trading with steady volume and support at about 7% of BTC’s value at the time of this writing. That is a free 7% return on your holdings.

So how do you actually get that cash? How do you access the coins on the new blockchain?

Who this tutorial is for:

  1. If you had Bitcoins in paper wallet cold storage prior to the fork
  2. If you leverage BIP0038 to encrypt your paper wallet private keys
  3. If you are a USA citizen

There are a thousand combinations of Bitcoin users, but I fell into the above category and had a hard time figuring out how — exactly — to actually do something with my BCH. Thanks to some Reddit users and google searches, I eventually managed and decided to make a quick how-to for anyone in a similar situation. Despite the specificity, other cold-storage forms and other countries of citizenship may find parts of this useful.

A few basics

Things get a little confusing when we start talking about forks and multiple blockchains. It is important to understand what is going on behind the scenes so you do not expose Private Keys or otherwise cause your Bitcoins to be non-secured. Let me summarize the key understanding before we go on.

Bitcoins all exist on the blockchain. There is no way to “download” your coins or to truly take them “offline,” despite terms like hardware wallet or cold storage imply. Every single coin that exists is noted in the blockchain and is owned by a particular public key. In order for a transaction to include a particular coin (e.g., to be spent), the transaction need to have the private key that corresponds to the public key on that coin in order to prove ownership. I can randomly pick a thousand coins and make a transaction sending them all to me, but the Bitcoin network will reject the transaction when I am not able to provide the proper private key needed to unlock the coins in question. Like a password, but orders of magnitude more secure, I won’t be able to get the needed private keys if I am not the true owner, barring theft or hacking or intervention from a deity.

When you talk about cold storage or hardware wallets, you are talking about keeping that unlocking private key offline so it can’t be stolen, but the coins themselves are always still in the chain and are always still publically assigned to your particular key.

When someone comes along and clones the Bitcoin network and gives it a new name (which is the essence of a fork) they will have the same record of all existing coins, and the same record of all coin assignments. This means your same private key works on the new network, just as it did on the old one.

What happened on August 1st, 2017?

A two-year disagreement between developers of Bitcoin came to a parting of ways. When differences could not be reconciled, a portion of the community decided to just go their own direction. They installed an incompatible version of the Bitcoin network code onto their mining platforms and local machines, took a copy of the existing blockchain, and carried on.

This new code was such that it rejected any blocks coming from the old network, and the old network rejected any blocks coming from the new network. As a result, the two immediately went their own way, each blockchain ignoring the other.

The result is that all coins connected to private keys you control were duplicated. One version sat on the old network, and another version sat on the new network. It also meant that spending and receiving money suddenly forked as well, because now transferring money on one chain has no effect on the other chain.

The key here is this: The same private key now unlocks two coins, but those coins are not otherwise linked or connected. Depending which network your wallet/site uses will decide which of those two coins you are handling at a given time.

How do I get BTC or USD from my cold BCH?

If you’ve followed along so far, you probably can anticipate the steps we need to take. I’ll outline them here, then go into detail:

  1. Sweep BTC in cold storage to a new address
  2. Import your Private Keys into a wallet that talks to the BCH network
  3. Transfer your BCH funds to ViaBTC.com
  4. Trade using BTC/BCC exchange
  5. Send the BTC funds to your normal exchange for cash out, or else back to cold storage

Nice and easy.

Step 1: Sweep

In order to access your BCH, you will need to expose the private key corresponding to the coins you wish to claim. The problem is, as noted above, this same private key will also unlock your Bitcoins on the main chain. Exposing your private key is, therefore, a significant security risk. To get around this, you should first move your existing cold Bitcoins to a brand new address with its own Private Key. This will only affect the coins on the Bitcoin network side, but it will ensure that when you expose your private key in the next step on the BCH network, there is no risk of an attacker trying to unlock corresponding BTC coins. If they do try, they will find a zero balance since that version of the coin has been moved.

I do this through blockchain.info, but any wallet software will do. In blockchain.info, go to Settings->Addresses, and under Imported Addresses, click [+] Import Address. Here you will enter the public address of you current paper wallet, the one containing coins you need to move.

Once you’ve added this “watch address,” return to the main interface and choose “SEND.” Use the drop-down next to “My Bitcoin Wallet” to select the address you just added, and in the TO field, enter the NEW paper wallet address you want to use.

This TO address should be brand new, and thus using a private key that is not associated with any of your coins on the BCH network. You will need to expose your private key now, but your risk is reduced by 15x since the coin on the BCH side is worth that much less.

Note: Blockchain.info supports BIP0038 encryption. If your paper wallet private key is encrypted, as mine are, you will be prompted for the encryption password in order to complete the sweep. This is safe to do.

Repeat this for any other paper wallets you control. At the end of this step, all of your coins will belong to NEW private keys on the main blockchain, but on the new BCH blockchain, all of the same keys we just used still control the corresponding coins there.

2. Import your private keys

Now that your Bitcoins are safe, you want to unlock your BitcoinCash still stored at those old paper wallet addresses. For this, you need a wallet software that knows how to connect to the new network. I used this: http://www.electroncash.org/

Launch the software and create a new standard wallet. Once that is setup, you will have an empty wallet that is connected to the BCH network. Now you need to import the private keys you just used on blockchain in order to access the corresponding coins on this side.

If you use BIP0038, ElectronCash does not allow you to import the encrypted private key the way blockchain.info does. An extra step is required!

2.a. Decrypt your BIP0038 Private Key

Navigate to http://bitaddress.org

Move the mouse around until the %’s reach 100%, just so the interface doesn’t screw with you. Once that is done, click on “Wallet Details” on the right.

Paste in your Private Key, and provide the passphrase. Click the Decrypt button, and let it spin, then your unencrypted Private Key will be printed down below. You can copy the WIF compressed format or the standard noncompressed format.

Note: entering your private key into a website is typically a bad idea. Since we already secured our Bitcoins and are about to move our BCH from this key, the procedure is relatively safe. The password is not uploaded to the server, but there is always a risk that the site is hacked and manipulated. If you use this same password on other cold wallets or are otherwise security paranoid, you can disconnect your network once the site is loaded. Everything will run with javascript offline, leaving you free to do what you need to do, then wipe out the session/cookies before reconnecting. Even better, get a USB-bootable Ubuntu and complete this step in an offline virgin OS (as you should have done when you created your paper wallets in the first place!). I didn’t bother since my private keys and BIP0038 passwords would both be garbage after this operation anyway.

2.b. Sweep into ElectronCash

Once you have non-encrypted private keys, open your wallet in ElectronCash and go to Wallet->Private keys->Sweep.

Enter your non-encrypted private key in the text box (or multiple, if applicable, one per line). Do not change the “Address” field — that is your local wallet address and is a safe place to receive the contents of the old paper wallet. Complete the sweep and wait for confirmation, and now your coins are safely moved to new/distinct addresses on BOTH chains.

3. Transfer to ViaBTC

I had a lot of trouble finding an exchange for BCH that would let me do anything as a US citizen. Coinbase does not support BCH, Bitstamp does not support BCH, Kraken does not validate US citizens, BTC.COM does not validate US citizens, etc.

ViaBTC, however, does allow you to complete a simple automated ID verification. It requires your actual name and a driver’s license ID number (or passport), as well as set a few passwords (you’ll need to setup the asset password, for instance). Once that is done, you can immediately use ViaBTC as a go-between from BCH to BTC. Create the free account, complete the validation, then you want to transfer your money into the platform. I recommend doing a small amount initially and stepping through the entire process before you send large quantities of funds.

Once you have an account, go to the Asset->Deposit->BCC section. ViaBTC uses the older ticker symbol BCC to represent BitcoinCash, even though the rest of the community has moved to BCH since BCC was used for another alt coin. In any case, on this page, you will see a recipient address that you can use to transfer your BitcoinCash into the system. Copy that address.

In Electron Cash, go to the “SEND” tab. Paste the address in the “PAY TO” field, leave description blank, and then select an “AMOUNT” to send. When you are ready, hit SEND. You will need to SIGN the transaction and hit BROADCAST.

You can track the progress of the deposit using any blockchain browser for BCH. I prefer Blockdozer since it is most similar to blockchain.info. The address is this format:

http://blockdozer.com/insight/address/xxxVIABTCxADDRESSxHERExxxxx

It takes some time to get confirmations since the hash power on the BCH network is much lower than the main BTC network, so be patient. Wait until you get 20 confirmations since ViaBTC prevents you from withdrawing prior to that anyway (even though they let you trade earlier).

4. Trade BCH to BTC

When you have your confirmations, you can go to the Trading tab and select BCC/BTC. Select your full balance by clicking on the “Available balance: xxxx” label, and hit “Sell BCC”.

In my experience, selling was instant. If you return to the Asset tab, you should now see no BCC, but some lesser amount of BTC depending what exchange rate you received.

5. Withdraw your BTC

Now that you have BTC funds, you can withdraw them to your normal exchange, such as Coinbase, or else send them to your paper wallet. You need to configure a recipient address, which is done from the Asset->Card/Address menu.

Under “BTC Address Settings” heading add a new address:

Provide the address of your paper wallet, or else the recipient address from your exchange. Save this then return to the Asset->Withdraw->BTC tab. Here you can send the funds you traded out to the address you just added above:

And that is it! Be patient — the withdrawal will sit in the “processing” state for a short time, then go to “verified” and sit there for a while… all without broadcasting to the Bitcoin network. But within the hour, it will change to “Sent,” at which time you can track it on the normal blockchain.

And that is it! You just collected your free money.

Except…

Or, maybe you cheated yourself out of a fortune if BCH gains dominance and BTC falls by the wayside. Nobody can predict what might happen. In any case, if you decide not to sell some (or all) of your BCH, you should still sweep it to a new address, just like we did for the BTC.

If you followed steps 1 & 2 above, your BCH should be safely moved to an address in your ElectronCash software wallet, so if you take the proper backup/password precautions, that is a safe place to retain the funds. Otherwise, you can use ElectronCash to send the coins to a new paper wallet, created the same way you would for a normal Bitcoin paper wallet. The process is the same as outlined in the latter half of step 3, but replace ViaBTC’s recipient address with your own.

Hope this helped to demystify some of the confusion around BCH and BTC of late. Happy trading, fellow crypto hodl’er.