mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 11:55:50 +00:00
Further updates for review
This commit is contained in:
@@ -19,9 +19,9 @@ The [TokenEscrow amendment][] extends escrow functionality to fungible tokens, w
|
||||
|
||||
For Trust Line Tokens to be held in escrow, the issuing account must have the **Allow Trust Line Locking** flag enabled, which allows tokens issued by the account to be held in escrow. For MPTs, the issuer needs to enable the **Can Escrow** and **Can Transfer** flags when creating the token issuance, so that the tokens can be held in escrow and transferred.
|
||||
|
||||
While issuers can't create escrows with their own issued tokens, they can serve as recipients. When an issuer receives escrowed tokens, this effectively functions as a redemption process, allowing tokens to return to their source.
|
||||
While issuers can't create escrows with their own issued tokens, they can serve as recipients. When an issuer receives escrowed tokens, the process works the same way as a direct payment.
|
||||
|
||||
If a token requires authorization, both the sender and recipient must be pre-authorized by the issuer to hold the token before creating or finishing an escrow, respectively.
|
||||
If a token requires authorization, the sender must be pre-authorized by the issuer before creating an escrow and must also be authorized to receive the tokens back when an expired escrow is canceled, regardless of who submits the cancellation transaction. The recipient must be pre-authorized before the escrow can be finished.
|
||||
|
||||
## Types of Escrow
|
||||
|
||||
@@ -77,10 +77,7 @@ While XRP escrows can sometimes exist without an expiration time, token escrows
|
||||
- You can't create an escrow with past time values.
|
||||
- Timed releases and expirations resolve according to [ledger close times](../ledgers/ledger-close-times.md). In practice, actual release and expiration times can vary by about five seconds as ledgers close.
|
||||
- The only supported crypto-condition type is PREIMAGE-SHA-256.
|
||||
- If a token holder is deep frozen (Trust Line Tokens) or locked (MPTs), they cannot finish an escrow to receive tokens, but they can still cancel an escrow to return tokens to the sender.
|
||||
{% admonition type="info" name="Note" %}
|
||||
Individual or global freezes for Trust Line Tokens don't prevent escrow completion.
|
||||
{% /admonition %}
|
||||
- If a token holder is deep frozen (Trust Line Tokens) or locked (MPTs), they cannot finish an escrow to receive tokens, but they can still cancel an escrow to return tokens to the sender. Individual or global freezes for Trust Line Tokens don't prevent escrow completion.
|
||||
|
||||
- For tokens requiring authorization, both sender and recipient must be pre-authorized by the issuer before creating or finishing the escrow, respectively. Authorization cannot be granted during the escrow completion process.
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ labels:
|
||||
- Payment Channels
|
||||
---
|
||||
# account_channels
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/AccountChannels.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/AccountChannels.cpp "Source")
|
||||
|
||||
The `account_channels` method returns information about an account's Payment Channels. This includes only channels where the specified account is the channel's source, not the destination. (A channel's "source" and "owner" are the same.) All information retrieved is relative to a particular version of the ledger.
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
|
||||
| `AssetScale` | Number | UInt8 | Yes | Where to put the decimal place when displaying amounts of this MPT. More formally, the asset scale is a non-negative integer (0, 1, 2, …) such that one standard unit equals 10^(-scale) of a corresponding fractional unit. For example, if a US Dollar Stablecoin has an asset scale of _2_, then 1 unit of that MPT would equal 0.01 US Dollars. This indicates to how many decimal places the MPT can be subdivided. The default is `0`, meaning that the MPT cannot be divided into smaller than 1 unit. |
|
||||
| `MaximumAmount` | String - Number | UInt64 | No | The maximum number of MPTs that can exist at one time. If omitted, the maximum is currently limited to 2<sup>63</sup>-1. |
|
||||
| `OutstandingAmount` | String - Number | UInt64 | Yes | The total amount of MPTs of this issuance currently in circulation. This value increases when the issuer sends MPTs to a non-issuer, and decreases whenever the issuer receives MPTs. |
|
||||
| `LockedAmount` | String - Number | UInt64 | No | The amount of tokens currently locked up (for example, in escrow). {% amendment-disclaimer name="TokenEscrow" /%} |
|
||||
| `LockedAmount` | String - Number | UInt64 | No | The amount of tokens currently locked up (for example, in escrow). This amount is already included in the `OutstandingAmount`. {% amendment-disclaimer name="TokenEscrow" /%} |
|
||||
| `TransferFee` | Number | UInt16 | Yes | This value specifies the fee, in tenths of a basis point, charged by the issuer for secondary sales of the token, if such sales are allowed at all. Valid values for this field are between 0 and 50,000 inclusive. A value of 1 is equivalent to 1/10 of a basis point or 0.001%, allowing transfer rates between 0% and 50%. A `TransferFee` of 50,000 corresponds to 50%. The default value for this field is 0. Any decimals in the transfer fee are rounded down. The fee can be rounded down to zero if the payment is small. Issuers should make sure that their MPT's `AssetScale` is large enough. |
|
||||
| `MPTokenMetadata` | String - Hexadecimal | Blob | Yes | Arbitrary metadata about this issuance, in hex format. The limit for this field is 1024 bytes. |
|
||||
| `OwnerNode` | String - Hexadecimal | UInt64 | Yes | A hint indicating which page of the owner directory links to this entry, in case the directory consists of multiple pages. |
|
||||
|
||||
@@ -41,8 +41,6 @@ Any account may submit an EscrowCancel transaction.
|
||||
|
||||
Besides errors that can occur for all transactions, {% $frontmatter.seo.title %} transactions can result in the following [transaction result codes](../transaction-results/index.md):
|
||||
|
||||
## EscrowFinish Errors
|
||||
|
||||
| Error Code | Description |
|
||||
|:------------------------- |:------------|
|
||||
| `tecNO_AUTH` | The transaction failed because authorization requirements were not met. For example, the issuer requires authorization and the sender is not authorized. |
|
||||
|
||||
@@ -47,7 +47,7 @@ To escrow fungible tokens you must take note of the following:
|
||||
|:-----------------|:----------|:------------------|:--------------------------|
|
||||
| `Amount` | Object or String | Amount | Amount of XRP, in drops, or fungible tokens to deduct from the sender's balance and escrow. Once escrowed, the payment can either go to the `Destination` address (after the `FinishAfter` time) or be returned to the sender (after the `CancelAfter` time). {% amendment-disclaimer name="TokenEscrow" mode="updated" /%} |
|
||||
| `Destination` | String | AccountID | Address to receive escrowed funds. |
|
||||
| `CancelAfter` | Number | UInt32 | _(Optional for XRP escrows, but mandatory for token escrows)_ The time, in [seconds since the Ripple Epoch][], when this escrow expires. This value is immutable; the funds can only be returned to the sender after this time. Required if the token is a fungible token. |
|
||||
| `CancelAfter` | Number | UInt32 | _(Optional for XRP escrows, but mandatory for token escrows)_ The time, in [seconds since the Ripple Epoch][], when this escrow expires. This value is immutable; the funds can only be returned to the sender after this time. |
|
||||
| `FinishAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch][], when the escrowed funds can be released to the recipient. This value is immutable, and the funds can't be accessed until this time. |
|
||||
| `Condition` | String | Blob | _(Optional)_ Hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). The funds can only be delivered to the recipient if this condition is fulfilled. If the condition is not fulfilled before the expiration time specified in the `CancelAfter` field, the funds can only revert to the sender. |
|
||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the destination for this escrowed payment, such as a hosted recipient at the destination address. |
|
||||
|
||||
@@ -52,8 +52,6 @@ In [non-production networks](../../../../concepts/networks-and-servers/parallel-
|
||||
|
||||
Besides errors that can occur for all transactions, {% $frontmatter.seo.title %} transactions can result in the following [transaction result codes](../transaction-results/index.md):
|
||||
|
||||
## EscrowFinish Errors
|
||||
|
||||
| Error Code | Description |
|
||||
|:------------------------- |:------------|
|
||||
| `tecNO_AUTH` | The transaction failed because authorization requirements were not met. For example, the issuer requires authorization and the destination is not authorized. |
|
||||
|
||||
@@ -1762,10 +1762,23 @@ Introduces a `TickSize` field to accounts, which can be set with the [AccountSet
|
||||
| Default Vote (Latest stable release) | No |
|
||||
| Pre-amendment functionality retired? | No |
|
||||
|
||||
Extends the existing Escrow functionality to support escrowing issued tokens or MPTs.
|
||||
Extends escrow functionality to fungible tokens, enabling Trust Line Tokens and Multi-Purpose Tokens (MPTs) to be held in escrow. Issuers can control whether their tokens can be escrowed through flags. To issue Trust Line Tokens, issuers must enable the **Allow TrustLine Locking** flag on their account, or the **Can Escrow** and **Can Transfer** flags for an MPT issuance.
|
||||
|
||||
Specification: [XLS-85](https://github.com/XRPLF/XRPL-Standards/pull/272/)
|
||||
Modifies existing transactions:
|
||||
|
||||
- EscrowCreate - Can now escrow fungible tokens in addition to XRP.
|
||||
- EscrowFinish - Can now deliver escrowed fungible tokens to recipients.
|
||||
- EscrowCancel - Can now return escrowed fungible tokens to senders.
|
||||
- AccountSet - Can now enable the **Allow Trust Line Locking** flag to allow Trust Line Tokens issued by an account to be escrowed.
|
||||
|
||||
Updates existing ledger entry types:
|
||||
|
||||
- Escrow - Adds support for fungible token amounts and two new fields; `TransferRate` and `IssuerNode`.
|
||||
- MPToken - Adds optional `LockedAmount` field to track tokens in escrow.
|
||||
- MPTokenIssuance - Adds optional `LockedAmount` field to track tokens in escrow.
|
||||
- AccountRoot - Adds **Allow Trust Line Locking** flag.
|
||||
|
||||
Specification: [XLS-85](https://xls.xrpl.org/xls/XLS-0085-token-escrow.html)
|
||||
|
||||
### TrustSetAuth
|
||||
[TrustSetAuth]: #trustsetauth
|
||||
|
||||
Reference in New Issue
Block a user