update defining assets as MPTs with amm transactions

This commit is contained in:
Oliver Eggert
2025-03-04 14:49:17 -08:00
parent 28bda7c11f
commit a4209042b5
9 changed files with 21 additions and 13 deletions

View File

@@ -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

View File

@@ -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)).

View File

@@ -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

View File

@@ -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). |

View File

@@ -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. |

View File

@@ -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

View File

@@ -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. |

View File

@@ -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

View File

@@ -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. |