|
| 1 | +<pre> |
| 2 | + XLS: XLS-55d |
| 3 | + Title: 0055 XLS-55d: Remit: Atomic Multi-Asset Payments for XRPL Protocol Chains |
| 4 | + Author: None (RichardAH) |
| 5 | + Created: 2023-12-03 |
| 6 | + Status: Final |
| 7 | + Category: Amendment |
| 8 | +</pre> |
| 9 | + |
| 10 | +# XLS-55d - Remit: Atomic Multi-Asset Payments for XRPL Protocol Chains |
| 11 | + |
| 12 | +## Introduction |
| 13 | + |
| 14 | +**_Remit_** is a new payment transactor designed for XRPL Protocol Chains, which allows a sender to send multiple currencies and tokens atomically to a specified destination. It is a push payment that delivers "no matter what" and is designed for retail and Hooks use-cases. |
| 15 | + |
| 16 | +## Constraints |
| 17 | + |
| 18 | +Using _Remit_ the sender may send: |
| 19 | + |
| 20 | +- one or more Issued Currencies, and/or, |
| 21 | +- one or more pre-existing URITokens owned by the sender and/or, |
| 22 | +- one new URIToken created in-line as part of the transaction. |
| 23 | + |
| 24 | +The transactor has the following behaviours: |
| 25 | + |
| 26 | +- If the destination does not exist, the sender pays to create it. |
| 27 | +- If the destination does not have the required trust-lines, the sender pays to create these. |
| 28 | +- The exact amounts and tokens are always delivered as specified in the transaction, if validated with code tesSUCCESS. |
| 29 | +- The sender pays all transfer fees on currencies, and the fees are not subtracted from the sent amount. |
| 30 | +- Where the sender pays to create objects, this is a separate amount not taken from the amounts specified in the transaction. |
| 31 | +- The transaction is atomic, either all amounts and tokens are delivered in the exact specified amount or none of them are. |
| 32 | +- The transactor does no conversion or pathing, the sender must already have the balances and tokens they wish to send. |
| 33 | +- When no amounts or tokens are specified, the transaction may still succeed. This can be used to create an account or ensure an account already exists. |
| 34 | + |
| 35 | +## Specification |
| 36 | + |
| 37 | +A _Remit_ transaction contains the following fields: |
| 38 | +Field | Required | Type | Description |
| 39 | +-|-|-|- |
| 40 | +sfAccount | ✅ |AccountID | The sender |
| 41 | +sfDestination | ✅ |AccountID | The recipient. Does not need to exist. Will be created if doesn't exist. |
| 42 | +sfDestinationTag | ❌ |UInt32 | May be used by the destination to differentiate sub-accounts. |
| 43 | +sfAmounts | ❌|Array of Amounts | Each of the currencies (if any) to send to the destination. Sender must have funded trustlines for each. Destination does not need trustlines. |
| 44 | +sfURITokenIDs | ❌| Array of URITokenIDs | Each of the URITokens (if any) to send to the destination. |
| 45 | +sfMintURIToken | ❌| URIToken | If included, an inline URIToken to be created and delivered to the destination, for example a receipt. |
| 46 | +sfBlob | ❌ | Blob | A hex blob up to 128 kib to supply to a receiving Hook at the destination. |
| 47 | +sfInform | ❌ | AccountID | A third party. If supplied, their Hooks will be weakly executed (but the sender will pay for that execution). |
| 48 | +sfInvoiceID | ❌ | UInt256 | An arbitrary identifier for this remittance. |
| 49 | + |
| 50 | +## Example Transaction |
| 51 | + |
| 52 | +``` |
| 53 | +{ |
| 54 | + "TransactionType" : "Remit", |
| 55 | + "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", |
| 56 | + "Destination" : "raod38dcxe6AGWfqxtZjPUfUdyrkWDe7d", |
| 57 | + "Amounts" : [ |
| 58 | + { |
| 59 | + "AmountEntry" : { |
| 60 | + "Amount" : "123" |
| 61 | + } |
| 62 | + }, |
| 63 | + { |
| 64 | + "AmountEntry" : { |
| 65 | + "Amount" : { |
| 66 | + "currency" : "USD", |
| 67 | + "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", |
| 68 | + "value" : "10" |
| 69 | + } |
| 70 | + } |
| 71 | + }, |
| 72 | + { |
| 73 | + "AmountEntry" : { |
| 74 | + "Amount" : { |
| 75 | + "currency" : "ABC", |
| 76 | + "issuer" : "rpfZurEGaJvpioTaxYpjh1EAtMXFN1HdtB", |
| 77 | + "value" : "12" |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + ], |
| 82 | + "URITokenIDs" : [ |
| 83 | + "C24DAF43927556F379F7B8616176E57ACEFF1B5D016DC896222603A6DD11CE05", |
| 84 | + "5E69C2D692E12D615B5FAC4A41989DA1EA5FD36E8F869B9ECA1121F561E33D2A" |
| 85 | + ], |
| 86 | + "MintURIToken" : { |
| 87 | + "URI" : "68747470733A2F2F736F6D652E757269" |
| 88 | + } |
| 89 | +} |
| 90 | +``` |
| 91 | + |
| 92 | +## Unwanted Remits |
| 93 | + |
| 94 | +Users who do not want to receive _Remit_ transactions can either set the _asfDisallowIncomingRemit_ on their accounts or install a Hook that will regulate incoming Remits. Alternatively they can simply burn unwanted URITokens or return unwanted Issued Currencies in order to claim the reserve that was paid by the sender. |
| 95 | + |
| 96 | +## Chain Requirements |
| 97 | + |
| 98 | +XLS-55 depends on the adoption of XLS-35 on the applicable chain. |
0 commit comments