Saturday, September 6, 2014

The Essence of How Bitcoin Works (Non-technical)

A less-technical introduction to the main ideas behind how Bitcoin works, including how money is transferred, who keeps track of it, and how everything is secured. This is the written version of the following video:


If, instead of how it works, you're looking for where to buy Bitcoin, I use coinbase. And for trading, check out bitcoin wealth alliance (both affiliate links).

The goal of this video is to explain the essence of how Bitcoin works without any jargon or scary math. It is not, however, an introduction to what Bitcoin is or why it matters, for that, check out the great intro video at bitcoin.org. So, on to how it works!

Bitcoin lets people exchange money electronically as easily as sending an email or text. To send money, you use what’s called a “Wallet” app to type in an amount, enter or scan a recipient’s account number, and hit ”Send”. The recipient will then see the money pop up in their account. 

So how does it work? At a basic level Bitcoin is just a ledger with account numbers and balances. When Bob sends Carol 5 Bitcoins, his balance goes down by 5, and Carol’s goes up by 5. There’s no gold or government-issued money backing these numbers, just people’s belief that the numbers are worth something, and a system that prevents unfair changes.

Account Security

Part of this system makes sure that no one can spend money from someone else’s account.  Every time you hit “Send”, your Wallet app sends a message to the Bitcoin network describing how the ledger should change, including the sender’s and recipient’s account numbers and the amount to transfer. So what’s to prevent a thief from creating a message transferring money from someone else’s account?

Bitcoin requires a kind of signature on each message to prove that it was created by the true account owner. The signature serves the same purpose as a handwritten signature on a paper check, but it’s based on math rather than handwriting.

The math comes from the world of cryptography, which is normally used to hide secret messages, but in Bitcoin, has been re-purposed to prove ownership. Each Bitcoin account number has an associated key that only the true account owner knows, and is used to create signatures by encrypting transaction messages. Others test the signature by trying to decrypt it. If successful, they know the signature was created by the true account owner.

In addition to not relying on handwriting analysis, these math-based signatures also can’t be copied and reused on other transactions, since the signatures are unique to each transaction.

Maintaining the Ledger

So these signatures keep unauthorized transactions from changing the ledger, but who exactly is checking the signatures, and overall, maintaining the ledger? Surprisingly, anyone who wants to!

One of the main goals of Bitcoin is to provide a decentralized system, meaning no single company or government can control it. Every time someone sends money, a transaction message is passed around to all the people who want to help maintain the ledger, who I’ll call “maintainers.” Each maintainer keeps a personal copy of the ledger and updates it whenever they receive a new transaction with a valid signature.

With ledgers spread all over the world, traffic delays--and occasionally fraud--can lead to differences in those ledgers.  So how does the world decide which version to use?

Like in other democratic systems, there’s a vote, but it’s a bit different than a typical ballot system. Maintainers “vote” by trying to solve a special puzzle based on their version of the ledger. The first person to solve a puzzle announces their solution and everyone updates to that version. 
So the vote turns out to be a kind of mathematical race, but it’s designed to favor the majority’s version. This is because the more people there are working on a particular version, the faster it will be solved.

Because new transactions are constantly being generated, this voting process repeats over and over again so maintainers can continually agree about new transactions.

Voting in a Decentralized System

So why math problems instead of, say, emailing in votes to decide on a ledger? Without a central authority to register voters, it would be hard to enforce one vote per person--a single person could create multiple accounts to vote more than once, or even millions of times.  The math problems prevent this by making each vote have a cost in computers and electricity.  This means out-voting, or out-solving the majority to take over the ledger would effectively require out-spending the majority--an unlikely event.

So the math enables a fair vote in a decentralized system. Two more important details about how it does this:

To prevent someone from pre-solving a puzzle to win the race, each puzzle builds on previous answers, and the winner is not just the most recent solution, but the ledger version with the most total solutions.

The puzzles are also extraordinarily special in that there are no tricks to solving them faster, other than by buying more computers and electricity. It’s this property that underlies the entire system, and gives people assurance that solutions are truly from the majority, and not a clever attacker.

Creating Money

A final note about how money is created. Every time a puzzle is solved, a small award is added to the solver’s balance, effectively creating money “out of thin air.” This award acts as an incentive for people to help maintain the ledger, and is in addition to small fees senders attach to transactions. 

Because maintainers acquire newly created money through computation, they are typically called “miners,” but their main purpose is really to manage the ledger, not to create money.  The voting system simply provides a convenient way to randomly distribute money into the world, and in fact, after 2140 no more money will be created.

Summary

In summary, Bitcoin is an electronic currency that’s based on a collaboratively maintained ledger. People transfer money by sending messages to maintainers describing where and how much money should move.  Maintainers make sure that the messages are from the true account owners by checking digital signatures. And finally, the maintainers reach consensus with each other through a math-based voting process. 

I hope this gives you a quick sense for how Bitcoin works. If you’d like to dive deeper into the rabbit hole, check out my 22-minute video: How Bitcoin Works under the Hood.

4 comments:

  1. HI Scott
    Thanks for all. The 22 minute video is really interesting. My concern is about the weakness of this great system. Actually if someone's private key is stolen then he could lose all the bitcoin that the ledger records for him as output of transaction not already spent. do you confirm ? then if yes it seems this is a big issue and that will probably compromise the ability to become the unique payment architecture to support transaction in the future i suppose. How could i take risk to have all my savings on that system if it's just a matter of hack to lose everything ? What's your point of view on this ?
    Best Regards
    Anthony

    ReplyDelete
    Replies
    1. I can't quite remember the source of who said this, but "with true ownership comes the possibility of true loss." You should probably diversify your savings, and if you have lots in Bitcoin, store them with a paper or hardware wallet, for which there are good guidelines for never exposing your private key to the internet.

      Bitcoin is still very young and untested, but most other forms of money have risk, also. The stock market cut in half in 2008, Cypress took funds directly from account holders in 2013 via a levy, and the US has been printing vast sums of money through Quantitative Easing since 2008, which could be argued as an indirect levy. Gold can be stolen or confiscated.

      Delete
  2. My only concern was to be sure about the weakness. To be sure that i didn't miss something in this great presentation. Then when we know about the weakness it's easier to focus on what has ti be solved. Blockhain is full of promises and we have to think as entrepreneur how to build sustainable business on it.

    ReplyDelete
  3. Hey Scott.. First of all thanks to a terrific video on the bitcoin and blockchain.. It certainly helped me understand all the mumbo jumbo behind it..
    Now I am trying to suggest a private blockchain o a major insurance provider in the US to optimize their claims processes. I feel they wouldnt need bitcoins and would need to have a private network(blockchain) on their own.. What I am trying to understand is, is proof of work mechaanism really required in a private blockchain.. is there any other alternative like a consensus algorithm or something that would help validate blocks... could you help me out here pls..

    ReplyDelete

comments are moderated, I'll review them as soon as possible!