Bitcoin, Ethereum, and Smart Contracts.
The introduction of the Bitcoin network by Satoshi Nakamoto in his whitepaper about peer-to-peer transactions and the launch of the network in 2009 served as proof that blockchain technology can indeed work as a peer-to-peer solution for transactions between parties that do not trust each other.
The revolutionary innovations of blockchain have to do with recording transactions onto a public ledger (also known as blockchain) in such a way that it is impossible to change them or delete them. This innovation allowed Nakamoto to solve the problems that cryptographers and computer scientists before him were not able to solve, which are the problems of double-spending and transaction finality. The problem of double-spending is similar to the problem of copying a file multiple times: what’s preventing a user of making ten copies and pretending that he or she only made one copy? The problem of transaction finality is related to the problem of double spending. Once someone sends the money, how do you make sure that the action is final?
On Bitcoin blockchain, miners compile transactions into blocks of Bitcoin blockchain (that are very similar to pages of a regular paper ledger) and seal them with hashes in a way that makes it impossible to change the transactions.
The Bitcoin network aims to create a blockchain block every ten minutes. You can see how many blocks the network has as you are reading this article by visiting Bitcoin blockchain explorer at https://blockchain.info/ The first number from the top of the screen in the “height” column of the table will be the number of the latest block of the blockchain. And here is a page for one of the blocks, block #526860.
Similarly to a page in the ledger, this page has a record for all 3095 transactions that the block contains. You can see the information about each and every transaction if you start scrolling down the page of the block here: https://blockchain.info/block/0000000000000000002da73b519f7a8c8f92b58fec3ce6eca0233d7a3f2a9209 The Bitcoin network is open to the public and transparent, which means that you can see the information about all the transactions that have happened on the network similarly to how you can explore all the transactions in a single block.
The launch of Ethereum. Ethereum Virtual Machine.
Vitalik Buterin has launched the Ethereum network in 2015, six years after Satoshi Nakamoto has created Bitcoin. The main difference between Ethereum and Bitcoin is that the Ethereum network has Ethereum Virtual Machine, which can run code on the Ethereum blockchain.
Here’s a simple way to understand this. Blockchain is a technology that is about storing data in a decentralized, secure way. Bitcoin is a network that stores data about financial transactions, transactions in which users send each other funds in Bitcoin.
On the Ethereum network, users can store not just data about financial transactions, but virtually about anything. For example, they can store data about shipping containers, manufactured goods, farm production, weather, identities, and more.
The Ethereum Virtual Machine interprets code written in programming language called Solidity, the most popular application of which is smart contracts.
Ethereum Smart Contracts
The easiest way to understand a smart contract is in terms of “if/then… or else” statements. If you think about virtually any of your financial transactions you will realize that the transaction is a combination of “if/then… or else” statements.
Sometimes this combination is really simple. Let’s say you are buying a cup of coffee at a local coffee shop in the morning. You choose to pay with cash. The transaction between you and the coffee shop is simple: “IF I give you cash, THEN you give me a cup of coffee.” However, even this transaction can have several more “then/or else” conditions. Often in life, these conditions are implied. For example, “IF I give you cash and I wait for five minutes but I don’t see any coffee around, THEN you will give me my cash back.” Another example would be “IF I give you cash and you give me a cup of coffee and I don’t like the coffee, THEN you will brew a fresh cup for me or you will give me my money back.”
In the developed countries, consumers have a lot of protections. Typically, these protections cover the “OR ELSE” parts of the contracts. For example, “IF I give you money and you don’t give me coffee, THEN you will give me my money back OR ELSE I will contact a consumer protection agency in my locality.” In the society today, it is third parties that ensure these protections. For example, the government is one of such parties with agencies such as Food and Drug Administration, Federal Communications Commission, Federal Trade Commission serving as third parties making sure that the rights of consumers are protected. When you buy food, it is the job of Food and Drug Administration to make sure that the food is safe to consume. When you buy a package that allows you to connect to the Internet, the Federal Communications Commission regulates providers of the service.
The beauty of smart contracts is that they do not need a third party to monitor and enforce them. A blockchain network serves as such a party.