Key facts
- David Schwartz, former CTO of Ripple, proposed a transaction reservation scheme for the XRP Ledger.
- The scheme aims to fix front-running and sandwich attacks on the XRPL's decentralized exchange and AMMs.
- A new ledger object, ReservedTxns, will store transaction IDs for future ledgers.
- A new transaction type, TxnReserve, allows users to book slots by paying double the normal transaction fee.
- Reservations are limited to the next 16 ledgers and capped at 32 slots per ledger.
David Schwartz, former Chief Technology Officer at Ripple and a key developer of the XRP Ledger (XRPL), has put forth a proposal to introduce a transaction reservation system. This initiative addresses concerns raised by the XRP community regarding front-running and sandwich attacks on the network's decentralized exchange (DEX) and automated market makers (AMMs).
Concerns were voiced by XRP community members who noted that validators and well-connected nodes can observe transactions in the pre-validation queue. This visibility allows them to analyze pending trades, identify profitable opportunities, and potentially spam the network with transactions to secure favorable positions on the XRPL. While the XRPL employs mixed transaction ordering to deter front-running, some users argue this protection is insufficient, leading to slippage for traders on DEXs and AMMs due to sandwich attacks.
Schwartz stated that while he is not overly concerned about the issue, he has devised a straightforward scheme to eliminate such attacks. His proposal includes a new ledger object, termed ReservedTxns, which will maintain an array of transaction IDs designated for a specific future ledger. Additionally, he introduced a new transaction type, TxnReserve, enabling users to book a slot by paying at least double the standard transaction fee. These reservations are restricted to the upcoming 16 ledgers and capped at 32 slots per ledger to ensure efficiency.
Once a slot is reserved, the transaction is broadcast only after the consensus of the previous ledger is established, thereby preventing front-running. Reserved transactions will then be executed first, in the order they were reserved, preceding other transactions within that ledger. Schwartz emphasized that transaction success is contingent on factors such as the doubled fee and adherence to normal transaction execution requirements. The system also incorporates built-in denial-of-service (DoS) protection, as attackers would need to pay continuously, allowing others to simply wait out an attack.