If you are new to Bitcoin, then you are in the right place. Here I will give a brief introduction to Bitcoin.
In the most literal sense, Bitcoin is a protocol. A protocol is a set of rules for transmitting data between computers.
What are Bitcoin’s rules? First, let’s discuss what we are trying to solve. On the internet, everything is just 1s and 0s. In real life, things are more complicated. If I send you an image over the internet, I still have the image. If I give you a photograph in real life, I no longer have it.
The internet is very versatile but lacks uniqueness. This becomes a problem for anything which requires uniqueness, such as money.
Money is a medium of exchange.
Money needs to be such that when I give you it, I no longer have it.
The value of money lies in its ability to be transferred.
Nothing on the internet is transferred; rather, it’s copied and shared.
Bitcoins protocol is a transfer simulator.
The Bitcoin Protocol consists of:
- Users
- UTXOs
- Accounts
- Transactions
- Blocks
- Nodes
- Miners
- Proof of Work
Users: You & me
UTXOs: “Bitcoins” don’t exist; UTXOs do. Technically, a “Bitcoin” is a measurement similar to feet, miles, or meters. A “Bitcoin” measures the value of a UTXO (Unspent Transaction Output). The smallest possible value is 0.00000001BTC, also known as 1 SAT (Satoshi). When someone says, “I have 1 Bitcoin,” they actually mean, “I have a certain number of UTXOs whose combined value is 1 Bitcoin.”
Address: In Bitcoin, an address is similar to a bank account, but instead of an account number, you have a public key. This public key is generated from a private key. If you possess a private key, you can always generate the corresponding public key. However, knowing the public key does not allow you to derive the associated private key. Given a public key, anyone can send a UTXO to it. To transfer that UTXO out again, the associated private key is required. A public key can store any number of UTXOs and it is the private key that determines ownership.
Transactions: A transaction consists of inputs, outputs, and a signature. The inputs and outputs are UTXOs. The signature verifies that the input UTXOs can be spent. The essence here is that a transaction contains everything necessary for a transfer, including the verification of ownership. The signature serves as cryptographic proof, allowing us to confirm that the creator of the transaction possesses the private key associated with the public key from which the input UTXOs originate. Therefore, we do not need to know the identity of the creator or the method by which they submitted the transaction.
Blocks: A block is a grouping of transactions, and transactions are settled by becoming part of an accepted block. This is where you may have heard of the term “blockchain.” The blockchain is the ordered list of all accepted blocks since the genesis of Bitcoin. In other words, it is the full list of all accepted transactions in batches. In this transfer simulation system, there’s no need to store the balances of addresses when you have the transactions. You can determine how much money any given address has by examining all the transactions to and from that address.
Nodes: A node is a computer that verifies and relays transactions and blocks to other nodes.
Miners: A miner is a specialized type of node that creates blocks from transactions relayed by other nodes. Miners batch transactions together to form the next block of the blockchain. If their block is accepted, the miner receives all the transaction fees from every transaction in that block plus the block subsidy (explained later).
Proof of Work: Proof of Work (PoW) is the way the protocol comes to consensus. One of the biggest issues of a blockchain is how each block is accepted, more specifically, how all nodes come to a consensus on the next block. The way in which all nodes agree on the next block is called a consensus algorithm. For Bitcoin, the consensus algorithm uses Proof of Work.
Proof of Work refers to the protocol’s rules that define what constitutes a “valid” block. In short, the consensus algorithm declares the first valid block created by a miner as the next block in the chain. New blocks must use this valid block and all other blocks to create a new valid block. Essentially, miners are in a race against each other to create the next valid block.
What makes a block “valid”? The protocol requires a unique digit string (to keep it brief), which can be easily verified once it is created but challenging to generate initially. It is the miner’s job to undertake this initial creation so that everyone else can easily verify it. The key point is not the exact nature of what they are creating, but the fact that it is very hard to create and easy to verify afterwards. This difficulty proves that the miner put in significant effort to work on this block. In practical terms, this means the miner expended energy to create the block since a miner is simply a computer, somewhere, performing computations. Miners strive to make their computers more efficient at solving this task to create blocks faster. Bitcoin expects this and as a result Bitcoin’s protocol will adjust the difficulty to maintain a consistent ~10 min block creation rate. If blocks are being made too fast the difficulty increases and vise versa. The result is that no single miner can create all the blocks and curate which transactions are allowed, as it would require an enormous amount of computational power (energy) to consistently outpace all other miners.
The basic flow of Bitcoin is as follows:
1. A user receives a UTXO to their address.
2. The user creates a transaction by specifying the inputs and outputs and then signs the transaction with their private key associated with the inputs. The user then submits this transaction to a node.
3. The node verifies the transaction in many ways. One check is if the total value of the input UTXOs is greater than the total value of the output UTXOs. The excess amount is considered the transaction fee to be used later. The node also verifies the signature by using both the signature and the public key of the input UTXOs to determine if the private key was used in making the signature. Additional formatting checks are also conducted, and the transaction is then forwarded to other nodes. All nodes that receive this transaction will verify it themselves.
4. A miner will eventually obtain this transaction and store it in their mempool, which is a temporary storage pool for pending transactions. Transactions in the mempool is said to have “0 confirmations.” The miner examines the entire transaction size (in bytes) and the size of the transaction fee. Given that blocks are limited in size, the miner will choose transactions with the highest fees relative to their size to fill the block they are creating. If a user submits a large transaction (many inputs and many outputs) then they will need to give a larger transaction fee for any miner to incorporate that transaction into their block. No transaction is guaranteed to enter a block, it’s completely up to the miners to add the transaction though a high enough fee will convince a miner to include it.
5. The miner goes through the Proof of Work process to create a valid block from the transactions. Once the block is created, it is relayed to the nodes. If the nodes accept the block, future miners will use this block (and all previous blocks) to create the next block in the chain. If the user’s transaction is in the newly created block, it is said to have “1 confirmation.” When a block is added on top of that block, that transaction then has “2 confirmations”, and so forth. Due to the Proof of Work concept, each additional confirmation makes the transaction more entrenched in the blockchain. Standard practice typically requires 3-6 confirmations for a transaction to be considered “settled.”
As a user, you don’t need to understand how nodes and miners work (though knowledge is always powerful) but there is one more thing you should understand, Seed Phrases.
Seed phrases solves the organization of private keys, as said earlier, a private key is required to spend UTXOs from the associated public key. Unlike bank accounts, in Bitcoin, a user uses multiple public key addresses to store their UTXOs. Rather than holding all your UTXOs in 1 public key address, it’s much more private and secure to spread out your UTXOs in multiple public key addresses. The problem with this is that you would need to keep track of all the private keys associated with these addresses.
Seed phrases generate private keys. 1 seed phrase generates infinite private keys.
Private keys are long digit strings, seed phrases are 12 or 24 English words. This means you could memorize a seed phrase thus having access to infinite private keys, a brain wallet.
I don’t recommend memorizing a seed phrase for long term storage but it’s most certainly useful to have that ability. For long term storage, the recommended way is to store your seed phrase on something that can’t be hacked or destroyed easily. The favored solution is metal. Etching your seed phrase on metal ensures that no digital hacker can access it, and no fire or flood could destroy it.
Metal Seed Phrase Plates allow you to store your Bitcoinlike people store their gold; Dug up in the backyard, or nicely kept in a safe.