How does Bitcoin work?
You’ve probably heard that Bitcoin (and blockchain technology) is a revolutionary invention. Well, it is! For the first time ever, we now have the ability to send digital payments to each other in a completely decentralized manner. Up until 2009, we needed a bank, a credit card or another intermediary like Paypal to middleman our digital transactions.
Well, those days are over. Everyone can now be their own bank. No financial institution required anymore to store your funds and send/receive transactions. All we need now is more adoption, which will come with time. If you’re reading this before 2025, you’re one of the early ones.
So, you might be wondering how it all works. From the moment you send a transaction to when your friend receives it – what was happening “under the hood” (so to speak) to make it happen? Well, that’s the question this article is going to answer..
Bitcoin Transaction Processing Explained
When you send a transaction, you’re essentially broadcasting it to the network. The transaction details will include information such as your public address, the recipients public address, and the amount of Bitcoin being sent.
Once the transaction gets broadcasted, it’ll get picked up by nodes on the network (called full nodes) which will validate the details. What details? They’ll make sure that the sender has an adequate amount of bitcoin to cover the amount being sent, and that the inputs of the transaction have not been previously spent.
Once the transaction has been validated, it then gets added to a pool of unconfirmed transactions (known as the “mempool”). Think of the mempool like a storage and sorting area for “fresh” transactions before being added to a newly created block.
The next step, obviously, is to confirm the transactions by adding them to a block (for the blockchain). This is done through a process called “mining”, which is handled by miners (people), who are running miner nodes. A miner node can be a computer, server or specialized mining rig like the “Antminer S19 Pro”.
For an in-depth, beginner friendly article on the mining process, read this article.
New blocks are created by solving complex math problems which require a great deal of computational power. That’s basically what “mining” refers to in the context of proof of work blockchains.
Once a new block (which contains a list of recent transactions) is created by the miner who successfully solved the math puzzle, it then gets broadcasted to the network. When this happens, the other miners on the network will verify the block to make sure it’s valid, then it’ll get added to the blockchain.
The miner(s) who first solved the problem to create the block will receive the block reward. This reward gets paid out in both transaction fees and newly minted bitcoin. The mining rewards are hard-coded to progressively decrease every 210,000 blocks, which is known as the “bitcoin halving” (read more about it here).
Once a transaction has been included in a block, it is then considered to be confirmed. A confirmed transaction, by definition, means that it has been accepted by the network and can’t be reversed.
There’s something called “public key cryptography” which also plays a major role in the Bitcoin transaction process, but I’ve already written an article on public key cryptography, so you can just read that if you want to learn more.
Summary
The Bitcoin blockchain is essentially a decentralized (public) ledger that records all the transactions that have taken place. The transactions are processed by “miners”. Miners are nodes using specialized hardware/software to validate the transactions. This is done by solving complex math puzzles. This computational effort is known as “proof of work”.