04 — Bitcoin (L1)
The original blockchain. Designed as peer-to-peer electronic cash. Today primarily a store of value + settlement layer; L2s for payments.
1. Fundamental specifications
| Spec | Value |
|---|---|
| Launch | 2009-01-03 (genesis block) |
| Whitepaper | 2008-10-31 (Satoshi Nakamoto) |
| Consensus | Proof-of-Work (SHA-256d) |
| Block time | 10 minutes (average target) |
| Block size | 1 MB base + witness (after SegWit), effective ~2-4 MB |
| Difficulty adjustment | Every 2016 blocks (~2 weeks) |
| Total supply | 21M BTC (asymptotic) |
| Halvings | Every 210k blocks (~4 years): 50 → 25 → 12.5 → 6.25 → 3.125 BTC |
| Smallest unit | 1 satoshi = 10⁻⁸ BTC |
| Address curve | secp256k1 (ECDSA legacy; Schnorr in Taproot) |
| Hash algorithms | SHA-256 (PoW, txid), RIPEMD-160 (address) |
| Tx model | UTXO |
| Native script | Bitcoin Script (non-Turing-complete) |
| Programming language (Core) | C++ |
| Reference impl | Bitcoin Core (github.com/bitcoin/bitcoin) |
2. Block structure
Block header (80 bytes):
version (4 bytes)
prev_block (32 bytes)
merkle_root (32 bytes)
timestamp (4 bytes)
bits (4 bytes) // difficulty target encoded
nonce (4 bytes)
Tx count (varint)
TransactionsBlock hash = SHA-256(SHA-256(header)).
Merkle root
Hash of the Merkle tree of SHA-256(SHA-256(txid_i)) of the txs in the block.
Enables SPV (Simplified Payment Verification): a light client can verify tx inclusion with \(O(\log n)\) data.
3. Transactions
Structure
version (4 bytes)
input count (varint)
inputs:
prev_output (txid:vout) (36 bytes)
scriptSig length
scriptSig
sequence
output count (varint)
outputs:
value (8 bytes; satoshis)
scriptPubKey length
scriptPubKey
locktime (4 bytes)Script types
| Type | Opcode template | Address |
|---|---|---|
| P2PK (Pay-to-Public-Key) | <pubkey> OP_CHECKSIG |
(no address; raw pubkey) |
| P2PKH (Pay-to-Public-Key-Hash) | OP_DUP OP_HASH160 <hash> OP_EQUALVERIFY OP_CHECKSIG |
Base58 1... |
| P2SH (Pay-to-Script-Hash, BIP 16) | OP_HASH160 <hash> OP_EQUAL |
Base58 3... |
| P2WPKH (Witness Pubkey Hash, SegWit) | OP_0 <hash> |
Bech32 bc1q... (20 bytes) |
| P2WSH (Witness Script Hash, SegWit) | OP_0 <hash> |
Bech32 bc1q... (32 bytes) |
| P2TR (Pay-to-Taproot) | OP_1 <pubkey> |
Bech32m bc1p... |
Lock scripts (timelocks)
- OP_CHECKLOCKTIMEVERIFY (CLTV, BIP 65): absolute timelock.
- OP_CHECKSEQUENCEVERIFY (CSV, BIP 112): relative timelock.
Used in Lightning, HTLCs.
4. Upgrade history
BIPs (Bitcoin Improvement Proposals)
Process: BIP draft → community discussion → soft fork via miner signaling (BIP 9 / Speedy Trial).
Major upgrades
| Year | Upgrade | BIP | Impact |
|---|---|---|---|
| 2012 | P2SH | BIP 16 | Pay-to-script-hash; enables multi-sig |
| 2015 | OP_CLTV | BIP 65 | Absolute timelocks |
| 2016 | OP_CSV | BIP 112 | Relative timelocks |
| 2017-08 | SegWit | BIP 141, 143, 144 | Separates signatures; fixes malleability; effective block size ↑ |
| 2017-08 | Bech32 addresses | BIP 173 | Better error correction |
| 2021-11 | Taproot | BIP 340, 341, 342 | Schnorr signatures, MAST, Tapscript |
| 2021-11 | Bech32m | BIP 350 | Fix Bech32 last-char weakness |
SegWit (2017)
Segregated Witness:
- Separates the script_sig (signature) into a "witness" — does not count toward the 1 MB base block size.
- Weight units (WU): block max 4M WU. Base tx data = 4 WUbyte, witness = 1 WUbyte.
- Effective block: ~1.5-2 MB with a typical mix.
- Fixes malleability: txid does not include the witness — Lightning Network viable.
Taproot (2021)
Schnorr signatures (BIP 340):
- Simpler than ECDSA, clean security proof in ROM.
- Linear: \(\sigma_1 + \sigma_2\) valid for \(P_1 + P_2\). Enables signature aggregation (MuSig2).
- 64 bytes (vs 71-72 ECDSA).
Taproot (BIP 341):
- Output: single 32-byte Schnorr pubkey.
- Single sig, multisig (via MuSig), and complex script — all indistinguishable on-chain on the happy path.
- Script revealed only if necessary (key path vs script path).
Tapscript (BIP 342):
- Modifies Script (adds OP_CHECKSIGADD; removes some legacy opcodes; clean signature behavior).
- 64-byte signatures.
5. Mining
Mechanics
- The miner builds a block template: collects mempool txs, adds the coinbase tx (with block reward + fees).
- Computes the Merkle root.
- Varies the nonce + extranonce in the coinbase until \(H(\text{header}) < \text{target}\).
- Broadcasts the block; peers verify and propagate.
Difficulty adjustment
Every 2016 blocks:
\(T_{\text{expected}} = 2016 \times 600\text{s}\). Bounded [1/4, 4]× per adjustment.
Hashrate
Total network hash power. ~700 EHs in May 2026 (vs ~1 THs in 2010).
Pools
| Pool | Approx share 2026 |
|---|---|
| Foundry USA | 25% |
| AntPool | 20% |
| ViaBTC | 12% |
| F2Pool | 10% |
| Binance Pool | 8% |
| MARA Pool | 5% |
| Others | 20% |
Centralization concern: top 2 pools ~45%. But pool ≠ miner; individual miners can switch pools easily (Stratum V2 helps).
ASICs
Antminer S21 (~225 THs, 18 JTH efficient), Whatsminer M60S+. Bitmain, MicroBT, Canaan dominant.
Mining geography
| Country | Approx share 2026 |
|---|---|
| USA | 38% |
| Kazakhstan | 13% |
| Russia | 12% |
| Canada | 6% |
| Others | 31% |
(China: <1% after the 2021 ban; recovery slow underground.)
6. Economic halving
| Halving | Date | Reward before → after |
|---|---|---|
| #1 | 2012-11-28 | 50 → 25 BTC |
| #2 | 2016-07-09 | 25 → 12.5 BTC |
| #3 | 2020-05-11 | 12.5 → 6.25 BTC |
| #4 | 2024-04-19 | 6.25 → 3.125 BTC |
| #5 (expected) | 2028 | 3.125 → 1.5625 BTC |
Stock-to-flow: Bitcoin scarcity narrative; PlanB's model (2019) that post-halving price tracks. A controversial model (over-fit; the 2021 ATH above, 2022 below).
Mining economics: each halving compresses margins; post-halving bear markets test efficient miners.
7. Lightning Network (L2)
Joseph Poon + Thaddeus Dryja whitepaper 2015. Mainnet 2018.
Mechanics
Payment channels: 2 parties open a multi-sig channel; balance updated off-chain via signed state; eventual on-chain settle.
HTLCs (Hashed Timelock Contracts): enable multi-hop payments — the payer reveals a secret \(x\) such that \(H(x) = h\); intermediate hops conditionally pay.
Onion routing (Sphinx): route encrypted; nodes only know prev+next hop.
Stats (~May 2026)
- ~6000 BTC total capacity.
- ~14000 active nodes.
- Payments instantaneous, sub-cent fees.
Implementations
- LND (Lightning Labs, Go).
- Core Lightning (CLN) (Blockstream, C).
- Eclair (ACINQ, Scala).
- LDK (Lightning Dev Kit) (Spiral, Rust library).
Limitations
- Liquidity routing: directional balance issues.
- Channel rebalancing needed.
- Watchtowers required to prevent counterparty malfeasance during offline periods.
- Channel jamming attacks mitigated in research.
8. Stacks (Bitcoin L2 with smart contracts)
Muneeb Ali + Ryan Shea 2017. Anchored to Bitcoin via Proof-of-Transfer (PoX).
- Clarity language (decidable, no Turing-completeness).
- sBTC: 2-way peg to Bitcoin via threshold signing.
- Native Bitcoin DeFi attempt.
9. Liquid Network
Blockstream, 2018. A federated sidechain with 15 functionaries.
- Confidential Transactions (Pedersen commitments).
- Issued assets (Tether USDt-Liquid, USDC-Liquid).
- 1-minute blocks, 2-block finality.
- L-BTC peg-in/peg-out via federation.
10. Ordinals + Inscriptions
Casey Rodarmor 2023.
Ordinals theory: assign a serial number to each satoshi based on order of mining. Allows non-fungibility ("rare sats").
Inscriptions: arbitrary data inscribed in the witness data of a Taproot tx. Native NFTs on Bitcoin without an L2.
BRC-20: token standard using inscriptions (text JSON). Controversial — bloated the block; raised fees.
Runes (Casey, 2024): a more efficient token protocol. Launched at the 2024 halving.
Atomicals: alternative protocol.
Stamps (SRC-20): data in UTXOs (more permanent than witness, higher fee).
11. RGB
Smart contract layer with "client-side validation" — state lives off-chain, anchored in a Bitcoin tx. Long roadmap; recent traction limited.
12. Bitcoin DeFi (BTCFi)
Emerging 2024-2026:
- Babylon: stake BTC to secure L2s (timestamping). Mainnet Aug 2024.
- CoreDAO: EVM-compatible sidechain using BTC mining hash.
- Bouncebit: LRT on BTC.
- Arch Network: Bitcoin L2 EVM-like.
- BitVM: trustless bridge concept via fraud proofs (theoretical 2023, impl in progress 2024-2025).
- Citrea: ZK rollup on Bitcoin.
13. Privacy in Bitcoin
CoinJoin
Mixing protocol — multiple users combine UTXOs into one tx; who-paid-whom is ambiguous.
- Wasabi Wallet (Wasabi 2.0+).
- Samourai Whirlpool — founders arrested in Apr 2024 (US DOJ alleged money laundering).
- JoinMarket.
PayJoin (BIP 78)
Sender + receiver both contribute inputs — breaks the "common input ownership" heuristic.
Silent Payments (BIP 352)
Reusable addresses without on-chain reuse; receiver computes ECDH with the sender. Native in Bitcoin Core 28.0 (2024).
14. Adoption + investment vehicles
Spot ETFs (US, Jan 2024)
Approved by the SEC:
- BlackRock IBIT
- Fidelity FBTC
- Grayscale GBTC (converted from trust)
- Bitwise BITB
- Ark/21Shares ARKB
- VanEck HODL
- WisdomTree BTCW
- Invesco BTCO
- Valkyrie BRRR
- Hashdex DEFI
- Franklin EZBC
AUM combined > US$ 100B by 2026.
Corporate treasuries
- MicroStrategy (MSTR): ~500k BTC (Michael Saylor).
- Tesla: ~10k BTC (sold partial 2022).
- Block (Square): ~8k BTC.
- Coinbase: ~9k BTC.
- Marathon Digital, Riot Platforms miners: hold BTC.
Nation-state
- El Salvador: legal tender since Sep 2021. ~2700 BTC reserves.
- Bhutan: secret BTC mining via Druk Holding (revealed 2024).
- United States Strategic Bitcoin Reserve: Executive Order 2025 — holds confiscated BTC (~200k BTC).
Bitcoin Cash + Bitcoin SV
Hard forks (2017, 2018). Marginal adoption. BCH still active community; BSV mostly Craig Wright (perjury convictions, COPA lawsuit 2024).
15. Software
| Client | Lang | Share |
|---|---|---|
| Bitcoin Core | C++ | ~95% |
| btcd (Lightning Labs) | Go | ~3% |
| Bcoin (Purse, now discontinued) | JS | < 1% |
| Knots (Luke-Jr fork of Core) | C++ | minority |
| libbitcoin | C++ | research |
16. Limitations and debates
Throughput
7 TPS sustainable. Lightning + sidechains escalate but with trust assumptions.
Energy
150 TWh/year (Argentina). Defenders: growing renewable share; stabilizes the grid (Bitcoin Mining Council estimates 60% renewable in 2024).
Quantum threat
Reused addresses (P2PK in the Satoshi era) are exposed. P2PKHP2SHSegWit/Taproot hide the pubkey until spend — the window after broadcast (not confirmation) is the window of vulnerability.
Mitigation roadmap: BIP draft PQC signing (2024+, Westerbaan/Valsorda).
Censorship resistance
Mempool censorship via mining pool policy possible. States under regulatory pressure may demand it. Stratum V2 improves this (jobs created by miners, not the pool).
Privacy
Pseudonymous, not anonymous. Chain analysis is mature.
17. Metrics
On-chain
- Daily tx: ~500k.
- Hash power: ~700 EH/s.
- UTXO set: ~120M.
- Full nodes: ~16k.
- Mempool fee market: ~50-200 sat/vB typical.
Macro
- Marketcap: ~US$ 2.5T (May 2026).
- Circulating supply: 19.7M / 21M (94%).
- Dominance (% total crypto mcap): ~50%.
18. Bibliography + resources
- Antonopoulos, Mastering Bitcoin, 3rd ed.
- Whitepaper original
bitcoin.org/bitcoin.pdf. - Bitcoin Optech newsletter.
- Bitcoin Magazine.
- BIPs
github.com/bitcoin/bips. - Mempool space
mempool.space. - Glassnode, CryptoQuant for metrics.
- Conferences: Bitcoin Conference (Miami), Adopting Bitcoin (El Salvador), TABConf, BTCPrague.
19. Cross-reference
- Crypto primitives (secp256k1, Schnorr, SHA-256):
../cryptography/05-assimetrica.md,06-hash-e-mac.md. - L2 scaling:
07-l2-scaling.md§Lightning. - Quantum migration:
../cryptography/08-pos-quantica.md. - Privacy techniques:
02-fundamentals.md§Endereços e privacy. - Bitcoin ETF context:
12-tokenomics.md,13-regulation.md. - Mt. Gox, etc.:
14-incidents.md.