04 — Bitcoin (L1)
A blockchain original. Designed como peer-to-peer electronic cash. Hoje primariamente store of value + settlement layer; L2s para payments.
1. Especificações fundamentais
| Spec | Valor |
|---|---|
| Launch | 2009-01-03 (genesis block) |
| Whitepaper | 2008-10-31 (Satoshi Nakamoto) |
| Consensus | Proof-of-Work (SHA-256d) |
| Block time | 10 minutos (target médio) |
| Block size | 1 MB base + witness (após SegWit), efetivo ~2-4 MB |
| Difficulty adjustment | Every 2016 blocks (~2 weeks) |
| Total supply | 21M BTC (asymptotic) |
| Halvings | A cada 210k blocos (~4 anos): 50 → 25 → 12.5 → 6.25 → 3.125 BTC |
| Smallest unit | 1 satoshi = 10⁻⁸ BTC |
| Address curva | secp256k1 (ECDSA legacy; Schnorr em Taproot) |
| Hash algoritmos | SHA-256 (PoW, txid), RIPEMD-160 (address) |
| Tx model | UTXO |
| Native script | Bitcoin Script (não-Turing-completo) |
| Programming language (Core) | C++ |
| Reference impl | Bitcoin Core (github.com/bitcoin/bitcoin) |
2. Estrutura do bloco
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 da árvore de Merkle de SHA-256(SHA-256(txid_i)) das txs no bloco.
Permite SPV (Simplified Payment Verification): cliente light pode verificar inclusão de tx com \(O(\log n)\) data.
3. Transações
Estrutura
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.
Usado em Lightning, HTLCs.
4. Histórico de upgrades
BIPs (Bitcoin Improvement Proposals)
Process: BIP draft → community discussion → soft fork via miner signaling (BIP 9 / Speedy Trial).
Major upgrades
| Ano | Upgrade | BIP | Impacto |
|---|---|---|---|
| 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 | Separa 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:
- Separa script_sig (signature) para "witness" — não conta para 1 MB base block size.
- Weight units (WU): bloco max 4M WU. Base tx data = 4 WUbyte, witness = 1 WUbyte.
- Effective block: ~1.5-2 MB com mix típico.
- Fix malleability: txid não inclui witness — Lightning Network viável.
Taproot (2021)
Schnorr signatures (BIP 340):
- Mais simples que ECDSA, prova de segurança limpa em ROM.
- Linear: \(\sigma_1 + \sigma_2\) válido para \(P_1 + P_2\). Permite signature aggregation (MuSig2).
- 64 bytes (vs 71-72 ECDSA).
Taproot (BIP 341):
- Output: single 32-byte Schnorr pubkey.
- Single sig, multisig (via MuSig), e complex script — todos indistinguíveis on-chain quando happy path.
- Script revealed only se necessário (key path vs script path).
Tapscript (BIP 342):
- Modifica Script (adds OP_CHECKSIGADD; remove some legacy opcodes; clean signature behavior).
- 64-byte signatures.
5. Mining
Mecânica
- Miner constrói block template: collects mempool txs, adiciona coinbase tx (com block reward + fees).
- Computa Merkle root.
- Varia nonce + extranonce no coinbase até \(H(\text{header}) < \text{target}\).
- Broadcast bloco; peers verificam e propagam.
Difficulty adjustment
Cada 2016 blocos: $\(D_{\text{new}} = D_{\text{old}} \times \frac{T_{\text{expected}}}{T_{\text{actual}}}\)$
\(T_{\text{expected}} = 2016 \times 600\text{s}\). Bounded [1/4, 4]× per adjustment.
Hashrate
Total network hash power. ~700 EHs em mai2026 (vs ~1 TH/s em 2010).
Pools
| Pool | Share aprox 2026 |
|---|---|
| Foundry USA | 25% |
| AntPool | 20% |
| ViaBTC | 12% |
| F2Pool | 10% |
| Binance Pool | 8% |
| MARA Pool | 5% |
| Outros | 20% |
Centralization concern: top 2 pools ~45%. Mas pool ≠ miner; individual miners podem switch pools easily (Stratum V2 helps).
ASICs
Antminer S21 (~225 THs, 18 JTH efficient), Whatsminer M60S+. Bitmain, MicroBT, Canaan dominantes.
Mining geography
| País | Share aprox 2026 |
|---|---|
| EUA | 38% |
| Cazaquistão | 13% |
| Rússia | 12% |
| Canadá | 6% |
| Outros | 31% |
(China: <1% após ban 2021; recovery slow underground.)
6. Halving econômico
| Halving | Data | Reward antes → depois |
|---|---|---|
| #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; modelo de PlanB (2019) que post-halving price tracks. Modelo controvertido (over-fit; ATH 2021 acima, 2022 abaixo).
Mining economics: cada halving comprime margin; bear markets pós-halving testam efficient miners.
7. Lightning Network (L2)
Joseph Poon + Thaddeus Dryja whitepaper 2015. Mainnet 2018.
Mecânica
Payment channels: 2 parties open multi-sig channel; balance updated off-chain via signed state; eventual on-chain settle.
HTLCs (Hashed Timelock Contracts): enable multi-hop payments — payer reveals secret \(x\) such that \(H(x) = h\); intermediate hops conditionally pay.
Onion routing (Sphinx): route encrypted; nodes só know prev+next hop.
Stats (~mai/2026)
- ~6000 BTC capacity total.
- ~14000 nodes ativos.
- 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.
- Channel jamming attacks mitigated em pesquisa.
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 para Bitcoin via threshold signing.
- Native Bitcoin DeFi attempt.
9. Liquid Network
Blockstream, 2018. Sidechain federada com 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 serial number to each satoshi based on order of mining. Allows non-fungibility ("rare sats").
Inscriptions: arbitrary data inscribed em witness data of Taproot tx. NFTs nativos em Bitcoin sem L2.
BRC-20: token standard usando inscriptions (text JSON). Controversial — bloated bloco; aumentou fees.
Runes (Casey, 2024): mais eficiente token protocol. Lançado em halving 2024.
Atomicals: alternative protocol.
Stamps (SRC-20): data em UTXOs (more permanent que witness, maior fee).
11. RGB
Smart contract layer "client-side validation" — state lives off-chain, anchored em Bitcoin tx. Roadmap longo; recent traction limited.
12. Bitcoin DeFi (BTCFi)
Emerging 2024-2026:
- Babylon: stake BTC para securizar L2s (timestamping). Mainnet ago/2024.
- CoreDAO: EVM-compatible sidechain using BTC mining hash.
- Bouncebit: LRT em BTC.
- Arch Network: Bitcoin L2 EVM-like.
- BitVM: trustless bridge concept via fraud proofs (theoretical 2023, impl in progress 2024-2025).
- Citrea: ZK rollup em Bitcoin.
13. Privacy em Bitcoin
CoinJoin
Mixing protocol — múltiplos users combinam UTXOs em uma tx; quem-pagou-quem ambíguo.
- Wasabi Wallet (Wassabi 2.0+).
- Samourai Whirlpool — fundadores presos em abr/2024 (US DOJ alleged money laundering).
- JoinMarket.
PayJoin (BIP 78)
Sender + receiver contribuem ambos inputs — quebra heuristic "common input ownership".
Silent Payments (BIP 352)
Reusable addresses sem on-chain reuse; receiver computes ECDH com sender. Native em Bitcoin Core 28.0 (2024).
14. Adoption + investment vehicles
Spot ETFs (US, jan/2024)
Approved by 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 desde set/2021. ~2700 BTC reserves.
- Bhutan: secret BTC mining via Druk Holding (reveal 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, agora discontinued) | JS | < 1% |
| Knots (Luke-Jr fork de Core) | C++ | minoria |
| libbitcoin | C++ | research |
16. Limitations e debates
Throughput
7 TPS sustainable. Lightning + sidechains escalate but with trust assumptions.
Energia
150 TWh/ano (Argentina). Defensores: renewable share crescente; estabiliza grid (Bitcoin Mining Council estima 60% renewable em 2024).
Quantum threat
Addresses reused (P2PK no Satoshi era) expostos. P2PKHP2SHSegWit/Taproot ocultam pubkey até spend — janela após broadcast (não confirmação) é window of vulnerability.
Mitigation roadmap: BIP draft PQC signing (2024+, Westerbaan/Valsorda).
Censorship resistance
Mempool censorship via mining pool policy possible. Estados em pressão regulatory pode demand. Stratum V2 melhora (jobs created by miners, not pool).
Privacy
Pseudonymous, not anonymous. Chain analysis maduro.
17. Métricas
On-chain
- Daily tx: ~500k.
- Hash power: ~700 EH/s.
- UTXO set: ~120M.
- Full nodes: ~16k.
- Mempool fee market: ~50-200 sat/vB típico.
Macro
- Marketcap: ~US$ 2.5T (mai/2026).
- Circulating supply: 19.7M / 21M (94%).
- Dominance (% total crypto mcap): ~50%.
18. Bibliografia + recursos
- Antonopoulos, Mastering Bitcoin, 3ª ed.
- Whitepaper original
bitcoin.org/bitcoin.pdf. - Bitcoin Optech newsletter.
- Bitcoin Magazine.
- BIPs
github.com/bitcoin/bips. - Mempool space
mempool.space. - Glassnode, CryptoQuant para metrics.
- Conferences: Bitcoin Conference (Miami), Adopting Bitcoin (El Salvador), TABConf, BTCPrague.
19. Referência cruzada
- Cripto primitivas (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-fundamentos.md§Endereços e privacy. - Bitcoin ETF context:
12-tokenomics.md,13-regulacao.md. - Mt. Gox, etc.:
14-incidentes.md.