Rafael Belchior

@rafaelbelchior

Blockchain For Students 101 -The Basics (Part 1)

When I was learning about the blockchain technology, I struggled to find high-level articles that covered most of the aspects of this technology. This article aims to give you an introduction to this technology, explain how it works, show you some of its applications and promote debate around the topic. And remember:

Blcokchain is not magic, keep that in mind.

Due to the growing role of social responsibility, security and privacy on the Internet, the blockchain is considered a really hot trend nowadays, since it aims to attenuate problems related to the aforementioned areas. I believe that with political and social awareness, blockchains will rapidly change the way we think about economies, governments, and record-keeping. Be aware that this technology has its serious drawbacks, which we will discuss later. I hope that you have questions about this technology because I have some answers.

Q: Now I know that blockchain can aim to solve specific problems. Why is it important to know (at least a bit) about blockchain?

A: Either if you are a computer science, engineering, management, economics, philosophy, arts, biology or you-name-what student, bear with this in mind: this technology is broad, immature and has a market that is still nascent and a clear recipe for success that has not yet emerged.

No matter what you are studying, your area relates to blockchain and, with enough creativity and problem-solving skills, you will be able to identify problems and (hopefully) propose a solution.

In fact, according to a McKinsey article,

… the focus of blockchain is wrapped up with Bitcoin is not surprising given that its market value surged from less than $20 billion to more than $200 billion over the course of 2017.1Yet Bitcoin is only the first application of blockchain technology that has captured the attention of government and industry.

There is a lot of business and social potential in this technology. If we understand it, we can try to use it to solve problems. The society benefits, your company benefits, you benefit. Remember:

The blockchain is not only for Computer Science people to understand, develop and apply.

Q: Blockchain, what on the 🌍 are you?

Note: Please bear with any simplifications that I make. These concepts and algorithms have a lot of research behind them. I will include some resources if you wish to have a deeper understanding.

A: Blockchain is technology that was invented by Nakamoto in 2008. It is a list of records (called nodes) connected together. It was created with the main purpose to serve as the public transaction ledger of Bitcoin.

Source: https://blockchain.wtf/what-the-faq/what-is-blockchain/

Q: Ok, interesting. And what is bitcoin ()?

A: Bitcoin is an unregulated, digital currency. From the analysis of Bitcoin: A Peer-to-Peer Electronic Cash System, by Satoshi Nakamoto, one can see that the main goal is to create a decentralized electronic cash, without the need of intermediaries, while preventing the double-spending problem. How? The security protocol called proof-of-work removes the need for a trusted third party to validate transactions.

Note: If you’re interested in Bitcoin and other cryptocurrencies, stay tuned and watch out for my future article “Blockchain for Students 101: Bitcoin & Friends”. Feel free to save yourself some time and follow me 🦄.

Q: What is the difference between blockchain and bitcoin?

A: Bitcoin uses the blockchain technology as its transaction ledger.

Q: Why is bitcoin so famous?

A: The invention of the blockchain for bitcoin made it the first cryptocurrency that solved the double-spending problem without the need for a central authority. Everyone can see all the transactions that occurred. If you go to Block Explorer, you can check all the transactions that took place.

Q: What are the downsides of blockchain technologies?

A: On the technological side, blockchain is very expensive relative to centralized databases. Development is slower, scaling is hard, maintenance is costly. Jimmy Song wrote a very detailed article about blockchain’s pitfalls.

One has to take into account that many public ledgers are not regulated. This makes some place to scams and market manipulation to happen, especially in the cryptocurrencies area.

Mining costs a lot of electricity, in the case of Bitcoin. It’s not very environmentally friendly, as fossil fuels are still one of the main sources of electricity, through its burning.

On the other hand, there are different consensus mechanisms that don’t require large amounts of computational power. Nonetheless, there are lots of blockchain startups that aim to help us be more sustainable.

Do you think that it is reasonable to waste a lot of electricity, increasing the burning of fossil fuels, if we are using it that electricity to power technologies that aim to help us to be more sustainable?

Q: Those startups look interesting. Tell me some examples of its application, please.

A: On the environmental area, some really interesting solutions are proposed:

By Future Thinkers

This video from Future Thinkers illustrates major industries that are disrupted by this technology.

By Future Thinkers

Dear entrepreneurs, all in all, you can consider using this technology if your idea evolves:

  • Many collaborating peers
  • Assuring that the information registered wasn’t changed
  • The exchange of anything of value in a transparent, conflict-free way while avoiding the services of a middleman (smart contracts).

Note: If you’re interested in the smart contracts technology and how you can unleash your entrepreneur side, stay tuned and watch out for my article “Blockchain for Students 101: How to Build a Business around Smart Contracts” and Blockchain for Students 101: Learn Blockchain by Building One.

Feel free to save yourself some time and follow me 🦄.

Q: Those are interesting applications. They rely on the assumption that they are safe. Can I cheat and change a transaction that already occurred? Are cryptocurrencies safe?

A: Short answer: you should not, and it is very difficult. Not so short answer:

Blockchains are meant to be immutable and verifiable: every record can be viewed by any participant, allowing for any person to individually verify the authenticity of each transaction. Therefore, the blocks are auditable.

Once a block is inserted in the chain, it can not be altered retroactively without altering all the following blocks. Why?

Warning: Technical part!

A hash function is any function that can be used to map data of arbitrary size to data of fixed size.
If a hash function is good, the output of a given text will always be different. For example, the hash function Bitcoin uses is SHA256.
Example, with SHA:
INPUT: | OUTPUT:
Hello, dear reader  | 25EFBAB20773BD[...]5F3A90395D7BB9D45BE9FF14D08
Hello, dear reader! | 0EF69EF9CD0158[...]A25FB1F23D2080A8E2CA8A73DA5

As you can see, just by changing one character, you get a completely different result.

When a new block is going to be created, it has the hash of the previous block’s data. A hash is a cryptographic signature, that is very difficult to break. It is easy to verify if the hash has been altered. When you change your data, it will produce a different hash.

Source: https://crypto.stackexchange.com/questions/12768/why-hash-the-message-before-signing-it-with-rsa

At the verification step, the hash of the data will not be the same as the hash recorded on the following block. The system realizes that someone tried to tamper the data.

Theoretically, If you change the data of a node, the hash will, very likely, be different. As the hash of the current node will be inserted on the next, you would also need to change the following node.

Source: https://steemit.com/bitcoin/@darkflame/why-you-cant-cheat-at-bitcoin

Although its design is safe by default, cryptocurrencies are vulnerable to a series of attacks: CoinJoin is vulnerable to DoS attacks, Ripple is vulnerable to the consensus split attack and Bitcoin is vulnerable to the 51% attack. Not only Bitcoin was hit many times, but also the whole network might be in danger, thanks to mining pools.

Another very famous attack was launched on the Ethereum network, the DAO attack:

  • A DAO is a Decentralized Autonomous Organization. Their goal is to codify the rules of an organization, eliminating the need for documents and people in governing.
  • Those rules were written in smart contracts by developers.
  • There was an initial period of funding and, when it ended, the DAO could start operating.

What happened? There was a bug in the software, and an attacker managed to drain more than 3.6m ether.

Of course that the technical security details are tricky and require a lot of work. But actually, it is way easier to understand the technology and learn by doing.

Note: If you’re interested in learning by doing, stay tuned and watch out for my future article “Blockchain for Students 101: Learn Blockchain by Building One” 🦄.

Q: Now I know what a blockchain is and “how secure it is”. How does it work?

A: For being used as a distributed ledger (which is, in a distributed database which maintains consensus about the status of shared facts in trustless environments), we need to organize the participants (also called nodes). This organization is achieved by having a peer-to-peer network, which follows a certain set of rules. These rules are, for example, how do the participants interact and how to validate nodes.

Source: https://blockchain.wtf/what-the-faq/what-is-blockchain/

Note: If you are a fan of technical details, stay tuned and watch out for my article “Blockchain for Students 101: Learn Blockchain by Building One”.You know the deal by now🦄.

Q: What is consensus?

A: This has to do with step #2 of the above poster. Any participant may add information to the chain. So, it is important that there are mechanisms that review and validate the transactions (remember, you can’t trust anyone in the network). These mechanisms are called “consensus”. Chris Hammerschmidt has written a very insightful article about consensus mechanisms, you might want to check it.

Q: You told me that blockchains are distributed databases. In what way?

A: Distributed databases are the ones whose storage devices (records) are not all attached to a common processing, but are spread across a network. These are meant to help to build scalable solutions that can process huge amounts of data.

With a “normal” distributed database, you have a central authority that manages the data and interactions between users. With blockchain, there is no such authority, only the protocol. Instead of trusting 100% one organization (which has several problems), you have to trust “51”% of all the people/organizations that are involved (keep reading to know why). One can say that blockchain is a decentralized database, with its management system also decentralized.

Q: What types of blockchains exist?

A: There are three kinds of blockchains, concerning its visibility:

Public blockchains: Anyone can participate in the network. Normally the network rewards the participants. Examples: Bitcoin and Ethereum.

Private blockchains: The participants join the network by invitation.Useful for companies to incorporate the technology in their processes, without disclosing sensitive information.

Federated blockchains: Federated Blockchains operate under the condition that there are pre-selected nodes that validate blocks to be written to the blockchain.

Next steps:
Cheers, Keep Rocking 💪
If you enjoyed this article, please subscribe to my mailing list.
Here 👇. It would mean a lot.

More by Rafael Belchior

Topics of interest

More Related Stories