Ripple's Former CTO David Schwartz Proposes XRPL Upgrade

Ripple’s Former CTO David Schwartz Proposes XRPL Upgrade to Block Front-Running and Sandwich Attacks

Last Updated:
Ripple's Former CTO David Schwartz Proposes XRPL Upgrade to Block Front-Running and Sandwich Attacks
  • David Schwartz proposed a reservation system to block front-running and sandwich attacks on the XRP Ledger.
  • Reserved transactions would execute first, preventing later trades from jumping ahead in the same ledger.
  • The proposal also adds dynamic fees to deter DoS attacks while improving transaction fairness on XRPL.

Ripple’s former CTO, David Schwartz, has proposed a mechanism to eliminate front-running and sandwich attacks on the XRP Ledger (XRPL). The proposal comes amid community discussion about transaction fairness on the network. 

XRPL community member @xrpresso_io argued that sophisticated participants like validators and well-connected nodes can see pending transactions before a ledger closes. They can then analyze those trades, submit competing transactions, and increase their chances of being placed ahead of users in the final transaction order. 

This creates opportunities for profitable sandwich attacks on XRPL’s decentralized exchange (DEX) and automated market maker (AMM).

Schwartz acknowledged that the issue has been raised but said he is “not that concerned” about the current level of risk. Even so, he introduced what he described as a simple transaction reservation system that could effectively eliminate front-running and sandwich attacks.

Reservation System Gives Users Priority

The proposal introduces a new ledger object called ReservedTxns and a new transaction type called TxnReserve.

Under the system, users could reserve an execution slot for a future transaction by paying at least twice the standard transaction fee. Reservations would be valid only for a ledger between one and 16 ledgers ahead of the current one. Initially, each ledger would support up to 32 reserved transaction slots.

Once a reservation is confirmed, the transaction will be guaranteed to execute before any transaction submitted after it becomes publicly known. This prevents attackers from inserting trades before or after a user’s transaction to profit from price movements.

Schwartz added that reserved transactions should only be broadcast shortly before the target ledger reaches consensus. They would also expire after the designated ledger, preventing delayed execution that could expose them to front-running.

Related: XRP Ledger Lending Protocol Passes Halborn Re-Audit With No Critical Vulnerabilities Found

New Processing Order Blocks Sandwich Attacks

The proposal also changes how XRPL processes transactions. Before handling normal transactions, validators would first retrieve the list of reserved transactions for that ledger. Any reserved transaction included in the consensus set would execute immediately. It would then be removed from the remaining transaction pool so it could not be reordered later in the same ledger.

After execution, the reservation object would be deleted.

According to Schwartz, this process ensures that transactions reserved before public disclosure always execute ahead of transactions created afterward. As a result, opportunities for front-running and sandwich attacks would be eliminated.

Proposal Includes DoS Protection

Schwartz also addressed the possibility of denial-of-service (DoS) attacks. An attacker can repeatedly reserve all available transaction slots to prevent legitimate users from using the system.

To discourage this, he proposed increasing reservation fees as slots become scarce. Fees could begin rising once half of the available reservation slots are filled. They would continue to increase until they reached several times the base reserve cost.

If demand grows, the number of reservation slots will also increase from 32 to 64.

Schwartz argued that this pricing model will make repeated abuse prohibitively expensive. Attackers will have to spend large sums every few seconds only to gain little long-term benefit.

Push for Better Transaction Fairness

The proposal follows ongoing debate about transaction ordering on XRPL. While XRPL is designed to discourage front-running, participants with faster access to pending transactions may still gain an advantage over regular users.

This creates an uneven playing field on XRPL’s DEX and AMM. The issue is especially noticeable during large trades, where sandwich attacks can increase slippage for ordinary traders.

Although Schwartz downplayed the severity of the problem, he outlined a detailed reservation-based solution.

Disclaimer: The information presented in this article is for informational and educational purposes only. The article does not constitute financial advice or advice of any kind. Coin Edition is not responsible for any losses incurred as a result of the utilization of content, products, or services mentioned. Readers are advised to exercise caution before taking any action related to the company.