“Blockchain.” “Cryptocurrency.” “Lock box.” “Strategery.” You’ve no doubt heard these buzzwords and more. And if you’re anything like me, you’ve probably also given the blank-stare-and-cocked-eyebrow look while somebody tries to explain what they actually mean.
Well, I recently set out to try to understand “The Blockchain” for myself. Now that I’m starting to get a handle on it, I thought I’d share my findings in as simple and compact a way possible. My goal is to distill the basic concepts into a single, 7-minute pill that will allow you to at least follow along the next time you hear “blockchain” or “cryptocurrency” being discussed. So take the blue pill and stay in the dark, or take the red pill and I show you how deep the rabbit hole goes…
Where It Came From
While cryptocurrencies (electronic/computer-based currency systems) have been theorized and experimented on for decades, the introduction of Bitcoin in 2009 was the first large-scale and successful implementation of the concept. The thing that made it so revolutionary was the new data structure (way of storing information) on which it was built, called “blockchain.”
A primary goal of most cryptocurrency systems is to remove human middlemen and regulators – thereby removing any bias, emotions, politics, etc. from the system – and make the whole system as transparent to the public as possible. The way to accomplish this is presumably to decentralize the data handling, or put it in the hands of the public so anyone who wants to can participate. But if you do that, then you need a system that makes transactions public while somehow keeping people’s personal information private, and also ensuring that transactions don’t conflict and the public can’t change the data at will. Two terms you’ll hear describing these problems that need to be solved are “Byzantine fault tolerance” and “the double spending problem.” We won’t get into those in this article, but you can read more in the original Bitcoin whitepaper. Bitcoin’s blockchain strategy proved to be the first viable way to accomplish all of this at scale.
What’s In A Name
The word “blockchain” refers to the data structure that was introduced by Bitcoin and later copied by countless others. You might already know that the most common way for software programs to store user data over the past few decades was in a database, kind of like a spreadsheet, and this practice continues today. In a blockchain, information is stored in “blocks” (very simply, groups of information that happened around the same time period) that are “chained” together in a straight line, in chronological order. To accomplish this, each block has a field that contains the ID of the block that came before it. This “ledger” (another word you’ll hear in the blockchain world, this one coming from the accounting world) contains the entire history of anything that ever happened on the system.
“Holy cow, that’s a lot of data!” Well, yes. That. But as you’ll see later, the blockchain only stores the bare minimum data, so the size of most blockchains hasn’t gotten too far out of hand yet.
Technically, you could have a blockchain that exists only on your computer, or even on a traditional web server, but the point of the blockchain structure is to make possible the public, decentralized infrastructure we talked about earlier.
The Building “Blocks”
Before we go any further, let’s take a minute to define the rest of the core terms you’ll run into when discussing blockchain technology:
This is the central piece of data that is stored in a blockchain. The bulk of every block is simply a list of transactions – one account sending “tokens”, or fractions thereof, to another. A transaction has an input value (say I put 0.7 Bitcoins into the transaction, for example) and one or more output values (e.g. 0.5 of that goes to the seller, and 0.2 is returned to me like “change”). In a traditional data structure, you’d store a pre-calculated account balance. In a blockchain, your “balance” is simply the sum of all of your transactions.
The ultimate purpose of a blockchain is to exchange commodities without relying on a middleman. These commodities are represented as tokens. While some blockchains have a mechanism that allows users to create their own kinds of tokens, there is always a primary token type that is used to pay for the cost of processing each transaction. This is often referred to as the actual cryptocurrency or “coin” (e.g. Bitcoin or Ether). The primary tokens (coins) are the only ones that serve as universal currency on the system, while all other tokens are arbitrarily used for their own purposes.
In general, the total amount of tokens of a particular type that can exist on a particular blockchain has a limit. In some cases, a specific amount of tokens is created at the beginning and no more will ever be introduced. In others – and this is the case for most coin tokens – they can be created periodically (e.g. as rewards for mining, discussed later). In the latter case, an attempt to manage inflation is often made by imposing a limit to the total number of tokens that can ever be created. Bitcoin, for example, is capped at 21 million coins. As of this writing, there are around 17.8 million Bitcoins in circulation, with about 1,800 new ones being mined each day. The last Bitcoin is expected to be mined somewhere around the year 2040, and if anyone loses access to their Bitcoin “wallet,” the coins therein cannot be replaced.
Now that you’re aware of all the pieces, you need to know how they all fit together. We’ve mentioned two primary goals of blockchain technology:
- Eliminate our dependence on individual corporations when conducting business (banks, credit card companies, and web hosting companies, for example).
- Make transactions transparent, yet keep personal data private.
For blockchain, this is accomplished by running the code on an open network of computers (called “nodes” or “miners”) where anybody can participate by leasing their computer power, and using cryptography (ciphering and deciphering secret messages) to make transactions public while keeping user data private. For example, a public transaction might say “[REDACTED1] sent $5 to [REDACTED2],” and only REDACTED1 and REDACTED2 know that the transaction belongs to them.
The goal of the nodes/miners is to run the transactions that come in, and package them in a nice, neat block on the end of the blockchain. We won’t get into the details of how that works here, but suffice it to say that they’re given a sort of math challenge with an element of randomness to it that keeps things interesting and makes it possible for anyone to compete. The first miner who figures out how to package the latest transactions into a valid block jumps out of her seat, waves her paper in the air, and yells “Got it!” The rest of the miners stop what they’re doing, check the new block, and say “Yep, she got it.” Then everyone puts this new block on the end of the chain and starts working on the next block.
Miners receive crypto coins as payment for their work, and the payment comes from two sources:
- The first miner to solve a block receives a significant reward, which is essentially created out of thin air. Similar to a government printing money or mining gold out of the Earth.
- Small transaction fees are also collected from transaction participants.
Now you might be thinking, “You mentioned eliminating the middleman, but we’re still relying on big companies to host servers, and paying them for it.” Well, yes. That. But we’ve at least spread out that power a bit, and made it possible for anyone to get in the game at any time.
Where Does The “Crypto” Come In?
So how exactly do we make the process transparent, yet keep personal data private? More math!
“Man, these guys are nerds,” you say? Well, yes. That.
Back in the ‘70s, various groups of super-smart guys were working on a way to encrypt information that is transmitted “in the clear,” called public-key cryptography. One such group figured out some complementary math problems that allow two people to encode messages to each other using crazy-big random prime numbers as encryption keys (secrets that help lock and unlock secret messages). Each person has one key that is kept private, and one that is shared publicly. I won’t get into the weeds of how this works, but you can read up on public key cryptography if you want to figure it out. It is the encoded version of these messages (transactions) that is stored in the blockchain.
In addition to encryption, which is useful for hiding messages that need to be read later, blockchain makes heavy use of another cryptographic technique called “hashing.” A hashing algorithm is a function that takes in information of any size and converts it to a unique symbol of a fixed size. Unlike encryption, hashing is a one-way function that cannot be reversed. Its main purpose is to create a unique ID for a piece of data, such that if you change the data, the hash must also change (and be wildly different from the original hash).
Just about everything in a blockchain has a corresponding hash. Transactions have hashes. Blocks are hashes of transaction hashes. The block chain is maintained because each block’s hash is a hash of the previous block’s hash plus the hashes of all the new transactions. So why hash the hash of a hash of hashes? Because this guarantees that if somebody tries to change even one tiny piece of data anywhere in the blockchain, the hash generated will differ because the root data differs, and the whole thing goes BOOM! (Remember the “Byzantine fault tolerance” problem we mentioned earlier?)
This is how blockchains prevent tampering and guarantee accuracy in a public system that is run by “volunteers.”
You Might Also Hear About…
A smart contract is a program (computer code) that handles custom transactions on a blockchain. This is more or less your “app” running on a public blockchain. Smart contracts allow you to customize the behavior of a standard transaction or create new types of tokens. For example, a supply-chain company could upload a smart contract that introduces a type of token that represents inventory. Every time some inventory is moved, something triggers the smart contract (an employee using a DApp, an automated call from the logistics software, etc.), and the smart contract moves the tokens to different owners. Each time a smart contract is executed, that execution is stored as a transaction in the blockchain (Remember: transactions are the main data point in a blockchain).
In keeping with the blockchain core value of transparency, smart contracts are “open source,” meaning anyone can review their code and see what they do before engaging with them. Once a smart contract is on the blockchain, it cannot be changed or removed. So once a smart contract is generally considered trustworthy, people can use it confidently, over and over, to conduct business.
A DApp (short for “Decentralized Application”) is a software program built on top of a blockchain network. DApps are very similar to your current idea of Apps but are usually powered by one or more Smart Contracts on a blockchain rather than a traditional web server. Ethereum is the blockchain that pioneered this approach, as it was built specifically to allow developers worldwide to build blockchain-based apps… err, DApps. For some examples of what people are building on blockchains, check out State of the DApps.
There is infinitely more that you can learn about blockchains and cryptocurrency, but I hope this summary has helped it seem a little less foreign and out-of-reach. At its core, blockchain is a radically different way of storing and processing data. And while it’s grabbing a lot of attention as the shiny new thing, it’s not at all appropriate for every use case. The technology community is still figuring out uses for it where there’s value in both transparency of processing and privacy of data. Some industries that seem to be gaining traction with blockchain technology are logistics, medicine, and of course, finance. So play around with it, spend some time brainstorming, and feel the freedom to use it or not, based on your own needs. Enjoy!
- The new SECRET to cloud and mobile
Once up a time in the world of IT, relatively simple IRR or NPV analysis…
- What Blockchain Needs: Product Managers
During the great cryptocurrency boom of 2017 everyone believed there wasn’t a problem that couldn’t…