Proposal to Address Memo Bloat on the XRP Ledger #276
Replies: 4 comments 15 replies
-
|
I wonder if the presence of a threshold means the system could be gamed. Could the fee be proportional to: (Size of memo) / (Size of transaction)? |
Beta Was this translation helpful? Give feedback.
-
|
Ledger spam is an evergreen topic, but this looks to me like a pretty novel way of handling it. You didn't specify, so I'll mention that it will be completely unworkable if it is made part of the consensus process. Consensus needs to be entirely deterministic based only on the state of the previous ledger and proposed transaction sets. However, I think it could work well if it's a local node decision, the same way that fee escalation is local. Another advantage of making it a local decision is that it wouldn't necessarily require an amendment. It's just a node deciding whether or not to accept and relay a transaction, just as it would if it got overloaded. A per-account threshold could easily be gamed. So keep the count across the whole ledger. If ledger spam stays below some acceptable "background noise" level, then there's no problem, but if anyone starts getting out of control, they ruin it for everybody. |
Beta Was this translation helpful? Give feedback.
-
Another thing that I realize is that we're going to need a precise definition of "negligible" that
That's not an easy decision, because while I would consider 0.001 USD annoying spam, I'd consider 0.001 BTC a lovely gift, but |
Beta Was this translation helpful? Give feedback.
-
|
There were quite a few interesting ideas. I Don't think @xrpl365 has listed them all so ill do so here, from the conversations i've herd. one limitation @ximinez did mention is that the memo is part of the checksum currently. However this could be altered and removed that enables a few of these options.
those are the main ideas I've herd so far. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Abstract
The goal of this paper is to start a discussion around introducing a mechanism that respects and preserves what I consider the legitimate use of memos while discouraging patterns that result in what many refer to as ledger bloat.
The desired outcome is a fee model that reflects the true cost of memo usage without compromising the flexibility and openness of the XRP Ledger.
Defining the Intended Use of Memos on the XRP Ledger
A Memo field in an XRP Ledger transaction is described in the official documentation as “additional arbitrary information used to identify this transaction.”From this, we can infer that memos are intended to provide context or metadata about a transaction, not to serve as the reason or payload of the transaction itself.
In other words, the presence of a memo should enhance the utility, traceability, or interpretability of a transaction, such as a payment.
Transactions where the memo is the only meaningful component (e.g., zero-value payments with arbitrary or excessive data) fall outside the definition of intended use and place unnecessary strain on ledger storage.
Why Ledger Bloat from Memo Spam is a Problem Worth Addressing
While the concept of "ledger bloat" can be subjective, the consequences are tangible and measurable for operators running full-history servers.
Memos are permanently stored as part of the transaction record.
When transactions are used primarily to carry large or meaningless memos, especially in high volume, this directly contributes to the growth of the ledger’s historical footprint.
The current fee model — where memo size has no meaningful impact on transaction cost, does not scale with the real-world infrastructure impact.
As storage costs rise and ledger use increases, this creates a sustainability issue. Memo-based spam, even at low volume, has an asymmetric effect on the network: it is cheap to send, but expensive to store forever.
What Constitutes Memo-Based Ledger Bloat
In my opinion, it is where the memo is used to store data that does not add value to the transaction and simply is the primary reason for the transaction.
The main culprit of this is where the memo is used primarily as a messaging mechanism.
While memos can be included in any transaction type, not all transactions equally expose a messaging surface.
I refer to these as Message-Addressable Transactions (MATs): transactions that include a
Destinationfield or otherwise directly reference another identifiable account.Examples of MATs include:
Payment(withDestination)NFTokenCreateOffer(specifying anOwner)CheckCreate,EscrowCreate, etc. (with destination fields)When Does a MAT Become Ledger Spam?
Should All Memos Incur Additional Costs?
I have been back and forth on this one but I lean more towards no, if a solution to memo spam can be found without introducing a new cost.
We already have fees to pay for network usage, and these fees don’t fundamentally discriminate between transaction types that store more data than others.
That said, I remain fundamentally open to both sides of that argument.
This proposal proceeds on the basis that we should not introduce a cost for using a memo unless it falls into the criteria of unwanted spam.
Proposed Mitigation Strategy
I propose a mechanism that introduces increased costs for memos on MATs that meet my definition of ledger spam, with further escalation of the cost based on usage.
The cost should start very small and escalate to achieve the goal of the proposal.
Examples of Memo Costs
AccountSettransaction is not a MAT, so the network fee itself should be sufficient.Paymentof 100 XRP to another account with a memo is a MAT but would not be considered spam, as the transaction amount itself provides a disincentive to abuse.Paymentof 10 drops to another account with a memo would be considered spam and should incur an increased fee.This fee could be dynamic, scaled by a simple rate-limiting rule e.g., no more than X similar transactions within Y time frame.
This ensures that a more genuine one-off message can still occur (even at higher cost), while an account sending 10,000 messages would find the cost prohibitive.
Handling Edge Cases & Legitimate Exceptions
What about users who want to store immutable data on-chain?
Currently, memos are the mechanism used and by my definition, these transactions are considered spam.
I would first question if XRPL is the best place for that kind of storage.
If it is, then we should design a specific transaction type for that use case and engineer it to provide the properties users want, rather than bending an existing mechanism.
We should assign a specific fee based on the value of that use case. This could also evolve to support both:
This is outside the scope of this discussion but worthy of a separate proposal.
Technical Implementation Outline
Add a series of logic checks for MAT transactions. Using
Paymentas an example:Each transaction identified as a MAT would require an update based on the principles of identifying the transaction as spam.
I believe this is implementable and would result in reduced ledger bloat, so when weighed against any computational over-head for the changes, seems a worthwhile conversation. There are also secondary benefits to this, such as recognising the fact that memos are used as a mechanism to scam people by embedding malicious links.
Beta Was this translation helpful? Give feedback.
All reactions