What is a blockchain?

Solomon Lederer, PhD
5 min readMar 26, 2017

A simple question. One that I get asked often. Here’s how I explain it.

A blockchain is a piece of software

It’s a piece of software most similar to BitTorrent. If you’re not familiar, BitTorrent is a program that allows you to upload and download files directly with others running the BitTorrent software. So instead of uploading a file to dropbox, and then sending your friend a link to download the file from dropbox, you just upload the file directly to your friend’s computer. This is what we mean by a peer-to-peer (p2p) program.

The blockchain is also a peer-to-peer program with one very important difference: not only does it move files (data) from peer to peer, but it also ensures that all the peers have the same exact data. It enforces this. If the data changes on one machine it changes on all the machines, assuming the change made was valid. There are rules specifying exactly how a change can be made, and if someone doesn’t follow them, and modifies their copy illegally, they’re ignored. It’s no different from an email program trying to send an email without the proper SMTP headers—it won’t be recognized by other email programs. By the same token, if your version gets deleted or corrupted, it’s not a problem, just re-sync with your peers and you get a fresh copy.

It’s important to point out that the way current blockchains, like bitcoin and ethereum, work is that instead of changing data within the dataset, new data is just appended onto the old. It other words, data is only written, never deleted. This is how it gets the name blockchain, because new data is added in batches, or blocks, and appended to the existing blocks, forming a chain of blocks. Why it’s designed this way is beyond the scope here, but note that it doesn’t necessarily have to have this design.

You get your own locker within the blockchain

Not only does everyone have the same dataset (aka blockchain), but everyone gets a locker within the blockchain that only they can access. Normally exclusive access to something is managed with usernames and passwords. But the blockchain has no central authority to manage usernames and passwords, so instead it uses a heavy dose of cryptographic magic. Each user is able to generate a locker address, and along with that address, a private key code that allows them to unlock the locker.

The locker is only an analogy of course. In reality it’s just an ID number — referred to as an “address” — which is tagged to a user’s data. The private key, is a code that allows the user to prove they’re the creator (or owner) of that address. Only the person who generated the address would have the private key, and no one can ever determine what the private key is from the address alone.

So while everyone can see the data tagged with your address in the blockchain, no one is allowed to modify it. It can only be modified by the person that can prove they’re the owner via the private key. So for example if bitcoins are tagged with your address, they cannot be moved (i.e. tagged with another address) unless the private key is used.

What’s also amazing about this system is that everyone can generate an address by themselves, in isolation, without concern that it will clash with anyone else’s address. The reason for this is that there are so many possible addresses, it is essentially impossible to clash with another address, even if you tried.

You can store executable code in the blockchain

It gets better. Not only is static data stored in the dataset, but you can store executable code in it too. So you have a piece of code sitting there on everyone’s machine waiting to be executed. Remember that data is only written to the blockchain, never erased, so you now have a piece of code no one can change. So everyone can be certain the way it’s written is the way it will always run.

Also this code is also tagged with someone’s address. The owner of that address gets to decide what operations are open to the public and what only he or she can execute (but only gets to make this decision at the time the code is written. Once written, it cannot be changed). Everyone will still be able to see the code and what it’s doing, but only be able to interact with it in the ways specified by the owner.

So why is this a big deal?

Let’s start with the original motivation to create a blockchain. Money. Our current monetary system is based on records. Records recording how much money is out there, and who has how much of it. We rely on our governments and banks to maintain these records. But a blockchain allows us to keep these record ourselves, since it guarantees that the record is the same for everyone. We each keep this dataset (blockchain) that contains a record of every single transaction that happens in our monetary system. Since everyone’s copy is in sync with everyone else’s, no one has to worry about fraudulent or conflicting entries. There’s now no need for a bank to manage our records. The blockchain does it instead. As far as how money gets created and distributed in the first place is another story, but the bitcoin network (and other cryptocurrencies) handle that beautifully too.

That was just on the data, or ledger, side of things. But it gets far more interesting when computer code is managed in the way too. Let’s imagine a legal contract: certain actions are taken under certain conditions. Even after the parties sign, they must still rely on the good faith of the other (or judicial system) to carry out their side of the agreement. Let’s take an example. Bob hates flight delays. Alice tell him if he pays her $5 and his flight is delayed by more than an hour, she’ll return his $5 and pay him an additional $20. A simple insurance scheme, or perhaps it’s a bet. In any case, when Bob gives Alice $5 he has to trust her that she’ll carry out her end of the bargain.

However by using a blockchain they can eliminate this risk. They write the conditions of their agreement in computer code, and initialize the contract with enough funds to make good on either side: Bob sends $5 (of cryptocurrency), and Alice sends $20. Then an hour after Bob’s flight is scheduled to arrive the computer code contract will do the following:

Lookup Bob’s flight on flightstats.comIf it was delayed more then an hour, send Bob $25Otherwise, send Alice $25

This code, once it’s written to the blockchain, cannot be removed or altered. Neither party can unilaterally remove the money either. Bob and Alice are guaranteed that the terms of the contract will be executed. This is what in Ethereum is termed a “smart contract”.

We never actually explained how the blockchain manages to keep everyone in sync. This is another topic for another day. To learn more about blockchains and how they can advance your business, visit blockmatics.tech.

--

--