-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add XLS-61d: 0061 XLS-61d: CrossCurrency NFTokenAcceptOffer #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
848ef14
Add XLS-61d: 0061 XLS-61d: CrossCurrency NFTokenAcceptOffer
mvadari 0dc64b9
Update XLS-0061-cross-currency-nftokenacceptof/README.md
mvadari f8c63b7
Update XLS-0061-cross-currency-nftokenacceptof/README.md
mvadari 94faebd
Merge branch 'master' into xls-61d
mvadari abe428d
Merge branch 'master' into xls-61d
Tapanito 435cd5b
Merge branch 'master' into xls-61d
Tapanito ca0d973
Merge branch 'master' into xls-61d
mvadari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| <pre> | ||
| XLS: XLS-61d | ||
| Title: 0061 XLS-61d: CrossCurrency NFTokenAcceptOffer | ||
| Author: tequ (tequdev) | ||
| Created: 2024-02-26 | ||
| Status: Stagnant | ||
| Category: Amendment | ||
| </pre> | ||
|
|
||
| # Abstract | ||
|
|
||
| XRPL's NFToken functionality, currently implemented as XLS-20, only allows the use of a single currency for transactions. | ||
|
|
||
| This proposal allows cross-currency NFToken transactions using multiple currencies. | ||
|
|
||
| Creators and marketplaces will be able to sell NFTs without being tied to a currency, and users will be able to buy NFTs without being tied to a currency. | ||
|
|
||
| This will increase revenue opportunities for creators and marketplaces and create significant tokenomics. | ||
|
|
||
| # Specification | ||
|
|
||
| ## `NFTokenAcceptOffer` Transaction | ||
|
|
||
| Add the following field: | ||
|
|
||
| | Field Name | Required? | JSON Type | Internal Type | | ||
| | ---------- | :-------: | :------------------: | :-----------: | | ||
| | `Amount` | | `object` or `string` | `AMOUNT` | | ||
|
|
||
| ### `Amount` Field | ||
|
|
||
| When accepting an NFTokenOffer with the tfSellOffer flag set, the `Amount` field acts like the `SendMax` field, and when accepting an NFTokenOffer without tfSellOffer set, the `DeliverMin` field acts like the `Amount` field. | ||
|
|
||
| It doesn't have to match the `Amount` of the Offeror specified in `NFTokenSellOffer` or `NFTokenBuyOffer`. | ||
|
|
||
| In broker mode, the `Amount` field must not be present. | ||
|
|
||
| ### `NFTokenBrokerFee` Field | ||
|
|
||
| The existing `NFTokenBrokerFee` field can be any currency amount. | ||
|
|
||
| ### CrossCurrency Accept | ||
|
|
||
| The currency of `Amount` can be different from the currency of the BuyOffer / SellOffer. | ||
| The currency of `NFTokenBrokerFee` can be different from the currency of the BuyOffer / SellOffer. | ||
|
|
||
| Buyer must specify a sufficient amount that can be transferred to Seller, nftoken issuer(nftoken transfer fee), broker(broker fee), token issuer(token transfer fee). | ||
|
|
||
| NFToken transfer fees are sent in the buyer's currency. | ||
| NFToken with the tfOnlyXRP flag set will be paid in XRP. | ||
|
|
||
| If there was insufficient amount or liquidity, the transaction will fail. | ||
|
|
||
| ## `NFTokenCreateOffer` Transaction | ||
|
|
||
| No change in fields. | ||
|
|
||
| Change to only check if the NFToken issuer has a trustline for the currenfy of `Amount` field when creating a BuyOffer for an NFToken with royalties. | ||
|
|
||
| ## The `NFTokenPage` Object | ||
|
|
||
| No changes. | ||
|
|
||
| ## The `NFTokenOffer` Object | ||
|
|
||
| No changes. | ||
|
|
||
| # Cases | ||
|
|
||
| ## `Amount` Field not specified in `NFTokenAcceptOffer` Transaction | ||
|
|
||
| According to XLS-20 specifications. Except for NFTs with royalties, issuer's trust line [must be checked](https://github.com/XRPLF/rippled/issues/4925). | ||
|
|
||
| ## `Amount` Field specified and equal to `Amount` in `NFTokenOffer` | ||
|
|
||
| DEX liquidity will not be used and existing transfer processing will be used. | ||
| If the quantity in the `Amount` cannot be sent to the seller, the transaction will fail. | ||
|
|
||
| ## `Amount` Field specified and not same as `Amount` in `NFTokenOffer` | ||
|
|
||
| DEX liquidity will be used and other transfer processing (used in Payment/CheckCash) will be used. | ||
| If the quantity in `Amount` cannot be sent to the seller, the transaction will fail. | ||
|
|
||
| If the buyer's `Amount` can send more than the specified amount of the seller's `Amount`, the amount will be sent up to the maximum amount of the buyer's `Amount`. | ||
|
|
||
| ## `NFTokenBrokerFee` Field specified | ||
|
|
||
| Convert and send the amount from the buyer's `Amount` to satisfy the `NFTokenBrokerFee`. | ||
|
|
||
| ## Accept NFToken with TransferFee | ||
|
|
||
| Paid in the same currency as the buyer's `Amount`. | ||
| If no trustline is set, the transaction will fail. | ||
|
|
||
| ## Accept NFToken with TransferFee, `tfOnlyXRP`, `Amount` Field specified, `NFTokenBrokerFee` Field specified | ||
|
|
||
| Up to 3 times currency will be converted and up to 3 times token transfer fees will be charged. | ||
|
|
||
| 1. From Buyer to Broker (`NFTokenBrokerFee` currency, Buyer's `Amount` currency fee) | ||
| 1. From Buyer to Issuer (`TransferFee` currency or XRP, Buyer's `Amount` currency fee) | ||
| 1. From Buyer to Seller (`Amount` currency, Buyer's `Amount` currency fee) | ||
|
|
||
| # Concern | ||
|
|
||
| ## Transaction load | ||
|
|
||
| Processing load is expected to increase due to up to three cross-currency remittance processes (flows) within a single transaction. | ||
|
|
||
| However, instead of merely being concerned about the increased load of a single transaction, it should be noted that in the current, similar processing would have to be spread over two or more transactions, NFTokenAccept and CrossCurrency Payment. | ||
|
|
||
| ## Royalty for NFToken with tfOnlyFlag | ||
|
|
||
| The royalty is sent by converting a portion of the buyer's Amount (TransferFee %) into XRP, so if there is not enough liquidity, the royalty might be almost zero. | ||
|
|
||
| # Note | ||
|
|
||
| The process used by Payment is used for currency conversion and remittance processing. | ||
| Path cannot be specified, and only direct AAA->BBB pairs are used at this time. | ||
|
|
||
| If auto-bridge is enabled by default by XLS-60d, the auto-bridge path will also be used for the currency conversion process in this proposal. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.