Technical Reference

Blockchain in Payments

Working principles, network types, consensus mechanisms, DeFi protocols, stablecoins, and CBDCs — a technical guide to blockchain technology and its integration with modern payment infrastructure.

3–5 sXRPL / Stellar finality
$150B+stablecoin supply
130+CBDC projects globally
1M TPSLightning theoretical max

How a Blockchain Works

Every blockchain shares the same core mechanics: transactions are broadcast to a peer-to-peer network, batched into blocks, secured by cryptography, and accepted through a consensus process. Here is how each layer works.

Live Block Chain

Block #841,232
Hash0000…f8e2
Prev0000…3c19
Txs1,987
Nonce1,291,034
Block #841,233
Hash0000…a3f1
Prev0000…f8e2
Txs2,341
Nonce1,847,293
Block #841,234 LATEST
Hash0000…7c2a
Prev0000…a3f1
Txs3,012
Nonce3,921,847
Block #841,235 MINING…
Prev0000…7c2a
Nonce???
Hash????

Each block references the previous block's hash — forming a chain where altering any block invalidates every block after it. The rightmost block shows the live PoW simulation below.

⛏️ Proof of Work — Mining SimulatorDifficulty target: hash must begin with 0000
Block data841235 · prev:0000…7c2a · merkle:…
Nonce0
SHA-256a7f3bc129e4d8f0123456789abcdef01
Attempts: 0

Block Anatomy

Block N − 1
Hash: 0000…a3f1
Block N (current)
Prev Hash0000…a3f1
Timestamp1720000000
Nonce2048394756
Difficultytarget < 0000…
Merkle Root7a3c…8d01
TransactionsTx₁ · Tx₂ · … · TxN
Block N + 1
Prev Hash: 0000…7c2a
References Block N's hash

The Merkle root commits every transaction to a single 32-byte hash. The Prev Hash links blocks — changing Block N breaks Block N+1's reference, invalidating the entire chain forward.

Merkle Tree — Transaction Commitment

Merkle Root
Hash(AB + CD)
Hash AB
H(TxA + TxB)
Hash CD
H(TxC + TxD)
Hash(TxA)
Hash(TxB)
Hash(TxC)
Hash(TxD)
Tx A
Tx B
Tx C
Tx D

Proving Tx C is in the block requires only Hash(TxD) + Hash AB + the Merkle root — logarithmic proof size, no full block download needed. This is how SPV wallets verify payments.

Transaction Lifecycle

1

Signing

The sender constructs a transaction, hashes it, and signs it with their private key using ECDSA (secp256k1). The signature proves ownership without revealing the key. The transaction includes a fee to incentivise inclusion.

2

Broadcast

The signed transaction is broadcast via P2P gossip. Each node relays it to peers. Within seconds it propagates to most of the network. Nodes validate the signature, check for double-spends, and verify the fee is sufficient.

3

Mempool

Valid transactions sit in each node's mempool ordered by fee rate. Miners/validators pick transactions for the next block. During congestion, low-fee transactions may wait hours or be dropped.

4

Block Inclusion

A miner/validator assembles transactions into a candidate block. In PoW: hash the header with different nonces until meeting the difficulty target. In PoS: a validator is pseudo-randomly selected to propose the block.

5

Validation & Propagation

Other nodes independently validate the block: correct proof, valid signatures, no double-spends, correct Merkle root. They add it to their chain and relay it. Forks resolve by the longest/heaviest chain rule.

6

Confirmations & Finality

Each additional block is one confirmation. Bitcoin: 6 confirmations ≈ 60 min. Ethereum PoS: economic finality in ~12.8 min. XRPL/Stellar: absolute finality in 3–5 s.

Consensus Mechanisms Compared

⛏️

Proof of Work (PoW)

Nodes compete to find a nonce making SHA-256(block) < target. Winner earns block reward. Security from computational cost — 51% attack requires majority of global hash power.

⚡ Energy intensive🔒 Highest security🐢 Slow (10 min blocks)
Used by: Bitcoin, Litecoin, Dogecoin
🥩

Proof of Stake (PoS)

Validators lock native tokens as stake. Block proposer selected pseudo-randomly weighted by stake. Dishonest validators lose their stake (slashing). 99.95% less energy than PoW.

🌿 Energy efficient⚡ Faster blocks💰 Stake concentration risk
Used by: Ethereum, Cardano, Solana
🤝

Byzantine Fault Tolerance (BFT)

A known set of validators vote on each block in rounds. Tolerates up to 1/3 malicious validators. Achieves instant finality — no probabilistic confirmation needed.

✅ Instant finality⚡ High throughput🔐 Known validators only
Used by: XRPL, Stellar, Hyperledger, Cosmos
⏱️

Proof of History (PoH)

A verifiable delay function creates a global clock of events, allowing validators to agree on ordering without waiting for network round-trips. Combined with PoS for block production.

🚀 Ultra-fast (400 ms)📈 65K+ TPS⚙️ Hardware requirements
Used by: Solana

Accounting Models: UTXO vs. Account-Based

UTXO Model (Bitcoin)

Every transaction consumes one or more Unspent Transaction Outputs (UTXOs) as inputs and creates new UTXOs as outputs. Your "balance" is the sum of UTXOs locked to your addresses.

  • ✅ Enables parallel transaction validation
  • ✅ Clear audit trail — trace any coin's history
  • ✅ Privacy: each address used once ideally
  • ⚠️ Complex for smart contracts
  • ⚠️ Coin selection logic needed in wallets
Input: UTXO [0.5 BTC] + UTXO [0.3 BTC]Output: 0.7 BTC → Bob, 0.09 BTC → changeFee: 0.01 BTC (to miner)