Conceptual doc for NFT transfers

This commit is contained in:
Dennis Dawson
2022-04-20 11:24:58 -07:00
committed by GitHub
parent e559ab3a40
commit 8f0c6c324b

View File

@@ -0,0 +1,81 @@
---
html: non-fungible-token-transfers.html
parent: non-fungible-tokens.html
blurb: Trading NFTokens in direct or brokered mode.
filters:
- include_code
labels:
- Non-fungible Tokens, NFTs
status: not_enabled
---
# Trading NFTokens on the XRP Ledger
You can transfer NFTokens between accounts on the XRP Ledger. You can transfer `NFTokens` by offering to buy or sell `NFTokens`, or accepting offers from other accounts. You can even give away `NFTokens` by offering to sell them at a price of 0. All offers are created using the [NFTokenCreateOffer]() transaction.
## Sell Offers
### Create a Sell Offer
As the owner of a [NFToken](), you can create a sell offer using a `NFTokenCreateOffer` transaction with a _Flags_ setting of _1_. You provide the _NFTokenID_ and the _Amount_ you are willing to accept in payment. You can optionally specify an _Expiration_ date, after which the offer is no longer valid, and a _Destination_ account, which is the only account that is allowed to purchase the `NFToken`.
### Accept a Sell Offer
To purchase a `NFToken` that is offered for sale, you use a [NFTokenAcceptOffer]() transaction. You provide the owner account and specify the `nft_offer_index` of the [NFTokenOffer]() you choose to accept.
## Buy Offers
### Create a Buy Offer
Any account can offer to buy a `NFToken` on the XRP Ledger. You can create a buy offer using `NFTokenCreateOffer` with a _Flags_ setting of _null_. You provide the _Owner_ account, _NFTokenID_, and the _Amount_ of your offer.
### Accept a Buy Offer
Use the [NFTokenAcceptOffer transaction][] to transfer a `NFToken`. Provide the `nft_offer_index` and the owner account to complete the transaction.
## Trading Modes
When trading `NFTokens`, you can choose between a _direct_ transaction between a buyer and seller or a _brokered_ transaction, where a third party account matches sell and buy offers to arrange the trade.
Trading in direct mode gives the seller control over the transfer. The seller can either post `NFTokens` for purchase by anyone, or sell NFTokens to a specific destination account. The seller receives the entire purchase price for the `NFToken`.
In brokered mode, the seller allows a third party account to broker the sale of the `NFToken`. The broker account collects a broker fee for the transfer at an agreed upon rate. The purchase is completed in real time, paying the broker and seller from the buyers funds without requiring an up front investment by the broker.
### When to Use Brokered Mode
If a `NFToken` creator has the time and patience to seek out the right buyers, the creator keeps all proceeds from the sale. This works fine for a creator who sells few `NFTokens` at variable prices.
On the other hand, creators might not want to spend their time selling their creations when they could spend the time creating. Instead of handling each individual sale, the sales work can be turned over to a third-party broker account.
Using a broker offers several advantages. For example:
* The broker can act as an agent, working to maximize the selling price of the `NFToken`. IF the broker is paid a percentage of the sale price, the higher the price, the more the broker can earn.
* The broker can act as a curator, organizing `NFTokens` based on a niche market, price point, or other criteria. This can attract groups of buyers who might not otherwise discover a creators work.
* The broker can act as a marketplace, such as Opensea.io, to handle the auction process at the application layer.
### Brokered Sale Workflows
In the most straightforward workflow, a creator mints a new `NFToken`. The creator initiates a sell offer, entering the minimum acceptable sale price and setting the broker as the destination. Potential buyers make bids for the NFToken, setting the broker as the destination for the bid. The broker selects a winning bid and completes the transaction, taking a brokers fee. The broker then cancels any remaining buy offers for the `NFToken`.
![Brokered Mode without Reserve](img/nft-brokered-mode-without-reserve.png)
Another potential workflow would give the creator more control over the sale. In this workflow, the creator mints a new `NFToken`. Bidders create their offers, setting the broker as the destination. The broker selects the winning bid, subtracts their broker fee, and uses `NFTokenCreateOffer` to request that the creator sign off on the offer. The creator signs the requested offer, setting the broker as the destination. The broker completes the sale using `NFTokenAcceptOffer`, retaining the broker fee. The broker cancels any remaining bids for the `NFToken` using `NFTokenCancelOffer`.
![Brokered Mode with Reserve](img/nft-brokered-mode-with-reserve.png)
The same workflows can be used when an owner resells a `NFToken` created by another account.