Bitcoin Basics
Bitcoin is the first successful implementation of blockchain technology. Understanding Bitcoin deeply provides the foundation for understanding all subsequent blockchains, including Solana.
How Bitcoin Works: A Complete Picture
Let's trace what happens when Alice sends Bitcoin to Bob.
Step 1: Creating the Transaction
Alice wants to send 0.5 BTC to Bob. Her wallet software creates a transaction:
Step 2: Broadcasting to the Network
Alice's wallet broadcasts the transaction to connected nodes. Those nodes:
- Validate the transaction (signature valid? inputs unspent?)
- Propagate to their connected peers
- Add to their mempool (pending transaction pool)
Within seconds, the transaction reaches most of the network through gossip protocol.
Step 3: Mining a Block
Miners collect transactions from their mempool and attempt to create a valid block.
The difficulty target requires the block hash to have a certain number of leading zeros:
Step 4: Block Propagation
When a miner finds a valid block:
- They broadcast it to the network
- Nodes validate:
- Block hash meets difficulty target
- All transactions are valid
- Coinbase reward is correct
- Previous block hash references valid chain tip
- Nodes update their chain and mempool
- Other miners abandon current work and start on new block
Step 5: Confirmation
Alice's transaction is now "1 confirmation" deep. Each additional block adds more security:
Why 6 confirmations? To reverse a transaction, an attacker would need to re-mine all subsequent blocks faster than the honest network. With each confirmation, this becomes exponentially harder.
The UTXO Model
Bitcoin uses Unspent Transaction Outputs (UTXOs) to track balances.
Mental Model: Digital Cash Envelopes
Think of UTXOs as sealed envelopes of cash:
UTXO vs Account Model
Bitcoin's UTXO model differs from Ethereum's account model:
| UTXO (Bitcoin) | Account (Ethereum) |
|---|---|
| Track individual "coins" | Track balances |
| Stateless verification | Stateful |
| Parallel processing easier | Sequential processing |
| Privacy via new addresses | Address reuse common |
| Change outputs | No change needed |
Solana uses an account model, but understanding UTXO helps you appreciate the design trade-offs.
UTXO Code Example
Bitcoin Script
Bitcoin transactions use a stack-based scripting language called Script.
How Script Works
Script is intentionally limited:
- No loops (prevents infinite execution)
- No state (each script execution is independent)
- Stack-based execution
Script Limitations
Bitcoin Script intentionally can't do everything:
This simplicity is a feature—it makes Bitcoin highly secure and predictable. Ethereum (and Solana) opted for more expressive smart contracts with different trade-offs.
Mining Economics
Block Rewards and Halving
Bitcoin's monetary policy is fixed in code:
Total supply: 21,000,000 BTC (asymptotically approached)
Transaction Fees
As block rewards decrease, transaction fees become more important:
Miners prioritize transactions by fee rate (satoshis per virtual byte):
Security Guarantees
51% Attack
If an attacker controls >50% of hash power:
Why it's hard:
- Bitcoin's hash rate is ~500 EH/s (500 quintillion hashes/second)
- Requires specialized hardware worth billions
- Attack would crash BTC price, devaluing attacker's investment
Selfish Mining
A miner with significant hash power might:
- Mine blocks secretly
- Wait for the honest network to find a block
- Release their longer chain, orphaning honest blocks
This can provide >proportional rewards but requires ~25-33% hash power to be profitable.
Common Misconceptions
"Bitcoin transactions are anonymous"
Reality: Bitcoin is pseudonymous, not anonymous. All transactions are public and traceable. Sophisticated chain analysis can often link addresses to identities.
"Bitcoin is slow"
Reality: Bitcoin prioritizes security and decentralization. 7 TPS is a design choice, not a limitation. Layer 2 solutions (Lightning Network) enable millions of TPS for smaller transactions.
"Bitcoin wastes energy"
Reality: Complex topic. Bitcoin's energy use secures a global monetary network. The relevant comparison is to traditional financial system energy use, not to zero energy use.
Key Takeaways
- Transactions spend UTXOs and create new ones
- Mining is competitive search for valid block hashes
- Consensus emerges from economic incentives + longest chain rule
- Security increases with each confirmation
- Script is intentionally limited for security
Deep Dive: Transaction Validation
A node validates every transaction by checking:
Try It Yourself
-
Explore a transaction: Go to mempool.space, find a recent transaction, and identify the inputs, outputs, and fee.
-
Calculate confirmations: If a block is mined roughly every 10 minutes, how many confirmations would a transaction have after 1 hour?
-
UTXO math: Alice has UTXOs worth 0.5, 0.3, and 0.1 BTC. She wants to send 0.6 BTC. Which UTXOs should she use, and how much change will she receive (assuming 0.0001 BTC fee)?
Next: Ethereum Basics - How Ethereum expanded the blockchain paradigm with smart contracts.