XRP Ledger Standards
XLS-66.7.3 Draft Amendment

Lending Transactions in Batch

Allows the Lending Protocol transactions as Batch inner transactions

Author
Vytautas Vito Tumas
Created
2026-11-25
Updated
2026-11-25
Discussion
XRPLF/XRPL-Standards/discussions/190
Amendment
LendingProtocolV1_2
Patch of
XLS-0066: Lending Protocol

66.7.3 Lending Transactions in Batch

1. Abstract

Before LendingProtocolV1_2, a Batch that contains any Lending Protocol transaction as an inner transaction fails with temINVALID_INNER_BATCH. Under LendingProtocolV1_2, the nine Lending Protocol transactions can be Batch inner transactions and are subject to the normal Batch checks. The Vault transactions are allowed by the same amendment; see XLS-65.7.2.

2. Motivation

Lending workflows combine several transactions, for example creating a LoanBroker and depositing its first-loss capital, or creating a Loan and making a payment. Batch lets these run atomically.

3. Specification

This patch changes the parent XLS-66 sections named below. No fields are added or removed.

3.1 Transaction: Batch

3.1.1 Failure Conditions

The following transaction types are the Lending Protocol transactions:

  • LoanBrokerSet
  • LoanBrokerDelete
  • LoanBrokerCoverDeposit
  • LoanBrokerCoverWithdraw
  • LoanBrokerCoverClawback
  • LoanSet
  • LoanDelete
  • LoanManage
  • LoanPay

  • LendingProtocol (parent): A Batch with an inner transaction of one of these types fails with temINVALID_INNER_BATCH.

  • LendingProtocolV1_2: The check does not apply. The inner transaction is subject to the Batch inner transaction checks of XLS-56. A failure of the inner transaction's own data verification fails the Batch with temINVALID_INNER_BATCH.

3.2 Transaction: LoanSet

3.2.1 Failure Conditions

Under LendingProtocolV1_2, when LoanSet is a Batch inner transaction:

  • CounterpartySignature is not required. If it is present, it must not contain TxnSignature or Signers, and its SigningPubKey must be empty, as for the inner transaction's own signature fields.
  • Parent §3.8.5.1 check 3 applies: if Counterparty is not specified, the inner transaction fails with temBAD_SIGNER and the Batch fails with temINVALID_INNER_BATCH.
  • The Counterparty, if it is not the outer Batch account, must be one of the Batch signers, as for any inner transaction with a Counterparty field.

3.2.2 Transaction Fee

A Batch inner transaction has a fee of zero. The additional fee for the counterparty's signatures in parent §3.8.1.1 is paid through the outer Batch fee.

4. Rationale

The Lending Protocol transactions were excluded from Batch until their behavior inside a Batch was specified. The counterparty of a LoanSet signs the outer Batch instead of the inner transaction, as every other inner signer does.

5. Security Considerations

A LoanSet inside a Batch is authorized by the Batch signatures. The counterparty must still sign, because the Batch requires a signature from every inner Counterparty other than the outer account.