How do Bitcoin transactions actually work? For example, when you send Bitcoins to a friend, how does that transaction get validated and sent to your friend’s Bitcoin wallet? What is Bitcoin’s blockchain and where is it stored?
Keep reading to learn the answers to these questions and more.
Related: What is Bitcoin?
A common misconception
It is first helpful to first understand what a Bitcoin wallet is and isn’t. The word “wallet” may lead you astray. Your Bitcoin wallet doesn’t actually store Bitcoin in the same way that an actual physical wallet stores coins and bills. To put it another way: your actual Bitcoin funds are not files that are stored within your Bitcoin wallet. Your Bitcoin wallet is merely the key that gives you access to the funds that you control and own.
Essentially, a Bitcoin wallet does two things:
Creates a trail of the transactions you initiate.
Gives you access to the funds associated with your Bitcoin address.
Related: What is a Bitcoin wallet?
What is the Bitcoin blockchain?
Simply put, Bitcoin’s blockchain is a list of verified transactions that are linked together with cryptography.
After the Bitcoin network verifies an individual transaction, it adds the transaction to a block. Every ten minutes, a new block of transactions gets added to the Bitcoin blockchain.
Source: Wikimedia Commons
Once a block of verified transactions is added to the blockchain, SHA-256 encryption ensures that the data remains the same. Each new block contains some information from the previous block. This interconnectedness combined with SHA-256 encryption helps make sure that the data contained on the blockchain stays secure.
There are thousands of copies of Bitcoin’s blockchain
The way that the Bitcoin network stores its blockchain is one of its most innovative features. Instead of storing transaction data in one central location, Bitcoin runs on a redundant, decentralized network of computers called nodes.
What is a Bitcoin node?
Specialized ASIC (Application-Specific Integrated Circuit) chips like this one are used to process transactions on the Bitcoin network. Source: Wikimedia Commons
In the same way that each individual plays a part in building and maintaining an ant mine, each Bitcoin node helps add to and preserve the integrity of the blockchain. But that’s not all that nodes do. Every Bitcoin node contains a complete or partial copy of the blockchain. This redundancy helps guard against fraud and makes the network resistant to shutdowns and outages.
How do nodes generate money?
Everyone who sends Bitcoin must pay a small network fee. Each time a Bitcoin node processes a transaction, it earns a chance to win newly created Bitcoin and the network fees.
The process of competing for and collecting these rewards is called mining. Mining rewards incentivize nodes to continue participating in the process of adding new blocks to the blockchain.
The fact that anyone in the world can set up a Bitcoin node helps guard against the possibility that a single corporation or government will take control of the network.
There’s no easy way to shut down the Bitcoin network
Because thousands of Bitcoin nodes exist, the network is very stable. If a node shuts down, no information is lost and the network doesn’t miss a beat. According to bitnodes.earn.com, there are currently 9,533 Bitcoin nodes. Because these nodes are spread out all over the world, the Bitcoin network is incredibly stable and nearly impossible to shut down.
Built-in fraud safeguards
Satoshi Nakamoto the anonymous person or group that created Bitcoin was concerned about the possibility that fraudsters would engage in double-spending.
Double-spending occurs when someone spends their funds twice. For example, if you were to spend Bitcoin on a car and then buy a second car using funds that should have been deducted from your account, this would be considered to be a successful double-spend attack.
Bitcoin nodes defend against double-spending by checking each transaction that gets sent into the network against the Bitcoin blockchain. If the blockchain shows that there aren’t enough funds in your wallet, the transaction gets rejected. In addition, timestamps give nodes the ability to order incoming transactions properly. This mechanism prevents scammers from gaming the system by quickly firing off multiple invalid transactions.
Sending Bitcoin: how it works from start to finish
Now that you have a good general understanding of how the Bitcoin network works, let’s look at the process of sending Bitcoin from one address to another in more detail.
Step 1: Choose a Bitcoin wallet
The first thing you need to do before you send Bitcoin is to create a Bitcoin wallet. There are five main types of Bitcoin wallets. One thing that they have in common is that they all store your private key and public address.
Online wallets. Online wallets also called hosted wallets run in the cloud. The fact that you can access online wallets anywhere makes them popular and convenient, but there’s a catch: they’re also attractive targets for hackers. When you use an online wallet, you have to not only be very careful but also trust whatever company that runs your cloud wallet to guard your funds properly. The cryptocurrency exchange Coinbase hosts its customers’ wallets on the web.
Desktop wallets. With a desktop Bitcoin wallet, your private key is saved locally instead of on the internet. You can disconnect your computer from the internet when you’re not using it, thus limiting the scope of potential attacks. Electrum is a popular desktop wallet that works with Bitcoin.
Mobile wallets. Mobile Bitcoin wallets are similar to desktop wallets. Both wallet types save your private key to a local file. The main difference is that mobile wallets are more portable and tend to have more features. For example, some mobile Bitcoin wallets give you the ability to purchase things in brick-and-mortar stores. A mobile wallet called Edge supports not only Bitcoin but also 20 additional cryptocurrencies including Ethereum and many others.
Hardware wallets store your private key to a removable device typically a USB drive. They offer even better security than desktop and mobile wallets and are easier to remove from the internet since all you have to do is unplug them from your computer. Their main disadvantage is that they are expensive compared to other Bitcoin wallet types, which are usually free. Trezor and Ledger are two of the most popular hardware wallet makers.
There are many services that will generate a Bitcoin address and private key on the Bitcoin blockchain. One example is BitAddress.org. Once you have this information you can then create what’s known as a paper wallet. All this is is a piece of paper that has your Bitcoin address and private key on it. The main disadvantage of a paper wallet is that if you lose it or if it gets damaged, there is no way to retrieve your funds. Other wallet types have backup and recovery options. You can send as much Bitcoin as you want to your paper wallet, but you’ll need to transfer your private key to a software or hardware wallet when you want to send.
Step 2: Buy Bitcoin
After you’ve chosen a wallet, you’ll need to add funds to your account by buying Bitcoin. If you live in the UK or New Zealand, you can buy Bitcoin quickly and easily through Vimba.
Check out the articles linked below for walkthroughs that explain how to connect your Bitcoin wallet to Vimba and make your first Bitcoin purchase:
Step 3: Initiate your transaction
Many online wallets, mobile wallets, desktop wallets and hardware wallets have built-in “send” buttons, which you can use to send your Bitcoin funds to anyone in the world that has a Bitcoin address. Once you initiate the send, your wallet will release a signal to the Bitcoin network.
Step 4: Wait for confirmation
Once your transaction enters the Bitcoin network, Bitcoin nodes begin to process it and make sure that it is valid.
Most transactions take about ten minutes to process but it could take longer if the network is busy. Some Bitcoin wallets give you the option to customize your transaction fee. This gives you the ability to push a transaction through faster. The more you pay in fees, the higher priority your request will be.
Every Bitcoin transaction has a transaction ID. Your Bitcoin wallet will display your transaction ID after you initiate a transaction. If you want to check the status of your transaction, you can copy and paste your transaction ID into a blockchain explorer.