What is blockchain?

9 Nov 2021

1-academy-what-is-blockchain-concise-ngrave-perfect-key-hardware-wallet-cold-security
logo-ngrave-perfect-key-hardware-wallet-cold-security2
NGRAVE The first end-to-end security solution to manage your crypto.

What is blockchain?

Blockchain is a database technology that records transactions. It tracks assets in a fully decentralized way, often referred to as peer-2-peer (P2P), meaning that no intermediary is required for adding a new “block” of information to the “chain”.

  • Article Quick Links:
  • The 6 key attributes of a blockchain
  • How does blockchain work?
  • What are the different types of blockchains?
  • The 4 key benefits of blockchain
  • The 5 main challenges that blockchains face
  • What are great uses for blockchain technology?
  • History of blockchain
  • Future of blockchain

How can we say that simpler? Well, blockchain is a network that keeps receipts of transactions on multiple computers (nodes) simultaneously. The specific term for this is “Distributed Ledger Technology” (DLT), which we’ll explain later. In essence, because the data is kept on multiple nodes at the same time, various users can access the database and propose or validate changes. Because of this consensus, the information is immutable as there are copies of each transaction receipt on many computers (nodes).

Blockchains can record information about cryptocurrency transactions, DeFi applications, smart contract executions, and NFT ownership. Virtually everything of value can be traded and tracked on a blockchain network, leading to lower costs and reduced risks due to the absence of an intermediary.

Warning: blockchain is not the same as bitcoin. Bitcoin is a cryptocurrency built on top of a blockchain. It is a medium of exchange like the US dollar, that uses encryption techniques to control the creation of monetary units and verify the transfer of funds. Blockchain is the technology that stores specific information (e.g. transactions) securely and transparently.

The 6 key attributes of a blockchain

Before we take a look at how blockchains work and consider various use cases, it is vital to have a basic understanding of the following concepts:

  1. Node: A node is a user that has an independent copy of the blockchain’s history and present state. They are responsible for the reliability of the entered data in the distributed ledger. Thanks to nodes, we can view the data and transactions conducted and stored on the network.
  2. Transaction: Registering transactions is the purpose of blockchains and one transaction is the smallest building block of a blockchain system. These transactions are like messages that get digitally signed with cryptography and sent to the entire network for verification.
  3. Block: A blockchain collects information in groups, also known as blocks. Other key elements of a block are the nonce, the hash, and the hash of the previous block. We will review them in the next section.
  4. Chain: The blocks are organized in a specific sequence, and all blocks have a maximum storage capacity. When filled, new blocks are attached to the previous block, forming a chain of data known as the “blockchain”.
  5. Miners: Miners are nodes that verify blocks before they get added to the blockchain structure. They create blocks via a specific consensus protocol (Proof-Of-Work, Proof-Of-Staking,...). In return for this work, they receive the transaction fee from the block that they created.
  6. Consensus protocol: The consensus protocol is the set of network rules by which nodes verify transactions. It ensures that new blocks are correct and chained to the blockchain.

How does blockchain work?

The concept of blockchain might sound somewhat abstract. But never fear. We will go through it step by step to present a clear visualization of how it works. To start, let’s have a look at what a hash is:

Hash

Different blockchains use different hash functions (RIPEMD160, SHA224, SHA256, SHA384...). Here we will look at the SHA256 hash, favored by bitcoin.

SHA stands for Secure Hash Algorithm. The SHA256 hash may look like a set of random numbers but is actually a fingerprint/signature of a digital dataset. It identifies a block and all of its contents and is always unique. After the block is created, the hash is determined based on the data that the block contains. A different input will always lead to a different hash but will always be 64 characters (in the case of SHA256).

It is almost impossible to figure out what the hash function stands for. To give an example:

The hash: 63C9416B9A9E8732872DAAE153340342205E58414CD759825B4F11D383F2B4F7 stands for NGRAVE.

While: B8B8352FA6A0CE9253E9116861A36A36C372B472820C1D4717F3421FE296AFD3 stands for NGRAVE ZERO.

Block

Apart from containing its hash, a block also has the hash of the previous block, its sequence number, and a nonce. The hash needs to start with a certain number of zeros to be approved (currently, bitcoin requires 19 zeros).

Via the nonce, miners can obtain the required set of zeros. Investopedia defines a nonce as an abbreviation for “number only used once”. By identifying the nonce, miners can find the hash with the required amount of zeros. The process of using computer power to predict the nonce is called mining. In this process, miners will use computing power to randomly set the nonce to a number by which the hash starts with the required number of zeros.

Let’s see how we can create a blockchain.

Blockchain

We just saw how blocks are created. Well, a blockchain is a chain of these.

Except for the first one, all blocks contain the hash of their predecessor. Let’s have a look at an example:

In the following example, we have four blocks that contain a block number, a nonce, data, and both its own and the previous block’s hash. In this example, we have four nodes: X, Y, the restaurant, and the grocery store, which all have a copy of the blockchain.

(These tables are purely hypothetical)

Now imagine that the BTC price increases and X is not happy that he sold $50 of his BTC to Y. He decides to change the $50 to $25 to have more BTC left. Let’s have a look:

Because X broke the block, X should re-mine the second block to get the required zeros. By going through the mining process again, X will pick another nonce.

X should repeat this for every block until the chain is correctly hashed again.

The longer the chain becomes and the further in the past X changes

something, the harder it will be to re-do all the work.

Due to the distributed property of blockchain, we can see if a block was re-mined or not. Let's dive deeper into this.

Distributed

Every person (node) on the blockchain would have an exact copy of the first chain (the original one without any changes). When X changes something about his chain, the peers will see a difference. How? If the last hash in the chain of the peers is 0000ae8bbc, then the hash in the chain of X would be different.

The nodes will only pick the most trusted chain of the two. In the example above, it would be the original chain. It works in a democratic way: Y, the restaurant, and the grocery store agree that the first one is the original and correct one, while X is the only one who claims otherwise.

Public / Private Keys

In the previous example, we created some transactions with X and Y. Now, nothing is preventing Z from adding a transaction that spends all of the remaining money/BTC X has ($50). We need another cryptographic primitive to prevent this kind of spending, called public and private key pairs.

The private key must remain a closely guarded secret, while the public key is something you want everybody to know. It is impossible to derive the private key from the public one, just like hashes function. It is important to safeguard private keys as they complete signatures.

Signing transactions

Above, X sold his BTC to Y. X needed his private key, which only he should know, to verify the transaction. The moment X signs his transaction, he will receive a signature message.

After receiving this, X transmits a verification message. In this step, the public key gets checked with the signature message to see whether or not the private key behind the public key signed this message. The moment somebody tries to change something about the transaction, the chain will break. Also, the signature would be incorrect, which would make re-mining it useless.

In the example above, we used X and Y. In real blockchain use-cases, the public keys are the only identification of people.

Timestamp

The transactions are put into groups/blocks until it reaches maximum storage capacity. Then, they are chained onto the previously filled block. This system creates an irreversible timeline of data as each block gets an exact timestamp when it is added to the chain.

What are the different types of blockchains?

Different types of blockchains have and will emerge throughout the years. First, we will look at the most known blockchain type, public blockchains, and compare it to the others:

  • Public Blockchains: Anyone can participate in public blockchains. With Bitcoin, for example, it is extremely difficult to alter logged transactions as no single authority controls the nodes. So, instead of one company or person keeping track of everything, information is shared with everyone on the network.
  • Private Blockchains: Contrary to public blockchains, private blockchains have access restrictions. One entity usually governs this type of blockchain, making it centralized. A known example is Hyperledger, whose open-source community is focused on developing a set of stable frameworks, tools, and libraries for enterprise-grade blockchain deployments. It is a global collaboration, hosted by the Linux Foundation. This blockchain type enables companies to use the technology to their advantage. Only people with permission can access this blockchain, make changes and see the activity.
  • Hybrid Blockchains or Consortiums: This type of blockchain is a combination of public and private protocols, containing the best of both worlds. Companies can use a hybrid form to make the ledger accessible to people around the world, with a private blockchain running in the background that can control access to the modifications in the ledger. R3 is an example of this type of blockchain. R3 developed Corda which is not strictly speaking a blockchain system. This blockchain type could be useful to connect an industry. For example, insurance companies could use it to keep track of fraud. When a person gets insurance for his car, the insurance company registers it on the blockchain. In the future, other companies can then check what and who is already insured.
  • Sidechains: A different type of blockchain is the sidechain, which runs parallel to the main blockchain. Sidechains improve scalability and efficiency and allow users to move assets between two different blockchains. The Liquid Network is an example of a sidechain. Liquid enables faster, more confidential Bitcoin and Tether transactions and the issuance of digital assets. Once a user has transferred BTC to Liquid they can take advantage of the network’s confidentiality and speed when making transactions.

The 4 key benefits of blockchain

Blockchain technology can serve a set of purposes for organizations and individuals. It becomes a ‘trustless’ network, in the sense that it is so reliable that trust is not a concern.

  1. History of data: Blockchain creates a receipt for every step in a transaction and helps users track issues they are concerned about, from inefficiencies on a supply chain to the human rights or environmental impact behind a product.
  2. Trustless (data validity and security): Blockchain prevents fraud and unauthorized alteration of data by encrypting it end-to-end. Plus, data can be anonymized and gated, solving any privacy concerns. And since information is stored on a network of computers, it makes it difficult for hackers to access it.
  3. Efficiency: Blockchain is automatic, making transactions less prone to errors by eliminating the third parties needed to verify them. This speeds up transactions as users don’t have to rely on institutions to be open. And as everything is registered on the blockchain, there is less need for documentation, making procedures faster and saving hours of work.
  4. Transparency: Since blockchain uses a distributed ledger, it records data on multiple locations. The users that have access to this network can see the same information in real time. Also, the transactions are permanently stored, immutable and time-stamped, eliminating any chance of fraud.

The 5 main challenges that blockchains face

  1. Scalability: There is a limit of transactions per second (TPS) on each blockchain network, which can lead to congestion and processing problems.
  2. Environmental impact: Many blockchains use “proof-of-work” (PoW) to validate blocks in a secure and trustable way. The issue, however, is that computers need a lot of energy to perform PoW. This is because all nodes must work to verify transactions. There are alternatives to proof-of-work that are more eco-friendly, such as Proof-of-Stake, where the cryptocurrency owners that stake coins can validate transactions.
  3. Risk of asset loss: Digital assets may be secured with a cryptographic key. Since there is no central blockchain authority, you are solely responsible for guarding the key. Making it almost impossible to regain access if lost.
  4. Private Key paradox: Every crypto wallet consists of two things: a private key and a public key. You can consider the public key as your “address” or “account” on the blockchain. The private key on the other hand, is the secret cryptographic password that grants the party who knows the value of the key, complete ownership of any funds on the associated public key. The private key is the reason that your crypto is so secure, but it’s also the achilles heel. If someone is able to retrieve your private key and get access to your funds, it’s over.
  5. Malicious activity: Since blockchain offers a lot of privacy to users, criminals are much harder to track, and it also becomes easy to launder money. This causes a bad reputation for cryptocurrencies and perhaps delayed their adoption, though malicious activity also happens with fiat currencies.

What are great uses for blockchain technology?

There are countless opportunities to benefit from blockchain. Here we list some areas that have made great advancements.

  • Cryptocurrencies: Digital money, a.k.a. cryptocurrency, is the best-known blockchain use case. Because of decentralization, digital currency frees users from banks and allows them to transfer faster and at lower rates across the world. Some of the most popular coins are Bitcoin (BTC), Ethereum (ETH), Cardano (ADA), Tether (USDT), and Solana (SOL).
  • Smart Contracts: Smart contract is a code that executes a predetermined logic when the required conditions are met. Smart contracts use blockchain to record transactions that occur thanks to its code.
  • Decentralized Finance (DeFi): DeFi recreates real-world financial instruments, such as borrowing and lending, but without the involvement of a company or government.
  • Non-fungible Tokens: Non-fungible tokens (NFTs) are unique digital assets that confer provable ownership. For example, an NFT could represent a digital art piece, a song, a video, or even a character in a video game. Blockchain allows users to have full ownership of whatever NFT they acquire, and there are many platforms to create, purchase, or engage/play with NFTs.
  • Logistics: As every transaction adds a new block of information to the network, supply chains benefit greatly from blockchain. A fully integrated supply chain can automate transactions and show transparency of their products’ origin and processing.

History of blockchain

Satoshi Nakamoto’s historic bitcoin whitepaper described the use of a blockchain network to solve the problem of double-spending. Nakomoto owes a great part of his work to three key milestones that lay the foundation for the blockchains that we know today.

The first milestone is the Merkle tree (1979), named after computer scientist Ralph Merkle. Briefly put, Merkle described an approach to public-key distribution and digital signatures that provides a data structure for verifying individual records.

Meanwhile, David Chaum wrote in his 1982 Ph. D. dissertation about a vault system for establishing, maintaining, and trusting computer systems by mutually suspicious groups (a number of people/organizations who do not trust one another). Chaum is also credited with inventing digital cash.

In 1991, Stuart Haber and W. Scott Stornetta published an article about timestamping digital documents. Their research goal was to maintain complete privacy of the document itself, without requiring record-keeping by a timestamping service. They included their design in the Merkle trees in 1992 with an updated design that enabled multiple document certificates to live on a single block. Cited as second in the bitcoin whitepaper, Jean-Jacques Quisquater (NGRAVE advisor), Henri Massias, and Xavier Serret-Avila are also known for their research and on the concept of timestamping and were great influences to the development of the blockchains we know today.

Future of blockchain

For blockchain enthusiasts and dreamers, IBM created a list of five predictions:

  1. New governance models will enhance decision-making, permission schemes, and payment efficiency.
  2. Reaching full interconnectivity via an industry-wide blockchain network will slowly become more realistic.
  3. Using adjacent technologies will generate more trustable data to better inform and strengthen algorithms.
  4. Validation tools that link digital assets to the real world by inserting external data into networks will help combat fake data sources.
  5. Central banks will expand into wholesale and retail Central Bank Digital Currencies (CBDCs).

Many claim that blockchain is following in the footsteps of the internet and will be adopted en masse just like that disruptive technology. It all depends on government policies and companies realizing they can gain huge benefits from blockchain implementation. The more it gets experimented with, especially by entities that can input considerable resources, the more valuable solutions will arise and the faster it will appeal to everyone.

logo-ngrave-perfect-key-hardware-wallet-cold-security2
The first end-to-end security solution to manage your crypto.
NGRAVE

NGRAVE is a digital asset security company and the creator of the world’s most secure cryptocurrency wallet, NGRAVE ZERO. NGRAVE ZERO was developed in collaboration with a world-renowned team of cryptography and security experts.