David Schwartz Introduces ReservedTxns to Combat Front Running on XRPL DEX and AMM
David Schwartz, Ripple CTO Emeritus and co-founder of the XRP Ledger, recently announced ReservedTxns, a new mechanism consisting of two components designed to mitigate front-running and sandwich attacks on XRPL’s native DEX and AMM markets. Such attacks capitalize on the public knowledge of the transaction order.
The proposal was a response to concerns from the XRP analytics account XRPresso.io and comes during a period of a surge in the institutional demand for XRP-backed financial products. As a result, the execution and market integrity concerns are more critical than they have been in the past.
ReservedTxns are still an ongoing proposal and have yet to be formalized as a network amendment. Amendments to the XRPL require the approval of a supermajority of the validators, indicating that ReservedTxns are in the design phase with no guarantee of implementation.
ReservedTxns Mechanism Core Structure
To implement priority execution, the system adds two basic protocol components.
1. ReservedTxns Ledger Object
- Contains a target ledger sequence number
- May contain up to 32 transaction IDs
- When the target ledger closes, the reserved transactions are executed first
- Object is automatically deleted after execution
2. TxnReserve Transaction Type
- Transactions can be reserved for future execution
- A reservation fee is set to be at least twice the normal transaction fee
- Must target a ledger within 16 ledgers of the current ledger
- The transaction must match the reserved ledger using the
LastLedgerSequence
Due to these rules, reservations are intended to be short-term and expensive to limit the system manipulation, as well as control the execution timing.
Economic Features and Security Mechanisms
The economic model employs a combination of measures designed to deter abusive behaviors while promoting stability within the network:
- Dynamic fees: The cost of making a reservation increases as the available slots decrease. The reservation fee can grow to multiple times the base fee.
- Inclusion attacks: Reservations become more costly the more people try to reservation attack.
- Short time span: A limitation of 16 ledgers prevents long-range transaction planning.
- Delayed exposure: Reserved transactions will not be disclosed until the time is near for them to be executed.
Schwartz elaborated on the design and remarked:
“This guarantees that you can execute your transaction ahead of any transaction that was formed after your transaction was disclosed.”
The design intends to give users the ability to pay to avoid being front-run or sandwiched and gain predictable execution priority.
Front-Running on the XRPL
The proposal attempts to solve a fundamental problem within the XRP Ledger: Users can see transactions that are waiting to be executed once the ledger is closed. Because of this, users can see and thus front-run trades that are waiting to be executed.
Because XRPL uses a deterministic system of ordering transactions based on the transaction hash, attackers can easily craft their transaction such that it is executed in a preferred order. This creates a situation similar to sandwich attacks that occur in DeFi trading protocols.
Schwartz recognized the possibility of front-running, but stated that XRPL does not provide outstanding ordering especially to validators unless collusion was to occur, and that collusion would be evident.
He explained:
“As for if more than one validator conspired to cheat the system, or just one validator, it wouldn’t be hard for anyone to see who did that.”
He added that, financially, it’s not worth it to try to cheat the system due to the rare mix of high liquidity (with potential for profit) and low liquidity (with price impact) that don’t often occur in XRPL.
Debate and Broader Industry Context
XRPresso.io’s opinion is that the ReservedTxns contract does offer a new way to optimize the fairness of trade execution, but, due to the retained fee-based priority system, the ReservedTxns contract would still allow for information-based trading. They recommend using cryptographic privacy, or keeping transactional data secret from the public until the transaction executes.
The ongoing debate represents a small part of the larger conversation regarding Decentralized Finance. Other competing paradigms include zero-knowledge dark pool trading, which favors transaction operation with full trading secrecy. This line of thought is present in multiple ecosystems while developers strive to deliver the best balance of visibility and fairness with integrity and responsiveness.
Conclusion
With the rise in trading and new institutional participants, ReservedTxns is an important development for fair execution and integrity in trading on the XRP Ledger. ReservedTxns specifically are designed to provide systems-level safeguards against front running and sandwich attacks. Currently, ReservedTxns is in a review period of the systems governance.
Its future relies on community consensus and validator agreement. It denotes another case in an ongoing industry dispute: is more fairness in decentralized markets achieved through cryptographic transaction privacy or economic priority mechanisms.



