If you’re just beginning to learn about blockchain technology, it can seem quite complicated — especially with buzzwords like decentralized, mining, token, cryptocurrency, and smart contracts. But don’t let these words and concepts intimidate you because the basics of blockchain technology are pretty straightforward.
Keep reading (or watch the video below) for our easy-to-understand explanation of blockchain, followed by an in-depth look at what blockchain is, how it works, and the ways it can be used now and in the future.
A simple explanation of blockchain
At its simplest form, a blockchain is a digital collection of information about transactions. This is also called a ledger, which is why this word is often used when describing blockchain technology.
When you have many different collections of data, they’re stored together using a system based on blocks of data chained together. Because each block is chained to those around it, they interact with each other.
This creates a system where if a block is altered, an adjacent block will immediately catch the error and prevent the invalid transaction. As a result, transactions on the blockchain cannot be changed — creating a permanent record that’s shared with everyone on the network.
The blockchain has the potential to unlock how we view and spend money, and how we’ll legitimize a variety of agreements, contracts, and technologies.
Where the blockchain came from
When most people think of the blockchain, prominent technologies like Bitcoin come to mind. Although blockchain technology isn’t dependent on Bitcoin, its development was powered by the crypto giant, and Bitcoin continues to lead the blockchain movement. But, originally, the blockchain had nothing to do with currency.
In 1991, the blockchain concept was invented as a way of verifying contents within a document using an immutable time stamp. The blockchain was designed as a way of authenticating what’s in a document and time-stamping the verification without revealing what’s inside the document. This gave blockchain transactions authenticity, immutability, and privacy.
The distributed ledger of a blockchain
A ledger is a record of transactions, and it includes important details like when the transaction was made, the parties involved, what was transacted, and any applicable amounts.
A common example of a ledger is a checkbook, which has the dates, amounts, and recipients of the checks, as well as how much you have left in your checking account. But, if you do most of your banking electronically, your monthly bank statement serves as a ledger.
On the blockchain, the ledger is distributed, which means entries are made and shared with everyone on the network. In this way, the ledger is “distributed” among many different users or peers. Every peer has a copy of the entire ledger.
How the blockchain is decentralized
Since everyone has access to the same ledger and no one person or institution controls it, the blockchain is decentralized. This makes the blockchain different from financial institutions like banks because banks have control over transactions.
Here’s an example: Let’s imagine the blockchain is like Google Docs and traditional banks are like older versions of Microsoft Word. With Google Docs, everyone who has access to the document can add to it. With Microsoft Word, on the other hand, all you can do is send a saved file for someone else to read.
On the blockchain, anyone on the network can add to the ledger while a bank merely sends out a statement. You can’t add a transaction to the bank’s ledger or perform transactions without its approval because it’s centralized.
How the blockchain is immutable
The immutable, or unchangeable, nature of the blockchain is where the Google Docs comparisons stop. Unlike Google Docs, no one can change what’s been entered into the blockchain. Each peer on the network can only add transactions. In other words, nothing that’s already been added can be altered in any way.
How the blockchain works
There are several different kinds of blockchains, like public blockchains and consortium blockchains, but they all share some key core elements. A blockchain is made up of blocks. Within these blocks is data. The data contains information that needs to be kept on the blockchain’s ledger.
For example, with cryptocurrency, the data includes:
- How much currency is being sent
Blockchains are also used in the process of tracking food. In this case, the block would contain data such as:
- Where the food was harvested
- The factory that processed it
- Where the food was purchased
Thanks to the blockchain, if there’s a food-born disease, you can quickly figure out where the food was produced and which facilities (or even people) handled it. You can then use that information to protect others from getting infected — all within a matter of minutes or hours.
If the automobile industry were to use the blockchain, you could ensure that the odometer readings of vehicles were accurate, preventing people from tampering with them to increase or decrease value.
For example, the block could contain an accurate odometer reading and the date it was recorded. This would be stored on the blockchain, and anyone could access it to see a true record of how far the car had been driven.
Why can’t data be changed on the blockchain?
If you’re thinking to yourself, why can’t the data be changed? of course it can be — just go in a change it! You’re not alone. This is a common question and the explanation is important.
So, data stored within each block on the blockchain has what’s called a hash value. This value is generated by passing some data through a formula, and the result produced by the formula is called a hash. Usually, the hash is a string of characters, and hashes generated by a specific formula are always the same length, regardless of how much data you feed into it.
For example, the MD5 formula always produces 32 character-long hashes. It doesn’t matter if you feed just the letter C or the entire word Codecademy into the formula, you’ll always get a hash value that’s 32 characters long.
Also, the formula will always produce the exact same hash for a specific data. So, using the MD5 formula, the string for Codecademy always returns the value e2f38549c5d471e64f7c16cf44d2d36d. (Give it a try yourself.)
This is important because the hash serves as the unique digital fingerprint for each block. Along with a hash value, a checksum is also produced for a specific piece of data, and it verifies the authenticity of the data.
This helps protect against accidental changes, data-transmission errors, or hackers. Two files can be assumed to be identical only if the checksums generated for each file — using the same cryptographic hash function — are identical.
To be useful, cryptographic hash functions have to have four properties. They have to be:
- Computationally efficient
- Pre-image resistant
Here’s a bit more about each of these properties:
Computational efficiency means computers can perform the hash functions quickly. This makes it so a computer can perform the function without expending too much processing power. This enhanced power helps the overall blockchain function more efficiently.
The blockchain is deterministic, which means that for any given input, the hash function will always give the same result. For example, if you put in the same input a million times in a row, regardless of when you enter it, the hash function has to produce the same output every single time.
This is similar to how a regular mathematical function works. For instance, in the equation X + 2 = Y, if you make X equal to 3, Y will always be 5 or 3 + 2.
A hash function being pre-image resistant means that its output doesn’t reveal any information about the input. So, even if you know the output, you can't figure out the input used to create it. In this way, the pre-image-resistant nature of cryptographic hashes protects the privacy of those who transact on the blockchain.
With cryptographic hash functions, the input can be anything from numbers, letters, sentences, paragraphs, or entire books. It doesn’t matter how big or small the input is, the function itself doesn’t reveal any information about it.
When a hash is collision-resistant, it’s nearly impossible for two different inputs to produce the same output. The output of a hash is a fixed length, while the input can be any size. So, there’s a minuscule possibility of the output being the same given two different inputs.
Commonly used hash functions
Of the several different types of hash algorithms, the two most commonly used for authenticating data are MD5 and SHA-2.
MD5 (Message-Digest algorithm 5)
If you’ve heard of the MD5 hash function, you probably also know that it’s considered cryptographically broken. But, even though it has considerable vulnerabilities, it’s still commonly used as a checksum to verify data integrity. Producing a 128-bit hash value, it’s also used for a wide variety of other security applications.
Designed by the United States National Security Agency, SHA-2 is a family of six hash functions. One of them is the SHA-256 hash, which is used by Bitcoin. SHA-2 returns a hash value of 256-bits and is considered to be significantly more secure than MD5.
The key to the blockchain’s immutability: The hash pointer
Each block of data in the blockchain has a pointer pointing to the block before it, and each block is being pointed to by the block after it. The one exception is the first block, known as the genesis block or Block 0.
Since the genesis block is the foundation on which additional blocks are added to form a chain, it doesn’t have a previous block to point to. So, the value of the “previous hash” of a genesis block is set to 0. This simply means that there wasn’t any data processed before the genesis block.
Each block following the genesis block is numbered sequentially, starting at 1, and has a “previous hash” set to the hash of the previous block. This means each block can be traced back to the one before it and the one before that one and so on — all the way back to the genesis block.
The value of each block is determined by the hash function that runs on the data. So, if someone tries to change or manipulate the data, the hash value produced by the block will change, too. This flags the data on the blockchain as invalid, keeping the transaction secure.
For example, if you have three blocks in a blockchain, the second points to the first, and the third points to the second. If someone tries to change the data in the second block, they would also alter the hash value the block produces — because the hash function is deterministic and collision-resistant.
The pointer of the third block would no longer work because it’s looking for the original hash result. This causes the results in the blockchain to break, which then exposes the tampering attempt.
Every computer on the blockchain’s network would instantly see the invalidity of the transaction. Each computer, in effect, casts a vote regarding the validity of the data within each block. Someone would need control of more than 50% of all the computers on the network to try to validate a block that’s been tampered with.
The pointer works like a digital agreement between blocks in a blockchain, making the information in transactions such as currency exchanges, odometer readings, or where vegetables are grown immutable, or unchangeable. This level of security is one of the main appeals of blockchain technology.
The 4 qualities of the blockchain
Every blockchain has these same essential qualities:
- Peer-to-peer: The blockchain isn’t controlled by any central person or authority. Everyone on the network is an equal player, and all participants talk to each other directly without the input of any third parties.
- Distributed: The ledger is spread across the entire network, making it nearly impossible to tamper with. The only way to potentially alter the ledger would be to control at least 51% of the computers on the blockchain’s network.
- Cryptographically secured: Cryptography is used for security purposes, and it makes the ledger tamper-proof. There’s no way to derive the data that was inputted using the output, thanks to cryptography.
- Add-only: Data can only be added to the blockchain, and each entry is time-stamped, which also adds to the blockchain’s immutability.
While blockchain technology is, in many ways, revolutionary and extremely useful, there are a few significant obstacles.
Without adequate knowledge of how to implement blockchain technology, many companies steer clear of it. Blockchain is a relatively new technology, so a lot of people don’t understand how it works or how to use it. This is slowing down the widespread adoption of the blockchain.
Even though adoption has been slow across the board, there are several companies using blockchain technology successfully today. One company taking advantage of blockchain’s transparency and data ledger technology is Spring Labs. With a mission to give businesses a way to transfer information faster and more securely, they tap into the inherent safety that comes from blockchain capabilities.
With approximately 68 million verified users, Coinbase is another company working to bring blockchain tech into our daily lives by making buying and managing cryptocurrencies easy.
Educating the public about how to use the blockchain and why it’s such an effective tool can make a big difference in the rate at which people welcome it into their day-to-day lives and business systems.
Banks and governments resist decentralization
With the blockchain, users can interact without a middleman, which removes much of the power and profit potential banks currently enjoy in the present financial system. For example, using the blockchain, you can send thousands of dollars to someone across the world in moments without paying a fee to a bank. If everyone were to adopt blockchain transactions, banks couldn’t collect wiring or transfer fees as they do now.
Governments like to have control over how people perform financial transactions, which includes knowing the identity of those receiving or sending money — or interacting in other ways, such as verifying where food was grown.
With the blockchain, the identities of the people involved in a transaction are never revealed. This makes it relatively easy for people to hide their identities when sending and receiving money and engage in a variety of contractual obligations while staying anonymous.
Usability and ease of use
Even though Bitcoin and other cryptocurrencies can be used to purchase goods and services, the lack of widespread adoption makes Bitcoin more like gold — a means of storing value.
While Bitcoin is the most popular cryptocurrency, it takes a lot longer to perform a transaction with Bitcoin than it does with a credit card. This makes some people hesitant to adopt it as a day-to-day currency.
Technological limitations also hinder the adoption of blockchain solutions. The design of some blockchains creates a bottleneck as the number of transactions grows.
The original design of the Bitcoin blockchain limited the number of transactions to seven per second. This is significantly low when compared to, say, the Visa network, which can complete thousands of transactions in the same amount of time.
The future of blockchain technology
The blockchain makes it possible for people from different parts of the world to instantly engage in business transactions and exchange, gather, and analyze data. The future of the blockchain will largely depend on people learning how it works and then adapting it to perform common tasks, as well as open up new possibilities.
Currently, some banks and financial institutions are already in the process of adopting and developing blockchain solutions because they provide fast, secure ways of sending and receiving funds.
One of the most flexible applications of the blockchain involves smart contracts. These are contracts, similar to what you’d put on paper, that allow two or more parties to agree to the conditions of a sale. When each facet of the contract has been satisfied, the transaction can go through.
For example, you could use a smart contract to facilitate the sale of a house. Everything from the home inspection to lien requirements can be included within the smart contract.
Blockchain can help with other real estate transactions, too. If someone who lives in the U.S. wants to purchase land in Jamaica but is currently visiting France, the transaction would be just as easy and inexpensive as it would if they were actually in Kingston, Jamaica. The more financial institutions adopt blockchain technology, the more common these kinds of transactions will become.
Another key factor in the future of the blockchain is the decentralized finance movement or Defi. Defi is simply finance using cryptocurrency. Defi systems make it possible for users to lend and borrow money, with those lending earning returns on the money they let others borrow.
The pros and cons of using the blockchain
As with all technologies, there are advantages and drawbacks to using the blockchain. Here are some pros and cons to consider:
- An open, shared ledger system that’s tamper-proof without control of 51% of computers on the network
- Decentralized management of transactions prevents large institutions or organizations from exercising central control over user’s funds
- Simple, inexpensive transactions across international borders
- The potential for building many types of smart contracts to facilitate a wide range of transactions and data exchanges
- Currencies on the blockchain often go through dramatic swings in value
- Limited adoption of blockchain solutions limits availability
- Some governments are targeting financial blockchain activity, seeking to limit it
- Hackers can penetrate cryptocurrency exchanges and anonymously steal funds
The future of the blockchain
In a paper about how blockchain technology can revolutionize international trade, the World Trade Organization (WTO) says that it can go far and beyond Bitcoin. The WTO predicts blockchain tech will be the beneficiary of “larger, focused investments” resulting in many successful models between 2022 and 2028. This will likely result in a “global, large-scale value-add” between 2027 and 2030.
The research also points to a spike in the business value of around 2% in 2021 to over 120% in 2030. The growth will be largely driven by the fact that the blockchain presents opportunities for:
- Numerous trade-related applications
- New opportunities to enhance the efficiency of processes
- Paperless trade processes
- A new generation of digital services produced by blockchain startups
- The efficient, transparent administration of intellectual property rights
Recap: Blockchain basics
The blockchain provides users with a unique, effective, inexpensive way of exchanging currencies, maintaining accurate data, and facilitating contracts. All of this is possible because of the following elements, which differentiate the blockchain from other methods of making transactions and exchanging information:
- A distributed ledger. No central organization or person controls the information. Peers on the network share the information in the ledger and everyone has an up-to-date copy.
- A decentralized structure. Transactions aren’t facilitated, controlled, or altered by a central entity.
- Immutable. Once the information has been entered into the blockchain, it can’t be changed.
- Cryptographically secured. The transactions are secure using cryptographic functions that make it impossible to derive the input from the output.
- Add-only. You can only add to the blockchain. You can’t alter previous entries.
These qualities hinge on the hash functions that form the basis of the blockchain. Hash functions are:
- Computationally efficient. This means computers can solve them quickly.
- Deterministic. As long as you put in the same input, you’ll get the same output.
- Pre-image resistant. The output of a hash function can’t be used to determine the input used to produce it.
- Collision-resistant. Two different inputs can’t produce the same output, practically speaking. The chances are less than 1 in 115, followed by 75 zeroes.
These are the basic, foundational concepts driving the blockchain, but there’s a lot more to learn. Blockchain technology is still relatively young, and, as more and more major institutions and companies — big and small — realize its potential, the market for blockchain designers is sure to grow.
With our courses, you can learn all you need to get started in a career using blockchain technology. In Learn the Basics of Blockchain with Python, you’ll gain an understanding of the fundamentals of the blockchain, as well as how to implement them using Python. If you want to take your learning to the next level, join us for free today.