03 — Mecanismos de Consenso

Como blockchains atingem acordo distribuído sobre ordem de transações. Sem consenso, sem blockchain.


1. Taxonomia

Família Exemplos Característica
Proof-of-Work (PoW) Bitcoin, ETC, Litecoin, Monero, Dogecoin Custo energético; Nakamoto-style
Proof-of-Stake (PoS) Ethereum 2.0, Solana, Cardano, Avalanche, Polkadot, Cosmos Custo capital; pode ser BFT ou chain
Byzantine Fault Tolerant (BFT) Tendermint, HotStuff (Aptos, Sui, Diem), Algorand BA*, IBFT Finality determinística; comunicação alta
Proof-of-Authority (PoA) BSC (parcial), Polygon PoS (parcial), private chains Validators conhecidos, low decentralization
DAG-based Hashgraph, Avalanche (Snowman), IOTA, Conflux Não-linear; potencial alta TPS
Proof-of-History (PoH) Solana VDF sequential; ordering pre-consensus
Proof-of-Space / Proof-of-Spacetime Chia, Filecoin, Spacemesh Storage como recurso
Proof-of-Burn Counterparty (legacy), Slimcoin Sacrifício de tokens
Proof-of-Coverage Helium Wireless coverage demonstration
Hybrid Decred (PoW + PoS), Filecoin (PoSt + EC) Combinações

2. Proof-of-Work (PoW)

Originado em Hashcash (Adam Back, 1997). Aplicado a blockchain por Satoshi (2008).

Mecânica

Bloco header tem campo nonce. Miner varia nonce até: $\(H(\text{header}) < \text{target}\)$

Target = 2^256 / difficulty. Difficulty ajusta a cada 2016 blocos (Bitcoin) para manter ~10 min/bloco.

Cadeia mais pesada (Nakamoto consensus)

Nó escolhe chain com mais trabalho acumulado (não comprimento). Reorgs possíveis até finality probabilística (6 confirmações ≈ ~99.99% safe).

Algoritmos

Algoritmo Chain Característica
SHA-256d Bitcoin ASIC-dominated
Scrypt Litecoin Memory-hard (em teoria; ASICs eventualmente)
Ethash Ethereum 1.0 (pre-Merge), ETC Memory-hard, GPU-friendly até 2022
RandomX Monero CPU-friendly, ASIC-resistant
kHeavyHash Kaspa Custom
Blake2b Sia (Siacoin)
CryptoNight Monero (legacy)
Equihash Zcash (legacy, ZIP-208 pre-Halo) Memory-hard
ProgPoW proposed for ETH (rejected) GPU-tuned
X11 Dash 11 hash functions chain

Pros / Cons

Pros:

  • Battle-tested (Bitcoin 15+ anos).
  • Sybil resistance via real-world cost (energia).
  • Simples conceitualmente.
  • Não exige social trust (just hashes).

Cons:

  • Consumo energético massivo (~150 TWh/ano Bitcoin global, ~Argentina).
  • Mining centralization (China + EUA + Cazaquistão dominam; pools concentram).
  • Reorg risk de small chains.
  • Slow finality (~60 min Bitcoin probabilística).

Estado em 2026

Bitcoin: ~700 EHs hashrate. Halving #4 em 2024 (3.125 BTCblock). Próximo halving 2028.

Ethereum: completou The Merge em set/2022; PoW desativado. Ethereum Classic continua PoW.


3. Proof-of-Stake (PoS)

Stake (tokens) como collateral. Validators selecionados proportional ao stake. Misbehaving = slash (lose stake).

Variantes

Chain-based PoS (Nakamoto-style PoS)

Validator selecionado por algorithm (VRF, randomness) constructs block. Chain selection like PoW mas weighted by stake.

Exemplos: Peercoin (2012, primeiro), Cardano (Ouroboros).

Committee-based / BFT-PoS

Subset de validators (committee) runs BFT consensus em cada slot. Determinístico finality.

Exemplos: Cosmos (Tendermint), Algorand (BA*), Ethereum 2.0 (Casper FFG + LMD-GHOST).

DPoS (Delegated PoS)

Token holders vote para um set pequeno de delegates (21 EOS, 100 Tron). Faster but lower decentralization.

Exemplos: EOS (legacy), Tron, BSC (parcial), Steem.

Ethereum 2.0 (post-Merge)

  • Validators: 32 ETH stake per validator slot. Atualmente ~1M validators ativos.
  • Beacon Chain: PoS chain consensus.
  • Slot: 12 segundos. Validator chosen via RANDAO to propose block.
  • Epoch: 32 slots (~6.4 min). Attestations finalizam epochs.
  • Casper FFG (Friendly Finality Gadget): 2 epochs sem desafio → finality.
  • LMD-GHOST: fork choice within finalized chain.
  • Slashing: surround vote / double vote → forfeit ETH (1-100% based on severity + correlation).

Slashing conditions

  • Double signing: assinar dois blocos no mesmo slot.
  • Surround vote: attestation conflicting with prior.
  • Inactivity leak: < 2/3 online → progressive penalty para offline (forces finality recovery).

MEV no PoS

Proposer-Builder Separation (PBS): validator (proposer) não constrói bloco; recebe pré-construído de builder que outbid em mev-boost auction.

Flashbots mev-boost: software que separa builder de proposer. ~90% dos blocos Ethereum usam mev-boost. Builders dominantes: Beaverbuild, rsync, Titan.

Inclusion lists (EIP-7547, em discussão): proposer pode forçar inclusão de certas txs.

Pros / Cons

Pros:

  • Energia ~99.9% menor que PoW.
  • Faster finality (em BFT-PoS, segundos).
  • Slashing punir bad actors.
  • Economic security explicit (\(1B+ staked = \)1B+ cost to attack).

Cons:

  • Nothing-at-stake (theoretical; mitigado por slashing).
  • Wealth concentration → power concentration.
  • Initial distribution problem ("rich get richer").
  • Long-range attack: validator com stake antigo pode forjar history (requires weak subjectivity).
  • Liquid staking centraliza (Lido controla 30%+ do staking ETH 2026).

4. Tendermint / Cosmos

Jae Kwon, Ethan Buchman 2014–2016. Tendermint BFT + Cosmos SDK.

Tendermint consensus

Round-based BFT:

  1. Propose: leader sends block.
  2. Prevote: validators vote.
  3. Precommit: validators commit if 2/3+ prevoted.
  4. Commit: block finalized if 2/3+ precommitted.

Each round ~2-7s. Instant finality após commit.

Requires \(n \geq 3f + 1\) for \(f\) Byzantine.

Cosmos SDK

Framework Go para construir blockchains app-specific. Adoção: Osmosis, Injective, Akash, Kava, Stargaze, Sei, Celestia.

IBC (Inter-Blockchain Communication)

Protocol para transfer + messaging entre Cosmos chains. Padronizado, native. Vê 11-bridges-interop.md.


5. HotStuff (Aptos, Sui, Diem legacy)

Maofan Yin et al. 2018 (Facebook Diem research). Refinement de PBFT com:

  • Linear communication: \(O(n)\) msgs por round (vs \(O(n^2)\) PBFT).
  • Responsiveness: progress at network speed, not timeout-driven.
  • Chain quorum certificates (QCs): pipeline 3 rounds.

Adoção:

  • Aptos (DiemBFT v4 = HotStuff variant).
  • Sui (Narwhal + Bullshark — DAG + HotStuff).
  • Monad (parallel EVM + HotStuff-style).
  • Diem (descontinuado 2022).

6. Algorand

Silvio Micali 2017 (Turing Award 2012). BFT-PoS com VRF.

Mechanics

  1. Block proposer chosen via VRF (verifiable random function): each validator computes; only winners ( top of probabilistic threshold) propose.
  2. Committee also chosen via VRF.
  3. BA★ (Byzantine Agreement star): VRF-based committee runs Byzantine agreement.

Properties

  • Pure PoS: stake é só ingresso (no slashing in original; added later).
  • Finality: instant (committee approves block).
  • Fork-free: VRF + BA★ guarantees single chain.

Adoption

ASA (Algorand Standard Assets), Folks Finance, Algofi (defunct). USDC native em Algorand. Adoção institucional > retail.


7. Avalanche

Emin Gün Sirer et al. 2018. Family of consensus protocols.

Avalanche / Snowman

Repeated sub-sampled voting:

  1. Validator queries random \(k\) peers.
  2. Asks "what's the head?".
  3. If \(\alpha\) of \(k\) agree → adopt.
  4. Repeat \(\beta\) times → confident finalization.

Probabilistic finality em ~1s.

Three chains

  • X-chain (Avalanche Native): UTXO + Avalanche consensus.
  • C-chain (Contract): EVM-compatible, Snowman.
  • P-chain (Platform): validator management + subnet coordination.

Subnets

Custom blockchain spawn (now "L1s" rebranding 2024). Permissioned ou public.


8. Cardano

Charles Hoskinson (Ethereum cofounder), IOHK. Launch 2017.

Ouroboros

Proof-of-Stake research-led family of protocols (Praos, Genesis, Hydra).

  • Slots: 1 second.
  • Epoch: 432k slots (5 dias).
  • Slot leader: chosen via VRF, weight-proportional to stake.
  • Coin age: not used (vs older PoS designs).

eUTXO model

Extended UTXO: outputs can carry datum + script (validator). Plutus = Haskell-based smart contract platform.

Stake pools

Delegate stake (ADA) to a pool. Pool operator runs node. Rewards distributed proportional. Saturation point (~70M ADA per pool) discourages concentration.

Tempo histórico

Academic research foco: papers publicados antes de código (IOHK + Univ Edinburgh + Lancaster + Tokyo). Marca "evidence-based" mas critica de slow shipping (smart contracts só em set/2021).


9. Polkadot

Gavin Wood (Ethereum cofounder). Launch 2020.

Architecture

  • Relay Chain: PoS, BFT (GRANDPA finality + BABE block production).
  • Parachains: independent chains plugged into relay; share security.
  • Auctions: leases for parachain slots (1-2 years).
  • Crowdloans: locked DOT lent to parachains.

Crypto

  • BABE: block production via VRF, Ed25519.
  • GRANDPA: finality gadget. Asynchronous safety + dynamic availability.

Parachains notáveis

Moonbeam (EVM), Acala (DeFi), Astar, Phala, Kusama (canary), Centrifuge.

Polkadot 2.0 (2024+)

Shift from auctions to agile coretime — flexible compute purchase. JAM (Join-Accumulate Machine) — modular execution model.


10. Solana

Anatoly Yakovenko + Eric Williams 2017–2020.

Proof-of-History (PoH)

Not consensus mechanism; it's pre-consensus ordering.

Sequential VDF: validator runs \(H(H(H(\dots)))\) producing chain de timestamps verifiable. Allows validators to agree on order without communication.

T0: hash0
T1: hash1 = SHA256(hash0)
T2: hash2 = SHA256(hash1 || tx_at_T2)
...

Tower BFT

PBFT variant using PoH timestamps. Slot leader rotates per ~400ms slot.

Pros / Cons

Pros:

  • Throughput: ~3000-5000 TPS sustained, peaks 65k.
  • Latency: ~400ms block, ~1.5s finality (32 slots TLF).
  • Low fees: ~US$0.0001/tx.
  • Parallel execution (Sealevel).

Cons:

  • Validator HW expensive (high decentralization cost; ~3000 validators).
  • Stability: outages históricas (set2021 16h, jan2022, jun2022, fev2023, etc.).
  • Single client (Solana Labs) — Firedancer (Jump Trading) client em testnet 2024, mainnet 2025.

Sealevel

Parallel execution: txs declaram read/write accounts; conflicts detectados; non-conflicting paralelizados.


11. DAGs

Directed Acyclic Graph ao invés de chain linear.

Hashgraph (Hedera)

Mance Harmon + Leemon Baird 2016. Gossip about gossip + virtual voting. Patenteado (closed-source até 2018, open desde então). Permissioned (Hedera Council).

IOTA Tangle

Tx pré-anexa 2 outros txs. PoW per tx. Coordinator required for security until 2.0. Adoption: mostly IoT pilots.

Conflux

Tree-Graph hybrid. Inclusive blocks (uncle-style mas weighted properly).

Avalanche Snowman

Strictly speaking chain not DAG, but Avalanche X-chain (DAG-based).

Aleph Zero

DAG + AlephBFT. Sub-second finality. Privacy via ZK in roadmap.


12. Proof-of-Space / PoSt

Chia

Bram Cohen (BitTorrent inventor) 2017.

  • Plotting: precompute large files (proofs of space) on disk.
  • Farming: scan plots for valid proofs at each challenge.
  • VDF: Wesolowski VDF para timing entre blocks (Time Lord).

Tagline: "green Bitcoin" (mas plotting causa lots of SSD writes).

Filecoin

Protocol Labs (Juan Benet) 2020.

  • Proof-of-Replication (PoRep): prove armazenamento único de file.
  • Proof-of-Spacetime (PoSt): prove continuous storage over time.
  • Expected Consensus (EC): leader election weighted by storage power + VRF.

Spacemesh

PoSt + PoET (Proof-of-Elapsed-Time, Intel SGX-based originally, depois software). Smesher = home miner. Launched 2023.


13. Proof-of-Authority

Validators são named, trusted entities. Sem mining, sem stake significant.

Exemplos

  • POA Network (legacy).
  • VeChain Authority Masternodes.
  • xDai (Gnosis Chain) PoA → POSDAO.
  • BNB Chain (BSC): 21 validators initially Binance-selected; agora algumas elections.
  • Polygon PoS: 100 validators, primary Polygon Labs.

Pros / Cons

Pros: Fast, cheap, predictable. Cons: Centralized — atacante regulatório só precisa pressionar validators.

Common pattern: launch PoA → migrate to PoS or hybrid over time.


14. Hybrid e exotics

Decred

PoW (Blake-256) + PoS (stakeholders vote on PoW blocks). Treasury governance built-in.

Filecoin

PoSt + EC (above).

Helium

Proof-of-Coverage. Mineradores demonstram wireless coverage. Tornou-se Solana token 2023.

Internet Computer (ICP)

Dfinity. Threshold signatures + chain-key cryptography. Subnet-based scalability. Reverse-gas (developer pays).

Ethereum Casper FFG + LMD-GHOST

Casper FFG = finality gadget; LMD-GHOST = fork choice; Casper-FFG-on-top finalizes.


15. Finalidade

Tipo Exemplos Tempo
Probabilística Bitcoin (6 confirms ≈ 99.99%) ~60 min
Eventual deterministic Ethereum (Casper FFG após 2 epochs) ~13 min
Instant (BFT) Tendermint, HotStuff, Algorand 1-3 s
Sub-second Solana (single slot), Aleph Zero < 1 s
Off-chain instant + on-chain settle Rollups, state channels depends on L1

16. Comparação prática

Chain Consensus Finality TPS sustained Validators Decentralization rating (informal)
Bitcoin PoW SHA-256 ~60 min (6 confirm) 7 N/A (~15k full nodes; ~10 pool dominant) high
Ethereum (post-Merge) PoS Casper FFG + LMD-GHOST 12-15 min (2 epochs) 15 (L1) ~1M validators / ~3000 nodes high
Solana PoH + Tower BFT ~1.5 s 3000+ ~3000 medium
Avalanche C-chain Snowman ~1-2 s ~1000 ~1300 medium
Cardano Ouroboros Praos epoch (5 dias for full settlement) ~250 ~3000 stake pools high
Polkadot GRANDPA + BABE 12-18 s ~1500 ~300 medium
Cosmos Hub Tendermint ~6 s ~10000 175 medium
Sui Narwhal + Bullshark ~3 s ~5000 ~120 medium-low
Aptos DiemBFT v4 (HotStuff) ~3 s ~5000 ~120 medium-low
TON Catchain (BFT-PoS) ~5 s ~100k claimed ~400 medium
Hedera Hashgraph ~3 s 10000 39 (Council) low (permissioned)
BSC PoSA (PoS + Authority) ~3 s 100-200 21 low
Polygon PoS PoSA ~3 s 100-200 100 low-medium

(Stats ~mai/2026, sujeitos a mudança.)


17. Selecionar consensus para um caso de uso

Use case Consensus apropriado
Monetary settlement layer global PoW (Bitcoin) ou robust PoS (Ethereum)
Smart contracts high-throughput Solana (PoH+TowerBFT) ou Sui (DAG+HotStuff)
App-specific chain Cosmos SDK (Tendermint) ou Substrate (BABE+GRANDPA)
Private enterprise consortium Hyperledger (PBFT/Raft) ou R3 Corda
IoT / micro-payments DAG (Hashgraph, IOTA) ou L2 (Lightning)
Compliance-required (KYC mandatory) Permissioned PoA ou regulated Layer 2
Long-term immutable archival PoW Bitcoin (battle-tested)

18. Referência cruzada

  • Chains detalhadas: 04-l1-bitcoin.md, 05-l1-ethereum.md, 06-l1-alt.md.
  • L2 / rollups (built atop): 07-l2-scaling.md.
  • Cryptographic primitives (VRF, VDF, signatures): ../cryptography/.
  • MEV: 12-tokenomics.md §MEV.
  • Slashing incidents: 14-incidentes.md.