Can Developers Create XRP out of Thin Air? XRPL Validator Provides Insight
Recently, Vet, an XRP Ledger dUNL validator, explored the speculative scenario of individuals minting XRP tokens out of nowhere.
In a post on X, Vet asked community members whether it was possible to generate new XRP tokens out of thin air.
Creating XRP out of Thin Air
Notably, this hypothetical scenario assumes the emergence of a bug in the XRPL system that developers could leverage to mint XRP tokens they are not authorized to possess. Given that the XRPL validator was not frankly soliciting public input on the possibility, he provided the answer promptly.
Vet stated that if someone were to discover a bug enabling the creation of XRP out of thin air, the transaction would fail. In particular, the system would raise the “tecINVARIANT_FAILED” error message.
Can you create new XRP out of thin air?
In case someone finds a bug to create XRP out of thin air, the transaction will fail and displays tecINVARIANT_FAILED
The invariant checker kicked in as the last line of defense to not corrupt the public XRP Ledger.
— Vet 🏴☠️ (@Vet_X0) May 2, 2024
How XRPL Invariant Checker Works
Notably, the Invariant Checker is one of the security features of XRPL. It comprises a series of checks, distinct from regular transaction processing, to ensure that specific functions remain valid across all transactions.
XRPL developers created this mechanism to guarantee the blockchain’s integrity from yet-to-be-discovered bugs or even those intentionally introduced by bad actors.
The invariant checker operates automatically following each transaction. It scrutinizes the transaction’s details for accuracy before confirming its outcomes on the ledger.
Specifically, the XRPL invariant checker assesses transaction fees, account roots not deleted, XRP balance, ledger entry types match, trust lines, bad offers, no zero escrow, and valid new account root.
Should the transaction results violate any of the XRPL’s regulations, the invariant checker declines it with the “tecINVARIANT_FAILED” result.
Furthermore, the XRPL validator noted that this exception serves as the final safeguard that prevents corruption on the public XRP blockchain.
Interestingly, the Bitcoin network itself fell victim to a bug which resulted in this issue. In August 2010, an attacker exploited the vulnerability in the network to mint 184 billion BTC, earning the bug the title “184 Billion Bitcoin Bug.” Bitcoin’s anonymous creator Satoshi Nakamoto fixed the issue after five hours.
13 years ago, someone exploited a bug to create 184,467,440,737 BTC
The blockchain was forked by Satoshi within 5 hours and the transaction (along with all of the other ones in between the fork) were thrown out. They never found the guy that did the hack! pic.twitter.com/tvwmhj5774
— Conor (@jconorgrogan) October 1, 2023
Invariant Checker with XRPL AMM
In response to Vet’s update, a commenter inquired about the situation before the Invariant Checker was added to the fix for the recently resolved AMM bug.
In reply, Vet clarified that the security checker existed during the AMM development, but it did not make it into the release. However, the RippleX team acknowledged the oversight and rectified it.
According to the RippleX blog post, there was actually one during development but didn’t make it into the release. pic.twitter.com/1zFggDdA9F
— Vet 🏴☠️ (@Vet_X0) May 2, 2024
Moreover, the XRPL validator noted that with the additional safety measures now in place, such oversights are less likely to occur, which he considers a positive development.