Showing posts with label Digital Currencies. Show all posts
Showing posts with label Digital Currencies. Show all posts

Monday, 22 April 2013

How to explain Bitcoin to your grandmother

As anyone who doesn't have a degree in advanced computer science knows, Bitcoin is conceptually tricky. Thus, when your grandmother is wanting to buy marijuana off the Silk Road and begins asking you to explain Bitcoin to her, what do you do? Ever since early 2012, when I asked the question 'what the hell is Bitcoin?', I've been trying to find ways to explain it to myself. Initially I used the example of the Borg from Star Trek, but more recently I've come to believe that one key to describing it is to start from normal currency, and to then describe Bitcoin in relation to that, rather than trying to describe it as a standalone phenomenon. I'm no Bitcoin expert, so this is still a work-in-progress (Warning!), but next time granny asks you, here's a rough-and-ready way you might lay down the foundations (I've deliberately included a lot of repetition, because that's important when learning).

1) Start from physical cash
We all have a basic understanding of physical bank notes. We know that we can store a banknote in our wallet, and then exchange it directly with someone else for goods or services. We can do this because we collectively believe the note to have value, anchored as it is within an immensely powerful cultural system which gives it such value, and further reinforced by our belief in the central banks that issue it, and the governments that accept it for tax.

2) Now contrast physical cash with electronic bank money
Most of our transactions though, are with electronic money. That's the money you see when you log into your online banking account, and that you can use to make electronic payments (if you granny doesn't do internet banking, talk about the numbers on the ATM screen). Where is that electronic money stored? It's not like I have a wallet that has electronic cash in it that I can take out and give to someone. All our electronic money is actually stored in the IT systems of commercial banks.

3) Point out that electronic money is just a number in a bank's computer, attached to your account ID
DATACENTRE: WHERE YOUR E-MONEY IS STORED
To 'store' your electronic money, all the bank really does is maintain an internal ledger, which is a list that says "Brett has deposited X amount into the bank, and he has received X amount in payments, and he has withdrawn X amount from ATMs, and has paid X amount to other people via electronic payments, and this is how much he has left." And that's the amount you see on your bank statement. Your current bank balance is thus the product of a series of transactions over time that the bank validates and records.

4) Then point out that I cannot hold this electronic money in my own computer
If I had to call Co-Operative Bank up and say, "I have £350 in my account with you. It's currently in electronic form. I'd like to take it out of the bank. Please can you transfer it to me in electronic form, so that I can store it directly on my computer", they'd laugh at me. They'd just say "Sorry Mr. Scott, it's just numbers recorded next to your account ID. We can convert it into cash and give that to you if you come into a branch, but we cannot give it to you in electronic form, unless you could specify another bank where you have another account."

5) And point out that banks are thus intermediaries that 'keep score' of e-money
When we make electronic payments with electronic money, what actually happens is that we send a message to our bank to transfer money to someone else's bank. Your bank then records on its ledger that money associated with your account ID is no longer associated with it (has 'left your acccount'), and the other person's bank records that the money can now be associated with the recipient's account (Later the two banks clear it with each other via their reserve accounts at the central bank if necessary). The important point  is that I never personally send the electronic money to the recipient and they never personally receive it - intermediaries do it on our behalf.

Thus, unlike a physical bank note, there is no 'independent existence' of electronic money. With cash, I could hoard it in a suitcase and count it myself, and show it to other people who agreed it was real. For electronic money to be real though, we rely on a bank to say "yes, Brett originally had £400 in here, and then someone sent him £50, and now he has £450, and then he sent £100 to someone, and now he has £350." We rely on the intermediary to maintain accurate 'score' of our electronic money on its ledger so that I can look on my statement and see an amount I apparently have.

6) Bring up the issue of double-spending of e-money, and how banks prevent it
Let's say my current electronic money balance in my bank account is £15. If I went onto Amazon and spent that on an awesome financial activism book, and then 5 seconds later tried to spend the same £15 on second-hand shoes from Gumtree, that would be an attempt to double-spend electronic money. My bank though, would quickly clock on to the fact that on their internal ledger I only have £15, and that the latter attempted Gumtree payment is thus invalid, at which point they'd reject or reverse it. Thus, there is a 'time-based priority system' in which the first payment is the legitimate one, and can be validated, and the latter is illegitimate, and will not be validated. Only bank intermediaries have the birds-eye view to mediate attempted electronic payments by 'timestamping' them, like a clerk saying "this payment came first, and then this one, but only the first one is valid, because the account does not have a high enough score to complete the second payment".

7) Point out that a trusted intermediary is thus required in order to maintain 'realness' of electronic money
Imagine HSBC could hypothetically find a way to transfer you money in electronic form, so that you personally could store it on your computer. What would that money be? Presumably it would be some type of computer file, but if it was just a computer file, what would there be to stop you just copying and pasting it many times to replicate it? It would be akin to being able to counterfeit money very easily and rapidly. If we were willy-nilly allowed to copy and paste our own electronic money, there would be widespread breakdown in trust in it. If you knew that people kept their electronic money on their own computers, would you trust a payment that came from them, or would you think that maybe they were just creating it whenever they felt like paying someone?

A physical banknote has an identity number, and the mint is supposed to maintain 'realness' of the money by validating each bank note as a real one. With electronic money though, we have to trust in the banking system in order to trust in the money. If we believed that Barclays could randomly change the ledger and type in random amounts of money into people's accounts, we wouldn't trust people's bank balances. Banks maintain 'realness' of electronic currency by convincing us that it's basically the same as physical currency, only much more convenient, and that they keep valid score of it on our behalf. (Let's leave aside the complexities of fractional reserve banking for now).

8) You've now set up the Holy Grail question: Is it possible to create a version of electronic money that, like physical cash, does not require a central intermediary?
Turn to gran and say "So while it's true that I can send cash in an envelope to someone in Hong Kong, how could I do the same with electronic currency without having banks acting as central intermediaries in the process?" Gran ain't stupid, and she knows where you're going with this. She yells "Ta da, enter Bitcoin!"




9) Leap up and shout "Yes Granny, what is required is a decentralised intermediary!"
Let's cut straight to the chase. Bitcoin is a system to replace a centralised banking intermediary (that we have to trust to accurately record electronic money transactions), with a decentralised intermediary that we don't have to trust. That decentralised intermediary is a network of Bitcoin users.

10) Start from a hypothetical bitcoin payment. Explain that I must do a 'shout out' to the Bitcoin network, asking  them to validate, and then record, the transaction
Ignore for a moment how the bitcoins enter circulation, and go straight into describing a transaction. In an ordinary bank-mediated electronic payment, you'd say "I want to pay £25 from my Co-Operative Bank account to Mr. Jones' HSBC bank account, please transfer the money" and the two banks involved would record it on their ledger, first checking to see if you actually had enough to pay that, leaving you with a residual amount in your account. Let's now imagine you have 3 bitcoins (ignore for a moment where they are stored). It's like having a positive balance in your normal bank account. In the Bitcoin system, there are no people's names, there are only numbered addresses, called Public Keys. This is just an identification number, and any bitcoins in the system are attached to (or belong to) particular public keys, which in turn belong to actual people. If I want to spend bitcoins, I must first broadcast an electronic message to the Bitcoin network saying something roughly like:
  • "Hello I am Public Key 191Zh2XUc54EMNZcbkchVfApNQrBjL4Zb3
  • I wish to transfer 1 Bitcoin to Public Key 1M9fzriM7DgxDfGEhKqD2takTkXziqPkYF
  • Please check this and record it on the ledger".

11) Explain what the ledger is
But wait, what is this ledger? In an ordinary bank, the ledger they record your transactions onto is an internal list, almost like an excel spreadsheet. Take a look at your printed bank statement: It starts with an Opening Balance, then lists a bunch of transactions, and then ends with a Closing Balance. Commercial banks hold millions of these ledgers to record the history of money in each account. Now imagine all those were melded into one giant interconnected ledger showing all transactions that had ever occurred between users of a particular electronic currency. In the case of Bitcoin, this ledger is called the Blockchain. It is just a computer file that gets constantly updated, and it is held on the computers of everyone in the Bitcoin network.

12) And explain that it is built and maintained by a network of 'clerks' called Miners
As proposed transactions (like the one in No.10 above) are broadcast, the Bitcoin network collects them them into neat cohorts called blocks (a block of transactions), which are (figuratively speaking) dropped onto the virtual desk of a decentralised network of clerks who go about checking that they are legitimate (picture a decentralised version of a giant room of clerks receiving big dumps of transaction slips to process). This is called 'mining'.

13) If granny asks "Why's it called mining rather than checking", you say:
Perhaps the most elegant aspect of Bitcoin is that to reward people for the arduous task of validating and recording transactions in Bitcoin, they can get rewarded with new Bitcoins. The system is built such that you mine new bitcoins by checking that old bitcoin transactions are legitimate, and it's thus a currency that grows in the process of people trying to maintain its integrity. Moreover, the people in the network actually compete to validate the transactions, lured by the prospect of being rewarded with new bitcoins. So unlike a single central intermediary, where all clerks would be theoretically just be paid salaries to do the drudge work, this is a decentralised intermediary made up of competing mercenary-like clerks, paid only if they succeed.

You can see this process in action at http://blockchain.info:
  • If you look at the bottom of the webpage, you'll see the latest transactions that are being broadcast to the network. If you click on one of them, you'll see they are unconfirmed (i.e. transactions waiting to be validated by the 'clerks')
  • If you look at the top of the page, you'll see the latest blocks of transactions that have been confirmed, each with an ID number, and the number of transactions contained within it (e.g. Block 232412 contains 165 transactions and was confirmed by BTC Guild, a mercenary group of collaborating miners. You can also see that they've been awarded with 25 new bitcoins as a reward for validating the block)
  • On average it takes 10 minutes for new transactions to be validated and included into a block. This means that if you make a bitcoin payment, you'll have to wait for a little while before the payment is confirmed and embedded into the blockchain record

14) Granny looks puzzled. She asks "but how do these miners/clerks check the transactions and why is it so arduous that they have to be rewarded with new bitcoins to incentivise them?"
Yeah, this is where it gets a bit more complex. You want to convey the basic point that the validation process has to be difficult enough that no renegade power group (like the CIA for example) could game the system, but this is also where some of the more advanced cryptography comes in. Even if you understand the cryptography, it's probably unnecessary to explain it in any depth to your grandmother. If she wants to know more, refer her to the original document by Satoshi Nakomoto, and perhaps to this useful paper from Stanford. Just reiterate that as the transaction 'shout-outs' (described in No.10) are received by the network, the miners/clerks must exert a lot of computing power into checking that the people attempting to make payments have enough bitcoins credits to do so (by checking the existing ledger of transactions) and must then update the ledger with these new payments (kind of like saying "OK, it appears your opening balance was this, and you are indeed able to spend this amount of bitcoins, so we'll add the transaction to the blockchain, and now your closing balance is this"). Reiterate that the transactions are validated in groups called blocks, and that when the validation is complete, the block is then added to the blockchain (chain of blocks strung together = blockchain).

15) Which leads to the obvious point that the blockchain thus gets longer over time
The blockchain, being a historical record of all the transactions accepted by the community, thus gets bigger as the transactions go on. Check out a visual representation of its increasing size here.

16) Now the key point to put it all together: The Blockchain is a historical list of transactions, and  is thus also the list of outstanding coins
This is the piece that most trips me up. It seems counterproductive to think of bitcoins as 'things', as if they were like metal coins. The only obvious 'things' in the Bitcoin world are the blockchain and peoples' public key IDs. A bitcoin payment, and the resulting shift in the balances associated with two bitcoin IDs, has 'happened' only once it is recorded on the blockchain by network members that are mining. In other words, it's not like the transaction first occurs and is then later recorded (a bit like me giving someone cash and then later recording it). It is in fact the very act of recording that changes the coin balances, or makes the transaction real.

Payment is thus an act of public recording, not an act of private giving. Using this system, I am able to pay someone in Spain using a simple internet connection to give an electronic shout-out to a public network. After 10 minutes or so the recipient will see the changes reflected in the blockchain, and voila they have received their bitcoins from you.

Thus, my 'coins' actually reside in, or are implied in, the historical record of the blockchain. The blockchain started from the very first 'genesis block' (Block No.0) created by Satoshi Nakomoto, and has since then recorded the creation of new coins, and which public key they belong to. It is a collaboratively-built knowledge bank that holds the record of the amounts each public key has received and spent, and thereby how many coins can be attributed to each public key. Much like your current bank balance is merely the result of the bank having a centralised ledger to record transactions in and out of the account, your bitcoin balance is merely the residual product of changes recorded in the decentralised blockchain ledger. All I have on my computer is a public key which says that I am the rightful owner to a part of that history. My public key is like the key to a virtual, decentralised safe-deposit box facility, and if I lose access to it, I lose access to my claims to the coins attributable to my public key in the blockchain.

17) Some final musings: In what way is Bitcoin peer-to-peer?
People frequently call Bitcoin a peer-to-peer electronic currency, which could easily imply that you could send bitcoins directly to someone else with no third party involved. As you can see though, there is a third party involved. It's just that the third party is a decentralised network of people rather than a single centralised institution like a bank. It is 'peer-to-peer' in the sense of being a payment system under the control of no single institution, but it involves more than just two parties to a transaction.

Sorry gran
Ok, so that's the opening gist of it, and I'm really not sure how many grandmothers would understand this. Even if they did though, the first question that would pop into their wise heads is "Ok my dear, it's all very well to have a clever system like this to validate transactions undertaken in this currency, but you still haven't explained why Bitcoin has value." Right on Gran. That's a much more subtle question entirely. I have my theories about that, and particularly about the quasi-mystical underground hype that initially gave Bitcoin value (see the section called 'The mojo of Nakamoto). If I were you, I'd take a seat and listen to the words of warning your gran may have. Bitcoin indeed is pretty amazing, but it has also attracted a lot of hype from a lot of ideologues. I'd recommend ignoring them and taking time to think clearly about this yourself.

End Note: This is an ongoing Wiki Project
As mentioned at the beginning, I'm not a Bitcoin expert and this is still a work in progress. My main concern is how to find clear ways to explain things in intuitive ways to people. If you have ideas for how I can do so more accurately and effectively, please let me know!



Some things to do if you enjoyed this article...

I sometimes spend weeks writing these articles, and don't generally get paid to do it, so if you enjoyed please consider doing one or two of the following
  1. Support by buying me a virtual beer
  2. Submit to Reddit
  3. Link to the article from your own blog so your readers can see it too

Wednesday, 27 June 2012

The Block-Chain of infinite mystery: What the hell is Bitcoin?


[Note: for my more recent article about bitcoin, see How to Explain Bitcoin to your Granny]

By now many people will have heard about Bitcoin. That’s the global, decentralised, online crypto-currency (check out this Wired Magazine article for some background). You can either buy it on online exchanges, or your can ‘mine’ it by running algorithms that are likely to cause your laptop to catch fire. You can then use it to buy things from vendors who’ll accept it, albeit Sainsbury’s still only accepts British Pounds. There are even mainstream currency traders who actively trade Bitcoin now.

I’ll bet all the Bitcoins I have though, that very few people actually understand what the hell Bitcoin is. I myself do not understand it. Try listen to this guy explain it, and feel your mind frazzle. More than anything, I have the sense that Bitcoin is a cult. A strange cybernetic cult. An anarchic techno-pirate, quasi-mystical collective on a dystopian mission to subvert the global monetary system. I guess that’s why it attracts me, but I’d still like to know exactly how it works.

The Blockchain
One thing I do know is that the Bitcoin network worships something called the BlockChain. I don’t really know what the blockchain is, but it exists on a huge global network of nodes. It all sounds a bit like the Matrix. My friend @Webisteme understands it, and he keeps trying to explain it to me. The other night we were at the Dogstar pub in Brixton and he said various complicated-sounding things like:

1) "It's almost like a section of the blockchain has my signature on it, and then I sign it with your name, and then the whole network agrees that we've done a transaction"
2) "The blockchain is on everyone's computer. The nodes compete to process the blockchain, to create the next piece, which then everyone has to validate again"
3) "The network is so powerful, you'd need at least 50% of the total processing power to override it, and not even the world's largest supercomputer can do that"

I'm not sure if I've quoted him correctly, but I mostly sat at the table and stared at him with a strong feeling of bewilderment. In the absence of a nuanced understanding of the currency though, I come up with my own rough analogy: "Riiight" I say, "So would you say it's a little bit like the Borg in Star Trek?"


Is Bitcoin the BORG?
THE WORLD'S FIRST PICTURE OF BITCOIN'S BLOCK CHAIN
If you’ve never seen the Star-Trek episodes with the Borg, you can check out clips on Youtube. The clips do have something of a negative spin on them, with the Borg being portrayed as an enormous sociopathic cube bent of destruction. The interesting thing about the Borg though, is that it's an entity which has no leader, its direction being rather a function of all the pieces that make it up. According to WikipediaThe Borg manifest as cybernetically-enhanced humanoid drones of multiple species, organized as an interconnected collective, the decisions of which are made by a hive-mind, linked by subspace radio frequencies.” It is perhaps most famous for the phrase “Resistance is futile”. The analogy with Bitcoin is apparent to see: Interconnected collective? Tick. Hive-mind? Tick. Linked by subspace radio frequencies? Hmm... well, I think it uses internet relay chat. Resistance is futile? Yep, the Feds can attack it, but it doesn't exist in one place so they'd have to attack all nodes at once to shut the system down. Wait a minute, Borg and Bitcoin even have two letters in common - a coincidence?

@Webisteme looks at me from the table. “Um… I guess it’s kind of like the Borg," he says, "The network is very resilient but we’re not really cybernetic drones. It’s mostly guys with big computer rigs and powerful graphics processing cards”.

The mojo of Nakamoto
What strikes me most about Bitcoin though, is how it’s managed to capture the imagination of its users. People cite various reasons why it’s powerful, including how it’s managed to overcome double-spending problems you find with other online currencies. To me though, the real source of its power comes from its mythical foundation story, involving the mysterious character of Satoshi Nakamoto.

Let me explain. Imagine a group of researchers at MIT said "Hey guys, we’ve invented a cool new crypto-currency that is decentralised and resilient. Do you want to try it?" Maybe some people would take them up on that, but it would have no mystery, no intrigue, no dark story about mafia and the CIA. Now imagine that instead of that, a mysterious dude with no traceable identity releases strange tracts onto the web, describing a new currency, and then disappears. That’s exactly what Satoshi did, and it’s the very mystery of his story that makes people want to take part in the first place. It gives the currency soul, and that’s crucial because currency that is not legally mandated needs to be imbued with soul in order to start working. That’s one reason why gold continues to be viewed as a valuable currency: It shines and you can’t really do anything with it, and for some reason humans take that to be a good indication that it has mystical quasi-religious properties worthy of being valued.

Satoshi Nakomoto basically created crypto-gold, and sent all the miners out to find it. He then departed the earth, leaving disciples such as Gavin Andresen to continue the work in his absence (check out this psychedelic video that visualises the activities of the original developers). The elite nature of that exercise is part of the appeal too. Everyone has the potential to get the crypto-gold, but only those who invest the most time and passion will actually do so. I mean, look at this fanatical maniac who will almost certainly burn his warehouse down with his Bitcoin rig. There’s something about the sheer absurdity of devoting huge amounts of computing power to something that has no physical existence which gives power and reality to the currency.

Getting my piece of the Blockchain

I've decided to buy Bitcoins. I want a file on my computer with a bunch of numbers, created by the mysterious hands of the miners, little keys to the blockchain. If only I could enter the network, jumping from computer to computer, navigating my way through the corridors of the blockchain right to the very core of the entity created by Satoshi Nakamoto himself… or herself… or themselves. I'm not sure I could do that, but I have set up an account on InterSango and have just purchased 3.986 Bitcoins at around £4.15 per coin. Now I need to work out what to do with them. Any ideas?

If you want to learn more about Bitcoin, you can go to the main site here. If you want to work on developing it yourself, check out the Sourceforge site here. If you want to see Bitcoin blocks as they’re created check out Blockexplorer, and if you want to monitor transactions as they occur see here. If you want some free Bitcoins, you can apparently get them from this kind Samaritan here. If you want to check out more general info, see WeUseCoins. Good luck, and keep me posted on how it goes.