Bitcoin works by using encryption to transfer bitcoins between bitcoin wallets. Confirmed transactions are recorded on a public ledger (block chain). The work behind this and the scarcity of coins gives Bitcoin value.
Below, we explore the basics of how bitcoin works. Even if you’ve never looked into cryptography or digital currencies before, you should be able to follow along with this explanation. After our basic summary, we’ll take a look at a more in-depth explanation going step-by-step through a bitcoin transaction.
The heart of the bitcoin system is a transaction. In a transaction, someone who has ownership of a bitcoin (we’ll call this person the sender) sends a message to everybody in the bitcoin network that they would like to transfer ownership of their bitcoin to a different member of the network.
A transaction “message” consists of all of the following:
- A list of the bitcoins the sender is using as well as where the sender got these bitcoins from
- Where the sender wants to send these bitcoins
- How much of these bitcoins the sender wants back (kind of like paying for something with a $20 bill and asking for change)
After making this transaction “message”, the sender will put their digital signature on the message. They do this in such a way that only the sender can put this signature on the message, but anybody in the network can verify that it was the sender who signed the message. This is done through the use of public-key cryptography.
The other key feature in the bitcoin system is the Transaction Block Chain. This is basically a public ledger which has the record of every transaction since the very beginning of bitcoin. By checking the public ledger, anyone can verify both that some member of the network actually has ownership of the bitcoins that they say they do and that the member hasn’t already spent those bitcoins in a different transaction.
After the sender broadcasts the transaction to the entire bitcoin network, their transaction needs to get incorporated into the permanent public record so that everyone can see that those bitcoins were spent by the sender.
There are some special members of the bitcoin network who help to record transactions. These special members – called “mining nodes”, or “miners” for short – collect all of the transactions that people want to make over some period of time. They then verify the transaction by checking the public ledger to see if the sender does own the bitcoins being spent. The miners then combine all of these verified transactions into one single block (called a Transaction Block).
In order to add a transaction block to the transaction block chain, the miner has to solve a difficult computational problem – this is basically a mathematical puzzle which is hard to find a solution for but is easy to check and see if a solution is right. This mathematical puzzle is called a “Proof of Work” scheme or protocol.
Proof of Work
All of the miners are working on this at the same time. Whichever miner solves this proof of work puzzle first sends their solution out to everybody. After a solution is broadcasted to all of the network, the transaction block is added to the public ledger, and then each transaction is complete and permanently added to the ledger.
From that point forward, anyone who checks the ledger will see that the sender has spent those bitcoins in the past and that those bitcoins have a new owner.
Trading Bitcoin for Other Currencies
At a high level, this is how the entire bitcoin system works. This is why you can trade bitcoins for other types of currencies; you simply make a payment in another currency to an exchange, and a bitcoin exchange then makes a transaction to you for the number of bitcoins you bought. This is also why you can save and spend bitcoins to make purchases; once you have bitcoins, so long as you don’t make a transaction giving them to another person, the public ledger will always have proof that you own those bitcoins.
"How Does Bitcoin Work?" contains information about the following Cryptocurrencies: