From 76190c3b1b91962b445133c30618add8abe0e307 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Fri, 9 Jun 2017 12:43:13 -0700 Subject: [PATCH] Partial Payments: peer review edits --- concept-partial-payments.html | 4 ++-- content/concept-partial-payments.md | 4 ++-- content/reference-transaction-format.md | 2 +- reference-transaction-format.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/concept-partial-payments.html b/concept-partial-payments.html index 3f47ba980f..2f4f54775d 100644 --- a/concept-partial-payments.html +++ b/concept-partial-payments.html @@ -165,7 +165,7 @@

Partial payments can be used to exploit naive integrations with the Ripple Consensus Ledger to steal money from exchanges and gateways. The Partial Payments Exploit section of this document describes how this exploit works and how you can avoid it.

Semantics

Without Partial Payments

-

When sending a Payment that does not use the Partial Payment flag, the Amount field of the transaction specifies the exact amount to deliver, and the SendMax field specifies the maximum amount and currency to send. If payment cannot deliver the full Amount without exceeding the SendMax parameter, or the full amount cannot be delivered for any other reason, the transaction fails. If the SendMax field is omitted from the transaction instructions, it is considered to be equal to the Amount. In this case, the payment can only succeed if the total amount of fees is 0.

+

When sending a Payment that does not use the Partial Payment flag, the Amount field of the transaction specifies the exact amount to deliver, and the SendMax field specifies the maximum amount and currency to send. If a payment cannot deliver the full Amount without exceeding the SendMax parameter, or the full amount cannot be delivered for any other reason, the transaction fails. If the SendMax field is omitted from the transaction instructions, it is considered to be equal to the Amount. In this case, the payment can only succeed if the total amount of fees is 0.

In other words:

Amount + (fees) = (sent amount) ≤ SendMax
 
@@ -188,7 +188,7 @@

The delivered_amount Field

To help understand how much a partial payment actually delivered, the metadata of a successful Payment transaction includes a delivered_amount field. This field describes the amount actually delivered, in the same format as the Amount field.

-

For non-partial payments, the delivered_amount field of the transaction metadata is equal to the Amount field of the transaction. When a payment delivers an issued currency, the delivered_amount may be slightly differently than the Amount field due to rounding.

+

For non-partial payments, the delivered_amount field of the transaction metadata is equal to the Amount field of the transaction. When a payment delivers an issued currency, the delivered_amount may be slightly different than the Amount field due to rounding.

The delivered amount is not available for transactions that meet both of the following criteria: