December 8, 2016

How Blockchain Works – An Introduction to Blockchain, Bitcoin, & Ethereum

Blockchain is still an emerging technology, so it is hard to understand how it works without looking into the code or getting deep into computer science concepts. To help with that, this introduction should get you started.

Blockchain vs. Bitcoin

A blockchain is distributed database, shared by all nodes in the blockchain network. In practical terms, this means that all nodes run on the same software, have a local copy of the whole database, and constantly talk to each other to propagate data and validate it.

The Bitcoin blockchain is the most popular public blockchain network, with around 10K nodes (although these numbers vary wildly on a daily basis). Many cryptocurrencies are built on top of it, with the most popular being Bitcoin. As a comparison, the Ethereum blockchain has been growing to around 7K nodes.

How does blockchain work?

In its basic form, any user who wants to write to the blockchain needs a public address and a private key. Every transaction should be signed with the private key, which is used to encrypt the message. Every time you buy or sell Bitcoin, a record is added to the Bitcoin blockchain and propagated to every node in the network. The system is safe because the information is duplicated thousands of times throughout different systems. A hacker would need to control 51% of the nodes to modify an existing record, which is considered unfeasible.

Who pays for all this?

The so-called miners run nodes and process transactions for the network (how they do that is quite involved), and when they do, they get Bitcoin in exchange for it.

This process is slightly different in Ethereum: Whoever submits the transaction pays for it using Ether (gas for the transaction). Ether is another cryptocurrency and has a dollar value.

Can I make money out of mining?

Not anymore. The complexity of mining increases with the supply of Bitcoin. By now you need very optimized set ups (low electricity cost, special hardware) to make any money out of it.

If the blockchains are public, can I see the transactions there? Can I see who owns more Bitcoins?

Every blockchain has explorer tools to let you navigate the data - for instance, there is this site for Bitcoin:

You can see what addresses have more Bitcoins, but there is no way to relate these addresses with individuals or companies.

Who runs Bitcoin? Who runs Ethereum?

Public blockchains are distributed applications and are managed by the people running their nodes. These communities are highly decentralized and use internet forums to communicate. One of the main ways they communicate and make decisions is by adopting (or failing to adopt) new releases of the blockchain software.

Governance for Ethereum is a tad tighter: Development is managed by the Ethereum Foundation, which issues recommendations to the community running the network.

If blockchain is so secure, how were coins stolen from Mt. Gox and other places?

Trading applications such as Mt. Gox have multiple layers and only use blockchain on a very limited basis, such as accepting coins from outside traders. Usually, what happens within the platform (matching buy and sell orders, managing trader keys, etc.) works on a more conventional technology, and may suffer from traditional security issues, have single/few points of failure, etc. It is accepted that anything written to a blockchain with enough nodes cannot be changed - that is, unless most of the community decides to change it.