I actually did this kind of backwards. I had to write all the code before I could convince myself that I could solve every problem, then I wrote the paper.
Bitcoin is complex. Like a bee hive, different actors perform strange tasks (like mining) that only make sense at the macro level.
In this post I'm going to describe "how" Bitcoin works and then in my next post I'll focus on the "why". Normally I take the opposite approach, but like Satoshi's quote, you need to build it first before you can explain it.
If you're not a miner you need to buy your first Bitcoin (or fraction of a Bitcoin - Bitcoins are divisible up to 8 decimal places. The 8th decimal, 0.00000001, is affectionately known as a Satoshi).
I bought mine on Gemini (screenshot below) - I wrote about Gemini in my Dive Right In - Getting Started With Bitcoin post, Gemini and GDax are good options in the US.
To send Bitcoin, you usually need the following:
Below are screenshots of Gemini's transaction screen ("Withdraw BTC"). Check out this video if you want to use Airbitz instead (recommended).
It's good practice to send all your money out of Gemini into a proper wallet so you have full control of your funds. Remember, Gemini, GDAX, Coinbase etc. are exchanges not wallets (hence they use the word "withdraw" instead of "send/pay").
After you make your transaction, the money doesn't transfer straight away. Instead it sits in a queue waiting to be processed. During this time you should see it in your wallet's transaction history as "pending".
Here is a snapshot of the queue of transactions ("Mempool").
You can see it live here.
Miners can only fit 1MB of transactions into each block and they choose the transactions themselves - so logically they choose the higher fee transactions first. You skip the queue by paying more - capitalism at its purest. If you want to set your fee manually, this website helps you determine the appropriate fee based on the urgency/time required: https://estimatefee.com/
Only one miner gets to add a block to the block chain which should only occur every 10 minutes or so. To earn the right, miners have to compete to solve a "proof of work" task (refer to my previous post, Mining Hashes and Nonces - the evolution of Cryptocurrency).
Essentially they use trial and error to find a random number (a "nonce" - you guessed it, etymology nonsensical) which when added to a combination of the transaction data and the previous hash, results in a new hash with a certain number of leading zeros.
The famous Hello World example is below - the nonce (random number) of 4250 results in a new hash with 4 leading zeros.
http://passwordsgenerator.net/sha256-hash-generator/
The puzzle is meant to take about ten minutes to solve. If miners start to solve it more quickly, Bitcoin automatically adjusts to make it more difficult (it does this by increasing the number of the leading zeros). If it takes too long to solve, they decrease the number of required zeros.
At the time of writing, it takes 17 leading zeros to solve the proof of work. You can see this yourself by clicking on the most recent block here and counting the number of leading zeros next to "Hash". The site even tells you the winning nonse.
Folk.Lol provides a handy website where you can see when the next difficulty adjustment will be. At the time of writing, it will be in ~2 weeks and should make it easier for miners, about 3.3% easier.
Bitcoin is fully transparent - a point that many people fail to recognize. When someone gives you their wallet address (so you can send them money), you can look up their account balance and the history of all their transactions!
To protect your privacy, your wallet address is a pseudonym - a long hash that no one recognizes. Dodgy people no doubt use multiple wallets to confuse police and distance themselves from the exchanges that require IDs. Nonetheless, the government can always "follow the money" - if you use Gemini to buy Bitcoin, they've linked you to all the addresses you send funds to.
Are you familiar with Ross Ulbricht's Silk Road website? Here is the US Marshall Wallet that sold his Bitcoins.
The US Marshall sold 29,658 of his Bitcoins on 01-07-2014, that's currently ~USD240m. You can google his wallet address too - he used heaps so it's not so easy to see, but you get the point, it's public.
US Marshall Wallet Address for Ross Ulbricht Coins - Silk Road
This was part 4 of a series I'm writing on cryptocurrency. Check out part 1, part 2 and part 3.
The next post, Byzantine Generals, Why Bitcoin has Miners and How Secure is Bitcoin is here.
Upvotes are appreciated for motivation. Comments/questions/corrections are welcomed. 🙃