XRP Ledger Bug: How the 100B Supply Cap Was at Risk
Learn how an XRP Ledger integer-overflow bug could have threatened its 100 billion XRP cap, why it stayed hidden, and what the fix means for network security.

The XRP Ledger Bug That Could Have Broken Its 100 Billion Token Cap
A cryptocurrency's supply limit isn't just a line in a white paper. It's a rule the network is supposed to enforce, every time a transaction runs. That's why a recently disclosed XRP Ledger vulnerability is worth taking seriously: in a narrow, carefully constructed scenario, an integer-overflow bug could have let an attacker receive XRP without paying the full amount.
The bug reportedly sat in the ledger for about 11 years. The XRP Ledger Foundation says normal activity never came close to triggering it. Researchers Cayden Liao and Veria AI reported the issue on September 22, and RippleX patched it. The Foundation and RippleX also said they found no evidence that the vulnerability was exploited or that unauthorized XRP was created.
That distinction matters. This isn't a story about an attack that succeeded. It's a story about a failure that could have happened - and about why the ledger's safeguards, at least as designed and implemented at the time, might not have caught it. In other words: it's a useful reminder that "the protocol rule" and "the code that enforces it" aren't the same thing.
What was at stake for XRP?
The XRP Ledger is an open-source layer-1 blockchain. XRP is its native asset, mainly used to pay transaction fees and to support trades on the ledger's built-in decentralized exchange. The network's original supply was 100 billion XRP, and the system is designed so that no new XRP can be minted.
The reported bug put that design goal under stress. If transaction accounting could be manipulated so that a buyer paid almost nothing while sellers received the full amounts recorded in XRP, the ledger might have credited balances that weren't properly funded. Economically, that could look a lot like new XRP being created.
So this wasn't just another transaction-processing glitch. A supply cap is a core promise of an asset. Exchanges, businesses, and everyday users rely on the ledger to prevent an unauthorized increase - not merely to follow an intention on paper.
A potential exploit is not proof of an attack
The available reporting describes a vulnerability that could have been exploited under specific conditions. It doesn't claim someone actually did it. RippleX shipped a fix, and the Foundation reported no evidence of exploitation or unauthorized issuance on a public network.
The Foundation said about 99.986 billion XRP remained in circulation. That's a snapshot, not a guarantee about future market conditions or how much is "actively available." The key security point is simpler: the disclosed issue, as far as the reported information goes, didn't lead to a known supply change.
When assessing an incident like this, it helps to keep three things separate:
- The protocol's intended rule: XRP's supply shouldn't exceed the original 100 billion.
- The vulnerable implementation: A particular calculation could, in theory, bypass normal payment checks.
- The reported outcome: The bug was patched, and there's no reported evidence of exploitation or unauthorized issuance.
Mixing those together usually leads either to panic or to hand-waving. Neither helps when you're trying to judge real blockchain risk.
For the source report and technical context, see CoinDesk's coverage of the XRP Ledger vulnerability.
How could an integer overflow affect the ledger?
An integer overflow happens when a numerical value goes beyond the range a system can represent. In some implementations, instead of throwing an error, the value "wraps" to a smaller number. Think of a counter that rolls back to zero after it passes its maximum. In financial software, that kind of wraparound can turn a big amount into something unexpectedly tiny.
According to the report, the flaw involved transaction amounts large enough to exceed the relevant numerical limit. Under normal conditions, the ledger's checks should confirm that a buyer has enough funds. But if the amount used in the cost calculation wraps into a tiny value, the check could end up comparing the wrong number.
The result could be an accounting mismatch: sellers might receive the full XRP amounts recorded as part of the operation, while the buyer is charged only a negligible cost. If those credited balances were accepted as valid, the gap could effectively inflate the supply.
The proposed attack required deliberate setup
This wasn't described as something you could trigger with one routine payment. The Foundation said it would have taken hundreds of deliberately constructed operations. The hypothetical approach would involve creating accounts and offers using unusually large values, then running transactions designed so the overflow would affect the payment calculation.
At a high level, the sequence would look like this:
- Create or control accounts used to place artificial sales or offers.
- Set values large enough to approach or exceed the ledger's numerical limits.
- Execute transactions that cause the relevant calculation to wrap.
- Receive balances the ledger might record as fully paid, even if the buyer paid far less than the nominal amount.
- Try to move or sell the resulting XRP elsewhere.
That's not a step-by-step exploit guide - more a map of the risk. The core issue is the arithmetic and accounting interaction: the vulnerability depended on the system calculating one amount for what gets credited and a different, incorrectly small amount for what gets charged.
A report about a potential "minting" vulnerability can sound like the ledger directly creates XRP. The concern here was different. The alleged path was inconsistent accounting that could make unfunded balances look legitimate. From the standpoint of the supply cap, the economic outcome could still be an unauthorized increase.
Why the scale requirement matters - but does not remove the risk
It's true that needing hundreds of carefully designed operations makes the bug harder to stumble into. It's not a low-effort "anyone can try this" problem.
But difficulty isn't the same thing as safety. A determined attacker can automate sequences that would be impractical to run manually - especially when accounts and transactions can be generated by software. The real question isn't whether a normal payment would trigger it. It's whether the protocol handles every valid, and also adversarially constructed, sequence it allows.
And that's a tougher bar. Ledger systems are stateful: one operation can change balances or offers in ways that affect later operations. If you test transactions only in isolation, you can miss errors that appear after a long run of carefully chosen actions.
Why did the vulnerability stay hidden?
The XRP Ledger Foundation's explanation is that normal parameters never triggered the bug. Everyday payments and trading activity supposedly never reached the extreme values - or the specific operation sequences - needed to expose the overflow. In the Foundation's phrasing, "No normal payment comes anywhere near triggering it."
That explanation is plausible, but it's not the whole story. A vulnerability can stay dormant simply because most users never naturally exercise the relevant path. It can also remain hidden if the system's own checks rely on the same faulty calculation they're trying to validate.
The safeguard shared the accounting flaw
The report said a check that runs after transactions to verify that no XRP had appeared relied on the same miscounted total. If the calculation is wrong, then a check based on that wrong number can still conclude everything is fine.
This is a common failure pattern in financial and distributed systems: verification isn't truly independent if it uses the same assumptions, data, or arithmetic as the process it's checking. If both steps repeat the same mistake, "recalculating" doesn't add real protection.
The report also says another safeguard limited how much XRP a single account could receive. In the hypothetical attack, an attacker could spread balances across hundreds of accounts, preventing any one account from exceeding that threshold. That doesn't make the safeguard pointless - it just means its protection didn't cover this particular scenario.
Putting it together, the controls missed the issue for different reasons:
- Ordinary transaction patterns didn't reach the triggering conditions.
- A supply check relied on the same incorrect total as the vulnerable calculation.
- A per-account receipt limit could be avoided by spreading balances across multiple accounts.
That's why "we have checks" isn't enough. You have to know what each check actually measures, whether it's independent, and whether an attacker can route around it by changing the shape of the transaction sequence.
Long-lived code can hide edge cases
The flaw was believed to have existed since 2015. A decade without a known incident can feel reassuring, but it isn't proof that there are no exploitable edge cases. It may simply mean the conditions were rare, hard to discover, or not worth pursuing until researchers looked closer.
That's especially true for open-source networks with complex transaction logic. Reviewers can inspect the code, but the number of possible states and transaction combinations grows fast. Low-frequency paths often get less attention than common payment flows - even if the consequences of failure would be more serious.
The takeaway isn't that an old protocol is automatically unsafe. It's that time and usage don't replace adversarial testing. A system can process huge volumes of normal activity and still leave a boundary condition untested.
What does the incident mean for blockchain security?
RippleX's response reportedly included a patch and plans from the XRP Ledger Foundation to improve testing. The Foundation said it wants to apply AI-assisted adversarial testing more aggressively, use formal verification, and expand its bug bounty program. It also pointed out that AI tools can help both attackers and defenders find vulnerabilities faster.
These steps cover different parts of the problem, which is good - but they're not interchangeable. AI-assisted testing can generate unusual inputs and transaction sequences. Formal verification can establish that certain properties hold under defined assumptions. Bug bounties create a structured channel for external researchers to report flaws. None of those replaces careful implementation, independent review, and a reliable process for shipping fixes.
Test invariants, not just expected transactions
For a ledger with a hard supply cap, one important invariant is straightforward: no valid sequence of operations should increase the total supply beyond the permitted amount. Tests should check that property across boundaries, unusual values, and multi-step transaction flows - not just through examples of typical payments.
A practical security review should ask questions like:
- Are integer boundaries handled explicitly, with overflow rejected rather than silently wrapped?
- Are supply and balance checks computed independently from the transaction logic they validate?
- Can a limit on one account be bypassed by spreading activity across many accounts?
- Do tests cover long sequences of operations and adversarial combinations of otherwise valid actions?
- Can researchers report issues confidentially and get clear guidance for responsible disclosure?
These concerns aren't unique to XRPL. Any system dealing with balances, token issuance, exchange offers, or other financial state needs to test the edge cases that normal users won't create on purpose.
AI helps generate tests; it does not establish safety
AI can make it cheaper to explore code paths and produce unusual inputs, which can help security teams - especially when a protocol has years of code and lots of interacting features. But the test cases still have to be interpreted, reproduced, and fixed by people who understand the system's invariants.
There's also a downside: the same tools that help defenders can help attackers search faster. The practical response isn't to treat AI as a security guarantee. It's to shorten the time between discovery, responsible disclosure, assessment, and deployment of a verified fix.
For users and institutions evaluating a blockchain, the useful questions are operational: Was the issue disclosed responsibly? Was a patch delivered? Was there evidence of exploitation? Are testing and review processes improving? Those answers tell you more than a generic claim that a network is secure - or a headline that treats a hypothetical exploit like it already happened.
Conclusion
This XRP Ledger incident is a reminder that a supply cap only matters if the code actually enforces it. The reported vulnerability required an unusual, multi-step setup, and there's no evidence it was used to create XRP. Still, the fact that a shared accounting error could undermine both transaction checks and supply monitoring is exactly why adversarial testing matters.
For users, institutions, and developers, the sensible approach is to separate the disclosed risk from the reported outcome - and then track whether the promised testing and verification improvements actually show up in practice. If you're evaluating blockchain infrastructure, look closely at security disclosures and fix-handling processes, not just the design rules on paper.