July 18, 2024
How Bitcoin Really Works (5 minute read)
Here’s a real quick yet accurate explanation of how Bitcoin works.
Bitcoin Nodes
If you run Bitcoin node software, like Bitcoin Core, it will establish a connection to other, random instances of Bitcoin Core, becoming part of a worldwide network of interconnected Bitcoin nodes. Anyone can do this. The software is free, and its code is open source.
Every new Bitcoin Core node is seeded with the first ever piece of data in Bitcoin called the “Genesis block.” It contains the details of the first piece of data upon which all the rest of Bitcoin’s history is built. Each new node then polls the other nodes for the next block. The node then uses Bitcoin’s math-based rules to check if that next block meets those rules. The rules check to see that every Bitcoin transaction in the block is valid and contains a valid proof of work (explained later) for creating that block.
It keeps retrieving new blocks until it catches up to the present. At that point, it is in synchronization with every other Bitcoin node worldwide. Each Bitcoin node has verified the accuracy and truth of every single transaction and block and Bitcoin’s history. They don’t just copy data — they verify every single bit of it.
Bitcoin Transactions
A Bitcoin transaction is a text message. To be valid, it has to strictly adhere to specific rules, though:
It can only spend Bitcoin that hasn’t been spent.
It must provide a cryptographic signature which can be used to verify that the sender is in possession of the correct secret, randomly generated, astronomically large number called a ‘private key.’
It is also advisable that the addresses of the recipients of the transaction’s funds are specified. (If they’re not, then the entire transaction becomes a fee paid to miners.)
That’s it. It can include other data, like the date or time at which the transaction will be valid (like post-dating a check), but it doesn’t have to.
There’s one other type of transaction, called a coinbase transaction (nothing to do with the company of that name — that company stole its name from this term). That transaction is explained in the Bitcoin Blocks section of this article.
Bitcoin Addresses
Bitcoin addresses are weird looking strings like:
bc1qtxsjjjgupnccn2czvwaj5×3szc4hw75nc53hm8 or 16t8xf4MG1mHoKU1AbpT5QGKDfj5UYg1W5 or 3CwT3oXQVtwYwBGnsRVd1Juj2gqBxsfNpv
But they’re not arbitrary, and you don’t make them up. They are cryptographic fingerprints of either ‘public keys’ or of entire code scripts. When it comes time to spend coins from those addresses, the spender will have to provide the digital signature associated with the private key that corresponds to the public key or script.
Bitcoin Blocks
A Bitcoin block contains a bunch of data:
It contains a whole bunch of transactions, each of which is verified to be a valid one. The first transaction in it is called the coinbase transaction. The coinbase transaction rewards newly issued coins and fees paid in all the other transactions in that block to the discoverer of the block. People who discover blocks are referred to colloquially as ‘miners.’ All Bitcoins in circulation come into circulation by being rewarded to miners. No other Bitcoins exist.
It also contains a verifiable cryptographic fingerprint or digest of all these transactions (called a merkle root).
It contains the cryptographic fingerprint of the previous block — to prove that it was created only after the previous block was created. This is what chains this block to the previous block to create the famous “blockchain.”
It contains a current date and time.
It contains a couple of other small pieces of data (a version number and a target).
Finally, it contains a special number called a ‘nonce.’ Nonce is short for “number used once.” This nonce is used to prove that this block meets the proof-of-work requirements at the time of its creation. Every node can run this block through the fingerprinting algorithm (called SHA256) and check that the resulting number is smaller than the maximum allowed at the time (the target), thus making the block valid according to the rules of Bitcoin.
Mining
Miners work to discover nonces that satisfy the proof of work requirements for the newest block to be added to the blockchain. This is basically just guesswork like guessing numbers in a giant lottery. The harder they try — that is, the more guesses they make — the sooner they’ll discover valid nonces to blocks and the faster they’ll produce blocks and be rewarded.
However, Bitcoin is designed to keep the pace of blocks coming in at one every ten minutes on average, so roughly every two weeks (or precisely every 2,016 blocks), the difficulty associated with finding a valid block (also known as the target) is recalculated with a precise formula, by every node, to make it harder (or sometimes easier, if necessary).
Because every node uses the same formula on the same data, every node ends up agreeing on the new difficulty target. Miners then need to work as hard as the new difficulty demands to earn the rewards of discovering new valid blocks.
That’s (just about) all, folks:
With just the above mechanisms, Bitcoin runs.
People who have bitcoins, or fractions of them, can send them to anyone else who provides them an address. They prepare a valid transaction and send it to any other node on the network, and that node sends it out to others, and it quickly ends up on every node, where each one ensures that it is, in fact, valid.
Miners take these new valid transactions that haven’t been added to a block yet and try to guess the nonce to a new block containing those transactions (and everything else a block must have).
Sooner or later, one of them finds a valid nonce and shares the whole block with other nodes, who then send it out to others, and it quickly ends up on every node, where each one ensures that it is, in fact, valid. Everybody adds this block to their identical copy of the blockchain as soon as they verify its validity.
New coins get introduced into the system with the coinbase transaction of each block. However, the number of new coins per block keeps getting cut in half roughly every four years (or precisely every 210,000 blocks). This formula ensures that there will only ever be 21 million full Bitcoins.
Nobody can fake anything because everyone checks everything all the time. Any nodes that attempt to misreport any data are unable to get away with any deception because the math behind every transaction and block is what determines the true state of things,
And that’s how Bitcoin really works.
Tomer Strolight is Editor-in-Chief at Swan Bitcoin. He completed bachelors and masters degrees at Toronto’s Schulich School of Business. Tomer spent 25 years operating businesses in digital media and private equity before turning his attention full time to Bitcoin. Tomer wrote the book “Why Bitcoin?” a collection of 27 short articles each explaining a different facet of this revolutionary new monetary system. Tomer also wrote and narrated the short film “Bitcoin Is Generational Wealth”. He has appeared on many Bitcoin podcasts including What Bitcoin Did, The Stephan Livera Podcast, Bitcoin Rapid Fire, Twice Bitten, the Bitcoin Matrix and many more.
News
July 16, 2024
Trump, Bitcoin, and the Swamp
July 16, 2024
Bitcoin on the Ballot
July 12, 2024
CFTC Coming For Bitcoin?
More from Swan Signal Blog
Thoughts on Bitcoin from the Swan team and friends.
New Personal Account, Swan Vault on Mobile App, and Withdrawals to Self-Custody
By Matt Carvalho
We are excited to share the latest improvements to the Swan Bitcoin mobile app, streamlining your Bitcoin buying and storage experience.
How to Set Up Swan Vault: Unlocking Safer Bitcoin Self-Custody
By Matt Carvalho
Discover how Swan Vault puts you in full control of your Bitcoin with a simple, secure setup. See just how easy it is to safeguard your wealth and unlock your monetary autonomy.
Swan Bitcoin and Equity Trust Collaboration Unlocks New Retirement Account Features for Bitcoin Investors
By Brady Swenson
Equity Trust and Swan collaborate to bring new IRA account types and features to Swan’s IRA product.