From a4209042b5a229227732127286a6e62f1b658f1b Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Tue, 4 Mar 2025 14:49:17 -0800 Subject: [PATCH] update defining assets as MPTs with amm transactions --- docs/_snippets/common-links.md | 1 + docs/references/protocol/data-types/basic-data-types.md | 2 +- docs/references/protocol/data-types/currency-formats.md | 7 +++++++ docs/references/protocol/transactions/types/ammbid.md | 4 ++-- docs/references/protocol/transactions/types/ammclawback.md | 4 ++-- docs/references/protocol/transactions/types/ammdelete.md | 4 ++-- docs/references/protocol/transactions/types/ammdeposit.md | 4 ++-- docs/references/protocol/transactions/types/ammvote.md | 4 ++-- docs/references/protocol/transactions/types/ammwithdraw.md | 4 ++-- 9 files changed, 21 insertions(+), 13 deletions(-) diff --git a/docs/_snippets/common-links.md b/docs/_snippets/common-links.md index b91120a8c3..fcf835f312 100644 --- a/docs/_snippets/common-links.md +++ b/docs/_snippets/common-links.md @@ -273,6 +273,7 @@ [Specifying Currency Amounts]: /docs/references/protocol/data-types/basic-data-types.md#specifying-currency-amounts [Specifying Ledgers]: /docs/references/protocol/data-types/basic-data-types.md#specifying-ledgers [Specifying Time]: /docs/references/protocol/data-types/basic-data-types.md#specifying-time +[Specifying Without Amounts]: /docs/references/protocol/data-types/currency-formats.md#specifying-without-amounts [SusPay amendment]: /resources/known-amendments.md#suspay [TickSize amendment]: /resources/known-amendments.md#ticksize [Ticket entry]: /docs/references/protocol/ledger-data/ledger-entry-types/ticket.md diff --git a/docs/references/protocol/data-types/basic-data-types.md b/docs/references/protocol/data-types/basic-data-types.md index 40c6297b54..c38c23b456 100644 --- a/docs/references/protocol/data-types/basic-data-types.md +++ b/docs/references/protocol/data-types/basic-data-types.md @@ -108,7 +108,7 @@ Reporting Mode does not record ledger data until it has been validated. If you m ## Specifying Currency Amounts -There are two kinds of currencies in the XRP Ledger: XRP and tokens. These two types of currencies are specified in different formats, with different precision and rounding behavior. +There are three kinds of currencies in the XRP Ledger: XRP, tokens, and MPTs. These three types of currencies are specified in different formats, with different precision and rounding behavior. Some fields, such as the destination `Amount` of a [Payment transaction][], can be either type. Some fields only accept XRP specifically, such as the `Fee` field ([transaction cost](../../../concepts/transactions/transaction-cost.md)). diff --git a/docs/references/protocol/data-types/currency-formats.md b/docs/references/protocol/data-types/currency-formats.md index 7082493d44..42a670f012 100644 --- a/docs/references/protocol/data-types/currency-formats.md +++ b/docs/references/protocol/data-types/currency-formats.md @@ -94,6 +94,13 @@ To describe XRP without an amount, specify it as a JSON object with _only_ a `cu } ``` +To describe an MPT without an amount, specify it as a JSON object with _only_ a `mpt_issuance_id` field. For example: + +```json +{ + "mpt_issuance_id": "0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47" +} +``` ## String Numbers diff --git a/docs/references/protocol/transactions/types/ammbid.md b/docs/references/protocol/transactions/types/ammbid.md index 386c100601..a883bd52f7 100644 --- a/docs/references/protocol/transactions/types/ammbid.md +++ b/docs/references/protocol/transactions/types/ammbid.md @@ -56,8 +56,8 @@ You bid using the AMM's LP Tokens; the amount of a winning bid is returned to th | Field | JSON Type | [Internal Type][] | Required? | Description | |:---------------|:--------------------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `BidMin` | [Currency Amount][] | Amount | No | Pay at least this amount for the slot. Setting this value higher makes it harder for others to outbid you. If omitted, pay the minimum necessary to win the bid. | | `BidMax` | [Currency Amount][] | Amount | No | Pay at most this amount for the slot. If the cost to win the bid is higher than this amount, the transaction fails. If omitted, pay as much as necessary to win the bid. | | `AuthAccounts` | Array | STArray | No | A list of up to 4 additional accounts that you allow to trade at the discounted fee. This cannot include the address of the transaction sender. Each of these objects should be an [Auth Account object](#auth-account-objects). | diff --git a/docs/references/protocol/transactions/types/ammclawback.md b/docs/references/protocol/transactions/types/ammclawback.md index a6f19a5409..a8d9880c17 100644 --- a/docs/references/protocol/transactions/types/ammclawback.md +++ b/docs/references/protocol/transactions/types/ammclawback.md @@ -39,8 +39,8 @@ Clawback is disabled by default. To use clawback, you must send an [AccountSet t | Field | JSON Type | [Internal Type][] | Required | Description | |:-------------------|:----------|:------------------|:---------|:------------------| | `Account` | String | AccountID | Yes | The issuer of the asset being clawed back. Only the issuer can submit this transaction. | -| `Asset` | Object | STIssue | Yes | Specifies the asset that the issuer wants to claw back from the AMM pool. In JSON, this is an object with `currency` and `issuer` fields. The `issuer` field must match with `Account`. | -| `Asset2` | Object | STIssue | Yes | Specifies the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | Specifies the asset that the issuer wants to claw back from the AMM pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). The `issuer` field must match with `Account`. | +| `Asset2` | Object | STIssue | Yes | Specifies the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `Amount` | [Currency Amount](https://xrpl.org/docs/references/protocol/data-types/basic-data-types#specifying-currency-amounts) | Amount | No | The maximum amount to claw back from the AMM account. The `currency` and `issuer` subfields should match the `Asset` subfields. If this field isn't specified, or the `value` subfield exceeds the holder's available tokens in the AMM, all of the holder's tokens are clawed back. | | `Holder` | String | AccountID | Yes | The account holding the asset to be clawed back. | diff --git a/docs/references/protocol/transactions/types/ammdelete.md b/docs/references/protocol/transactions/types/ammdelete.md index 4eb0486056..d75fbb4325 100644 --- a/docs/references/protocol/transactions/types/ammdelete.md +++ b/docs/references/protocol/transactions/types/ammdelete.md @@ -39,8 +39,8 @@ Normally, an [AMMWithdraw transaction][] automatically deletes an AMM and all as | Field | JSON Type | [Internal Type][] | Required? | Description | |:---------------|:--------------------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | ## Error Cases diff --git a/docs/references/protocol/transactions/types/ammdeposit.md b/docs/references/protocol/transactions/types/ammdeposit.md index 9fc4d25b43..7e5c33c281 100644 --- a/docs/references/protocol/transactions/types/ammdeposit.md +++ b/docs/references/protocol/transactions/types/ammdeposit.md @@ -52,8 +52,8 @@ You can't deposit either asset into an AMM if: | Field | JSON Type | [Internal Type][] | Required? | Description | |:--------------|:--------------------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `Amount` | [Currency Amount][] | Amount | No | The amount of one asset to deposit to the AMM. If present, this must match the type of one of the assets (tokens or XRP) in the AMM's pool. | | `Amount2` | [Currency Amount][] | Amount | No | The amount of another asset to add to the AMM. If present, this must match the type of the other asset in the AMM's pool and cannot be the same asset as `Amount`. | | `EPrice` | [Currency Amount][] | Amount | No | The maximum effective price, in the deposit asset, to pay for each LP Token received. | diff --git a/docs/references/protocol/transactions/types/ammvote.md b/docs/references/protocol/transactions/types/ammvote.md index 3a00f062fc..6893cec96a 100644 --- a/docs/references/protocol/transactions/types/ammvote.md +++ b/docs/references/protocol/transactions/types/ammvote.md @@ -39,8 +39,8 @@ Vote on the trading fee for an [Automated Market Maker](../../../../concepts/tok | Field | JSON Type | [Internal Type][] | Required? | Description | |:-------------|:----------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `TradingFee` | Number | UInt16 | Yes | The proposed fee to vote for, in units of 1/100,000; a value of 1 is equivalent to 0.001%. The maximum value is 1000, indicating a 1% fee. | ## Error Cases diff --git a/docs/references/protocol/transactions/types/ammwithdraw.md b/docs/references/protocol/transactions/types/ammwithdraw.md index c856778518..33de1cf9d0 100644 --- a/docs/references/protocol/transactions/types/ammwithdraw.md +++ b/docs/references/protocol/transactions/types/ammwithdraw.md @@ -44,8 +44,8 @@ Withdraw assets from an [Automated Market Maker](../../../../concepts/tokens/dec | Field | JSON Type | [Internal Type][] | Required? | Description | |:-------------|:--------------------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `Amount` | [Currency Amount][] | Amount | No | The amount of one asset to withdraw from the AMM. This must match the type of one of the assets (tokens or XRP) in the AMM's pool. | | `Amount2` | [Currency Amount][] | Amount | No | The amount of another asset to withdraw from the AMM. If present, this must match the type of the other asset in the AMM's pool and cannot be the same type as `Amount`. | | `EPrice` | [Currency Amount][] | Amount | No | The minimum effective price, in LP Token returned, to pay per unit of the asset to withdraw. |