How does the XRP Ledger reach consensus, and what are trust lines?
Validators on each server's trusted list agree on a transaction set over a few rounds; a ledger signed by 80% of them is final in 3 to 5 seconds. Trust lines are opt-in ledger entries letting an account hold one issuer's token.
The XRP Ledger has no mining and no staking. Each server chooses a list of validators it trusts, its Unique Node List (UNL), and every few seconds those validators exchange proposals for which transactions go into the next ledger, revising them over several rounds until a supermajority agrees. A ledger that 80% of a server's UNL validates is final, usually within 3 to 5 seconds, and is never reorganised. Trust lines are how the ledger holds anything other than XRP: a trust line is an explicit, two-sided ledger entry in which an account agrees to hold up to a set amount of a specific token from a specific issuer. Without one, you can't receive that token.
How does XRPL consensus work?
The XRP Ledger is a sequence of ledger versions. Each version contains the full state (accounts, balances, offers, trust lines) and the set of transactions that produced it from the previous version. Producing the next version takes three stages:
Open. Servers collect candidate transactions from users and peers into an open ledger. This is roughly a mempool, but servers also apply transactions tentatively so they can return preliminary results.
Establish (consensus). Validators send signed proposals: the set of transactions they think should be in the next ledger. Each validator compares its proposal with those from validators on its UNL. A transaction that only some validators include gets dropped or kept depending on how widely it's supported, and validators revise their positions over several rounds, with the support required increasing each round. Transactions left out aren't lost; they're carried over to the next ledger.
Validate. Each validator applies the agreed set in a canonical order, computes the resulting ledger, and broadcasts a validation: a signature over that ledger's hash. When a server sees matching validations from at least 80% of its UNL, it treats that ledger as validated.
There are no blocks competing for the same height and no fork choice rule, so there is nothing to reorganise. Once a ledger is validated, its transactions are final. For most apps, the right confirmation policy is simply "wait for the validated ledger", unlike the probabilistic depth you'd choose on a proof-of-work chain (compare how many confirmations other chains need).
What happens when validators fail?
The 80% threshold sets the failure modes, as the XRPL documentation describes them:
Faulty or offline share of a UNL
Result
Under 20%
Consensus continues normally
Between 20% and 80%
The network stops making progress rather than splitting
Over 80% colluding
Needed to confirm an invalid transaction
In other words, XRPL chooses safety over liveness: if too many trusted validators are offline or disagree, the ledger halts instead of continuing on two forks. The Negative UNL feature lets the network temporarily discount validators that are known to be offline, so a few unreachable validators don't push the network toward that halt.
Who chooses the UNL?
In principle every server operator does. In practice, nearly all servers use a default UNL published as a signed list by one or more publishers, such as the XRPL Foundation and Ripple, and configured in validators.txt. That is the main decentralisation debate around XRPL: validators don't need permission to run, but they only matter if they're on the lists other servers follow. Safety also depends on different servers' UNLs overlapping heavily, which the shared default list ensures.
This is a different design from both mining and stake-weighted voting (see proof of work versus proof of stake) and from gossip-based protocols like Hedera's hashgraph consensus. There's no stake to slash: the incentive to behave is reputational, and a misbehaving validator is removed from lists.
Fees, reserves and amendments
Transaction fees are paid in XRP and destroyed, not paid to validators. The minimum is 10 drops (0.00001 XRP); under load, the required fee escalates for the open ledger.
Reserves require each account to hold a minimum XRP balance, plus an extra amount per object it owns (trust lines, offers, escrows and so on). Validators vote on these values; the base reserve was cut to 1 XRP in December 2024. Query the live values instead of hard-coding them.
Amendments (protocol changes) activate only after holding support from 80% of validators for two weeks.
What are trust lines?
On Ethereum, a token is a contract and anyone can send it to any address. On XRPL, tokens issued by an account (often called IOUs or issued currencies) live in the ledger itself, and the receiving side has to opt in.
A trust line is a ledger entry (type RippleState) linking two accounts for one currency code. It records:
the currency code, either three characters such as USD (anything except XRP) or a 40-character hex code for longer names;
a limit on each side: the most each account is willing to hold from the other;
a single balance, which is positive from the holder's point of view when the issuer owes the holder;
flags for rippling, freezing and authorisation.
So "Alice holds 100 USD from issuer rIssuer..." is literally a trust line between Alice and rIssuer... with a balance of 100. Tokens from two different issuers with the same code, say two kinds of USD, are entirely separate assets.
Why make the holder opt in? Because an IOU is a claim on the issuer. Holding one means trusting that the issuer will honour it, so the protocol makes you state who you trust and for how much. It also stops spam tokens appearing in your account. The opt-in idea will feel familiar if you've worked with Solana's associated token accounts or TON's per-holder Jetton wallets, though XRPL does it with a ledger object rather than a separate account or contract.
Creating a trust line and receiving a token
With xrpl.js on testnet:
import { Client, Wallet } from"xrpl";
const client = newClient("wss://s.altnet.rippletest.net:51233");
await client.connect();
const holder = Wallet.fromSeed(process.env.HOLDER_SEED!);
constISSUER = "rExampleIssuerAddressXXXXXXXXXXXXX"; // replace with the real issuer// 1. The holder opts in to hold up to 10,000 USD from this issuerconst res = await client.submitAndWait(
{
TransactionType: "TrustSet",
Account: holder.address,
LimitAmount: { currency: "USD", issuer: ISSUER, value: "10000" },
},
{ autofill: true, wallet: holder },
);
const meta = res.result.meta;
if (typeof meta === "object") console.log(meta.TransactionResult); // "tesSUCCESS"// 2. Inspect the holder's trust lines in the latest validated ledgerconst lines = await client.request({
command: "account_lines",
account: holder.address,
ledger_index: "validated",
});
for (const l of lines.result.lines) console.log(l.currency, l.account, l.balance, l.limit);
await client.disconnect();
Once the line exists, the issuer (or any holder, if rippling is allowed) can send USD with an ordinary Payment whose Amount is an object { currency, issuer, value } instead of a string of drops. Sending to an account without a suitable trust line fails, typically with tecPATH_DRY. The trust line also counts toward the holder's owner reserve until it's removed by setting the limit and balance back to zero.
The Wallet.fromSeed call takes an XRPL family seed (starting with s), which is not the same format as a BIP-39 mnemonic; if you're managing keys, the principles in how seed phrases work still apply.
Rippling and the DefaultRipple flag
Rippling lets balances move through an account that sits between two trust lines in the same currency. For an issuer, that's essential: when Alice pays Bob 10 USD, the payment actually reduces Alice's balance with the issuer and increases Bob's, rippling through the issuer.
Issuers must therefore enable DefaultRipple on their account before holders create trust lines:
Forget it, and holders can receive from the issuer but can't pay each other. Ordinary users want the opposite: the NoRipple flag on their own trust lines, so their balances can't be used as a path for other people's payments.
Issuer controls
Issuers have tools that don't exist for a plain ERC-20, and holders should check which are enabled:
Control
What it does
TransferRate
Fee the issuer takes when holders transfer to each other
Freeze / Global Freeze
Stop movement of the token on one line or all lines
NoFreeze
Issuer permanently gives up the ability to freeze
RequireAuth
Holders need issuer approval before their trust line works
Clawback
Issuer can reclaim tokens; must be enabled before any trust lines exist
Stablecoin issuers commonly use authorisation, freezing and clawback for compliance. As of late 2026, XRPL also supports Multi-Purpose Tokens (MPTs), a newer token type activated in 2025 that holds balances in simpler per-holder objects without rippling, aimed at institutional assets. Trust lines remain the established mechanism and the one most existing tokens use.
What this means in practice
Wait for validated ledgers. Use ledger_index: "validated" and submitAndWait, not results from the open ledger.
Check delivered_amount, not Amount. A Payment with the tfPartialPayment flag can deliver less than its Amount field. Exchanges have been tricked into crediting the full amount. Always read meta.delivered_amount.
Identify tokens by currency and issuer. Never by currency code alone.
Issuers set DefaultRipple first, decide on freeze and clawback before issuing, and publish their address so users can verify it.
Budget the reserve. Each trust line locks part of the holder's XRP; query server_info for reserve_base_xrp and reserve_inc_xrp.
Use destination tags when crediting deposits to a shared exchange address. XRPL uses an account model, not UTXOs (see how the two balance models differ), so many users share one address and tags tell them apart.
Summary
Topic
Key point
Consensus
Validators on each server's UNL agree on a transaction set over several rounds
Finality
Ledger validated by 80% of the UNL, every few seconds; no reorgs
Failure mode
Over 20% faulty halts progress instead of forking
Fees
Paid in XRP and burned
Trust line
Opt-in, two-sided ledger entry with limits, balance and flags for one issuer's currency
Issuers
Enable DefaultRipple; choose freeze, auth and clawback settings up front