Tutorial – How Does Bitcoin Work?

Bitcoin has been in the news recently for its wild price action, but you might have also heard people talking about its fascinating underlying technology: the blockchain. It all sounds complicated, but you’ll be glad to know the basic principles aren’t that hard to grasp. So, do yourself a favor and read through this article for a glimpse into how Bitcoin works.


Bitcoin Explained in 100 Words

In short, Bitcoin is a digital currency that uses a blockchain to prevent fraud. The Bitcoin blockchain is a long list of transactions dating back to Bitcoin’s inception, keeping track of all users’ current and past balances. Everyone keeps their own copy of the blockchain, so nobody has total control over the Bitcoin network.

When a user sends Bitcoin, they broadcast the transaction to the entire network along with a private key, which proves their ownership of the funds. Other users check whether their balance is sufficient for the transaction, and, if so, they add the transaction to the blockchain.

How Bitcoin Really Works

It’s all good knowing a brief, 100-word summary of how Bitcoin works, but you probably clicked on this article for a deeper dive into Bitcoin’s inner-workings. To best explain how Bitcoin works, let’s break it up into several key features/processes and explain those one-by-one, starting with the blockchain.

The Blockchain

The technology everyone’s talking about is the blockchain, and it’s the thing that makes Bitcoin different from every other digital currency before it. The blockchain is a long list of transactions that dates back to Bitcoin’s first transaction in 2009. Although it may sound a bit long-winded, this long list of transactions allows anyone to calculate an accurate and definitive balance for a given user.

The blockchain itself is divided into a sequence of blocks, which are groups of transactions that are added to the blockchain roughly every 10 minutes. It’s not possible for a single block to change without all the blocks that come after it changing, which is what makes it practically impossible to alter or delete past Bitcoin transactions, especially as time passes and new blocks are added.

The blockchain isn’t the only technology of its kind. It falls under a wide umbrella of Distributed Ledger Technologies (DLTs), which are exactly what they sound like – distributed (between the network’s users) transaction ledgers. While these are particularly useful for digital money systems, DLTs can be used anywhere a transparent, trusted ledger is needed, like in government decision making, business processes, and so on.

The Bitcoin Network

The Bitcoin blockchain would be useless without a network to verify it. The Bitcoin network is exactly that: a peer-to-peer network of thousands users contributing to and verifying the blockchain, to make sure nobody alters the blockchain to their own agenda (by creating new coins for themselves, taking away others’, or similar).

The Bitcoin network runs smoothly when everybody agrees on the blockchain, but what happens when they don’t? In that case, a fork occurs: the network splits into two new networks, each with their own version of the blockchain. When this happens, you effectively end up with two different cryptocurrencies, since users will only accept certain coins if they can trace them back in their blockchain.

Forks aren’t exactly rare, nor are they anything to worry about. After all, multiple forks have already taken place in the history of Bitcoin, giving rise to new currencies such as Bitcoin Cash, Bitcoin Gold, and Bitcoin Diamond – all of which are based on the original Bitcoin.

Mining

Not everyone chooses to contribute to the blockchain, since each block features a cryptographic puzzle that is extremely difficult to solve but very easy for others to verify. This is called a consensus algorithm, and since you need computing power to generate new blocks, this particular consensus algorithm is called Proof-of-Work.

As a result of this, only certain users called miners choose to collect up users’ transactions into a block and solve the block’s puzzle. When they’re done, other users can quickly check whether or not they agree with that solution enough to include it in their own version of the blockchain. This encourages miners to create the fairest blocks possible.

Mining exists to prevent users from mindlessly creating bogus versions of the blockchain, which would slow down the entire network. To prevent dedicated miners from attempting this, the Bitcoin protocol rewards miners with 12.5 Bitcoin for each block they correctly solve that is adopted by the entire network – oftentimes, this far outweighs the risk-reward profile of a malicious attack on the Bitcoin network.

There’s one other detail that’s worth remembering about mining: only a certain number of transactions can be included in each block. When miners choose which transactions to include in the next block, they prioritize transactions that have included an extra commission or fee for themselves. This is why Bitcoin transactions aren’t completely free, since miners simply won’t add them to the blockchain, and means that miners earn a bit more than 12.5 Bitcoin per block they solve.

Transactions and Private Keys

The last piece of the puzzle – and perhaps one of the most interesting – is the transactions themselves. Anybody can send a transaction to the Bitcoin network, but miners will only accept that transaction if it is signed with a private key. Private keys are effectively the passwords that grant ownership over a particular set of funds, so Bitcoin storage is really just the storage of private keys.

Each transaction includes a few crucial pieces of information. For starters, there are the inputs, which reference previous transactions to show where the money is coming from. Then, there is the script, which contains the signature we discussed earlier and a so-called public key to check it against. Finally, there are the outputs, which tells the network how many Bitcoins are being sent and where to.

Learn More About Bitcoin

Congratulations! You now know the basic principles of how Bitcoin works. If you’re looking to learn more about Bitcoin, we recommend reading the original Bitcoin whitepaper, which also explains the purpose of Bitcoin, and looking through the community website Bitcoin.org.

Leave a Reply