Crypto Dictionary

XRP Ledger Consensus Mechanism Explained in Simple Terms

Dive deep into the XRP Ledger Protocol. The consensus algorithm behind the security and decentralization of the network. Discover how transactions are processed and validated.

XRP Ledger is a decentralized, open-source network developed by Ripple Labs. Anyone can use this network to transact, exchange value, tokenize, or build advanced applications. One of the main features of this network is its high security. This security and immutability is largely a product of the XRP Ledger Consensus Protocol, the consensus mechanism of the XRPL network.

In this article, we will have a closer look at how the XRP Ledger Protocol operates, what it does, and why it is important.

Key Takeaways:

  • The Consensus algorithm of the XRP Ledger network is called the XRP Ledger Protocol. Its role is to update the shared state of the ledger.
  • The XRPL is comprised of different types of interconnected servers (nodes) with each one having a set of trusted validators - Unique Node List (UNL).
  • Client applications, such as user wallets create transactions in the network. Transaction is any interaction that changes the state of the ledger.
  • Validators exchange and check proposed transactions with their UNLs. Once they agree, the transactions result in an updated state of the ledger.

The Role of the Consensus Mechanism in the XRP Ledger

Consensus mechanism/algorithm plays a key role in any kind of distributed ledger, such as blockchain. Its main role is to make sure that all the nodes in the network (or at least the majority) reach a common ground in deciding on the next shared state of the ledger.

Because at any given time the distributed ledger can only exist in a single state, which has to be agreed upon by the majority of nodes in the network. The consensus algorithm is crucial for deciding which transactions are legitimate, validating them, updating the state of the ledger, and ensuring that other nodes have the same results.

Structure of the XRP Ledger Network

Before we dive in specifically on how the algorithm works, we must first have a look at the architecture of the XRP Ledger. The network is composed of 3 different types of servers (nodes):

  1. Validator Nodes - Confirm transactions and also relay transaction data to other nodes.
  2. Hub Nodes - Propagate (relay)  transaction data across the network of nodes.
  3. Stock Nodes - Elect trusted validators to participate in the consensus process

Then we have client applications, which could be user wallets, trading platforms, on-chain applications, and so on. Client applications are usually the ones that create and send transactions - this could be a simple XRP transfer from one wallet to another. All client applications connect to an XRPL server and send transactions to it.

The Lifecycle of an XRPL Transaction

When a client application, such as a user wallet posts a transaction on the XRPL network, the transaction data is uploaded onto the nearest network server.

Candidate Transaction List

Each server receives dozens of transactions for processing at any given time. To process these transactions, each server has a set of trusted validators known as the Unique Node List (UNL). Each server relays the incoming prospective transactions to their UNL.

By doing so, the servers gradually build a list of candidate transactions that could be included in the next shared state of the ledger. At first, the list of candidate transactions is different for each server, however by continuous sharing and checking, the candidate list is updated.

Some transactions are added to the candidate list and others are removed so that all servers (or the majority) have the same list of candidate transactions. They repeat the process until the candidate list becomes uniform for all servers (validators).

Transaction Validation

Once the Supermajority of validators (more than 80%) have agreed on the candidate transaction list, it is time to validate the transactions and update the shared state of the ledger.
All servers sort the candidate transactions in a specific order and compute the overall changes to the ledger by applying the suggested transaction set to the last common version of the ledger. Each server does the computing separately, which enhances security and decentralization.

After this step, all validators hash their results and compare the proposed hashes with their UNL. If they reach a consensus with at least 80% of the other servers, the transaction set is validated and transferred to the new shared state of the ledger.

State of The Ledger

Each updated state of the ledger gets a new index number and has to be linked directly to the previous state by a series of steps. The state of the XRP Ledger contains the following information:

  1. Account Settings: Configurations related to individual accounts, such as owner information and multisignature settings.
  2. Balances: Amounts of XRP help by accounts. Also amounts of custom tokens issued and held.
  3. Offers: Buy and sell listings on the XRP Ledger's built-in decentralized exchange.
  4. Network Settings: Fees needed to execute a transaction and minimum balance requirements for ledger objects, e.g., accounts or offers. Also contains the amount of XRP that was burned to conduct transactions.
  5. Timestamp: Indicates when a ledger version was validated.
  6. Transaction Set & Results: A list of transactions, their effects, and outcomes (success or failure).


What consensus mechanism does XRPL use?

The XRP Ledger (XRPL) uses a unique consensus algorithm called the XRP Ledger Consensus Protocol. It is not Proof-of-Work (PoW) nor Proof-of-Stake (PoS). Instead, it is based on a process where validators on the network agree on the order and validity of XRP transactions.

Is XRP and ERC-20 token?

No, XRP is not an ERC-20 token. XRP is the native currency of the XRP Ledger, an open-source blockchain protocol, while ERC-20 is a standard for tokens implemented on the Ethereum blockchain.

How many transactions does XRP Ledger process per second?

The XRP Ledger can handle around 1,500 transactions per second. It has the potential to scale up to 10,000 transactions per second.

Who validates XRP transactions?

Transactions on the XRP Ledger are validated by a group of validator nodes. These validators are chosen by each server operator individually from a list of candidates. A validator is a server on the network that participates in the consensus and validation processes.

Is XRP Ledger centralized or decentralized?

The XRP Ledger is decentralized. It is an open-source protocol maintained by a decentralized network of independent validators. On the other hand, Ripple is a centralized, for-profit company behind the development of XRPL.

Is XRP Ledger a competitor to Ethereum?

While both XRP Ledger and Ethereum are blockchain platforms, they are designed for different purposes. XRP Ledger is optimized for fast and low-cost transactions, primarily serving as a payment solution. Ethereum, on the other hand, is designed as a platform for decentralized applications (DApps) and smart contracts. While there is some overlap in functionality, they cater to different use cases and are not direct competitors.

Disclaimer: The content of this piece reflects the writer's opinion. This article is not intended to provide financial advice and is meant solely for entertainment and educational purposes. Investing in cryptocurrency involves significant risk. Capital is at risk, and returns are not guaranteed. Always conduct your own research.

Share the Article

Did you enjoy reading this article? Don't forget to share it with your friends!

Share the Article

More Keywords

Volume 24hTotal SupplyNayib BukelePump and Dump

Latest Blog Articles

Analysis, Token Unlocks, News

WEEKLY UNLOCKS Jun 10 to 17: $APE and $RARE Team Drops, Iguverse and Liquidus

In the second week of June 2024 the price of $APE and $RARE tokens may face selling pressure from founding teams. Large unlocks are also projected for $LIQ and $IGU.

Jun 10By Daniel Urbánek