Consensus & Proof of Work
How BTQ achieves distributed agreement
Consensus & Proof of Work
BTQ uses Proof of Work (PoW) consensus, the same mechanism that secures Bitcoin. This page explains how thousands of independent computers agree on the state of the blockchain.
The Consensus Problem
In a decentralized network:
- No central authority decides what's true
- Nodes may receive conflicting information
- Some nodes may be malicious
- Network delays cause different views
How do we agree on a single history?
Proof of Work
Proof of Work solves consensus through computational effort:
- Mining: Nodes compete to solve a mathematical puzzle
- Difficulty: The puzzle is hard to solve, easy to verify
- Reward: The winner gets to create the next block (and earn coins)
- Chain Selection: The longest valid chain is the truth
The Mining Process
┌─────────────────────────────────────────────────────┐
│ Mining Loop │
├─────────────────────────────────────────────────────┤
│ │
│ 1. Collect pending transactions from mempool │
│ │ │
│ ▼ │
│ 2. Build candidate block with: │
│ - Previous block hash │
│ - Merkle root of transactions │
│ - Timestamp │
│ - Difficulty target │
│ - Nonce = 0 │
│ │ │
│ ▼ │
│ 3. Hash the block header │
│ hash = SHA256(SHA256(header)) │
│ │ │
│ ▼ │
│ 4. Is hash < target? │
│ ├── YES: Block found! Broadcast to network │
│ └── NO: Increment nonce, go to step 3 │
│ │
└─────────────────────────────────────────────────────┘The Hash Puzzle
Miners must find a block header that, when hashed, produces a value below the target:
Target: 0x00000000FFFF0000000000000000000000000000000000000000000000000000
Valid: 0x000000003a2b1c... (below target - VALID)
Invalid: 0x0000000a7f8e2d... (above target - INVALID)The more leading zeros required, the harder the puzzle.
Why It Works
- Expensive to produce: Finding a valid hash requires trillions of attempts
- Easy to verify: Checking a hash takes microseconds
- Unpredictable: You cannot know which nonce will work
- Probabilistic: More hash power = more likely to find blocks
Difficulty Adjustment
BTQ adjusts difficulty every 20,160 blocks (~2 weeks):
New Difficulty = Old Difficulty x (2 weeks / Actual Time)This maintains approximately 1-minute block times regardless of total network hash power.
If blocks are found too fast: Difficulty increases If blocks are found too slowly: Difficulty decreases
Chain Selection
When multiple valid chains exist (forks), nodes follow the longest chain rule:
Block 100
│
┌─────┴─────┐
▼ ▼
Block 101a Block 101b
│ │
▼ ▼
Block 102a Block 102b
│ │
▼ X
Block 103a
│
▼
(This chain wins)The chain with the most cumulative work is considered valid. Shorter chains are abandoned (orphaned).
The Mining Reward
Miners receive:
-
Block Subsidy: New coins created with each block
- Started at 5 BTQ
- Halves every 2,100,000 blocks (~4 years)
- Eventually reaches 0 (max 21 million BTQ)
-
Transaction Fees: Paid by users for inclusion
- Becomes more important as subsidy decreases
Total Block Reward = Block Subsidy + Transaction FeesSecurity Model
51% Attack
An attacker with >50% of hash power could:
- Double-spend their own transactions
- Prevent specific transactions from confirming
- Block other miners from finding blocks
They cannot:
- Steal coins from others (need private keys)
- Create coins out of thin air (invalid blocks rejected)
- Change old transactions (gets harder over time)
The 51% attack becomes exponentially harder for older transactions. 6 confirmations is considered very secure for most purposes.
Hash Power Economics
Mining is profitable when:
Block Reward Value > Electricity + Hardware CostsThis creates a natural equilibrium:
- High coin price = More miners = More security
- Low coin price = Fewer miners = Lower security (but also lower attack cost)
Transaction Confirmation
Mempool
Before inclusion in a block, transactions wait in the mempool:
User creates transaction
│
▼
Broadcast to network
│
▼
Nodes validate and add to mempool
│
▼
Miners select transactions (usually highest fee first)
│
▼
Transaction included in block
│
▼
Block mined and propagated
│
▼
Transaction confirmedConfirmation Depth
| Confirmations | Security Level | Use Case |
|---|---|---|
| 0 | Unconfirmed | Dangerous for any value |
| 1 | Initial | Small purchases |
| 3 | Standard | Medium transactions |
| 6 | High | Large transactions |
| 60+ | Very High | Exchanges, critical transfers |
Block Propagation
When a miner finds a block:
- Announce: Send block header to peers
- Request: Peers request full block
- Validate: Each node independently validates
- Accept: Valid blocks added to chain
- Relay: Nodes relay to their peers
This happens in seconds across the global network.
Forks
Soft Fork
A rule change that is backward-compatible:
- Old nodes still accept new blocks
- New nodes may reject some old-style blocks
- Example: SegWit activation
Hard Fork
A rule change that is NOT backward-compatible:
- Old nodes reject new blocks
- Network splits into two chains
- Example: Bitcoin Cash split from Bitcoin
BTQ is a hard fork of Bitcoin with new signature rules.
Comparison with Other Consensus
| Mechanism | Used By | Energy | Security | Decentralization |
|---|---|---|---|---|
| Proof of Work | BTQ, Bitcoin | High | Very High | High |
| Proof of Stake | Ethereum 2.0 | Low | High | Medium |
| Delegated PoS | EOS | Low | Medium | Low |
| Proof of Authority | Private chains | Very Low | Low | Very Low |
BTQ uses Proof of Work because it provides the strongest security guarantees and has been battle-tested for over 15 years with Bitcoin.
BTQ-Specific Considerations
Larger Transactions
Dilithium signatures are larger than ECDSA:
- ~3,800 bytes vs ~250 bytes per transaction
- Fewer transactions per block
- Higher fees per transaction (more block space used)
Same Mining Algorithm
BTQ uses SHA-256 for mining:
- Existing Bitcoin mining hardware works
- Well-understood security properties
- Decentralized mining ecosystem
Summary
- Miners compete to solve a cryptographic puzzle
- Winner creates the next block and earns rewards
- Nodes validate independently (no trust required)
- Longest chain wins in case of conflict
- Difficulty adjusts to maintain 1-minute blocks
- Security increases with more hash power and confirmations
This mechanism has secured billions of dollars of value for over a decade.
Learn More
- Blockchain Basics - How blockchains work
- The Quantum Threat - Why we need quantum resistance
- BTQ Architecture - Technical implementation details