arrow-left Course Hub
Lesson 3: How do transactions work on a blockchain? Exploring blockchain consensus mechanisms
Estimated reading time:

10 minutes

Difficulty:

Beginner

Key takeaway:

Proof of work, proof of stake, and XRPL’s consensus algorithm are ways of deciding on one chain of events, but have different trade-offs on scalability, security, and speed.

Lesson 3

How do transactions work on a blockchain? Exploring blockchain consensus mechanisms

Deciding on one chain of events

Achieving Consensus in Decentralized Ledgers

In a decentralized ledger, there is no one central figure that confirms transactions. Instead, the entire network must work together to decide which transactions should be accepted and allowed to flow through the ledger. This process is called consensus. Think of the ledger as a book and consensus as a pre-established agreement on how to write new pages.

What is a Consensus Mechanism?

A consensus mechanism refers to the set of rules (protocols) used by the nodes (validators) within a distributed network (blockchain) to reach an agreement (consensus) on the current state of the network (determining how transactions are processed).

Understanding Proof-of-Work (PoW) vs. Proof-of-Stake (PoS)

proof of stake vs proof of work

 

Consensus can be achieved through various mechanisms, with the most common being proof-of-work (PoW) and proof-of-stake (PoS). Let’s explore the differences between these two methods:

Proof-of-Work (PoW)

Proof-of-work relies on computational puzzles that miners must solve to propose new transactions and add them to the blockchain. While this method ensures transaction security, it consumes significant energy and slows down the transaction process.

Proof-of-Stake (PoS)

Proof-of-stake, on the other hand, requires participants to pledge and “stake” their cryptocurrency to propose and validate transactions. This approach is more energy-efficient compared to PoW and gives advantage to those holding more cryptocurrency.

The XRPL Consensus Mechanism Explained

Unlike PoW and PoS, the XRP Ledger uses a unique consensus mechanism, now known as the XRPL Consensus Mechanism.

How the XRPL Consensus Works

In the XRPL Consensus Mechanism, the majority of nodes (80%) must agree on the validity and order of transactions. This collaborative agreement ensures a secure and efficient transaction validation process.

While consensus mechanisms are fundamental to ensuring the integrity and security of a blockchain, smart contracts are fundamental to extending a blockchain to be used for more than just a database. In the next lesson, you will learn what smart contracts are and how they are being used across various DeFi and NFT applications.

END OF LESSON

Now that we've gone over the basics of how transactions work on a blockchain, let's test your knowledge with a quick quiz.

How does a transaction on a blockchain happen?
What is proof-of-work?
What is proof-of-stake?
What's one key reason why the XRPL uses a unique consensus algorithm?
Why doesn't XRPL use PoW?