You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/2024/how-to-mint-nfts.md
+28-5Lines changed: 28 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,20 @@ markdown:
10
10
editPage:
11
11
hide: true
12
12
---
13
-
# How to Mint an NFT on the XRP Ledger: A Step-by-Step Guide
13
+
# How to Mint an NFT: A Simple Step-by-Step Guide
14
14
15
15
The first in a broader series dedicated to making your XRP Ledger building journey an altogether smoother experience is here! In this piece we cover how you can begin to shape your very own NFT collection on the XRP Ledger today.
16
16
17
-
Navigating the exciting realm of [Non-fungible Tokens (NFTs)](https://xrpl.org/docs/concepts/tokens/nfts/) on the XRP Ledger can seem daunting at first. However, with the right tools and a bit of JavaScript or Python, minting, managing, and burning NFTs becomes a straightforward process. This blog demystifies the process, providing a clear guide on how to create, view, and destroy NFTs on this innovative platform.
17
+
Navigating the exciting realm of [Non-fungible Tokens (NFTs)](https://xrpl.org/docs/concepts/tokens/nfts/) on the XRP Ledger can seem daunting at first. However, with the right tools and a bit of JavaScript or Python, minting, managing, and burning NFTs becomes a straightforward process. This blog demystifies the process, providing a clear step-by-step guide on how to create, view, and destroy NFTs on this innovative platform.
18
18
19
19
<!-- BREAK -->
20
20
21
+
## What is an NFT?
22
+
23
+
A Non-Fungible Token (NFT) is a unique digital asset that represents ownership or proof of authenticity of a specific item, such as digital art, collectibles, music, in-game assets, or even tokenized real-world assets.
24
+
25
+
Unlike fungible tokens such as XRP, which are interchangeable and hold the same value, NFTs are distinct and cannot be exchanged on a one-to-one basis. Each NFT carries unique metadata stored on the blockchain, ensuring verifiable provenance and scarcity. On the XRP Ledger (XRPL), NFTs benefit from low transaction costs, high-speed settlements, and built-in royalty enforcement, making them an efficient and scalable option for creators and businesses looking to tokenize assets.
26
+
21
27
22
28
## How Much Does it Cost to Mint an NFT?
23
29
@@ -38,9 +44,9 @@ The following table provides examples of how much the total owner reserve might
38
44
| 200 | 14 XRP | 18 XRP | 26 XRP |
39
45
| 1000 | 64 XRP | 84 XRP | 126 XRP |
40
46
41
-
## Getting Started
47
+
## NFT Minting: Getting Started
42
48
43
-
Before diving into NFT minting, ensure you have access to test accounts on the XRP Ledger's Testnet or Devnet. This is crucial for experimenting without risking real assets. You can easily acquire test accounts by downloading the Quickstart Samples archive, available in [JavaScript] (https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/quickstart/js/) and [Python](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/quickstart/py), and following these steps:
49
+
Before diving into how to mint an NFT, ensure you have access to test accounts on the XRP Ledger's Testnet or Devnet. This is crucial for experimenting without risking real assets. You can easily acquire test accounts by downloading the Quickstart Samples archive, available in [JavaScript] (https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/quickstart/js/) and [Python](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/quickstart/py), and following these steps:
44
50
45
51
1. Open the `3.mint-nfts.html` file in a browser to initiate.
46
52
2. Obtain test accounts:
@@ -49,9 +55,26 @@ Before diving into NFT minting, ensure you have access to test accounts on the X
49
55
50
56

51
57
58
+
59
+
<divalign="center">
60
+
<iframewidth="560"height="315"src="https://www.youtube.com/watch?v=oGzKbQJCTJ0&t=9s"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"allowfullscreen></iframe>
61
+
</div>
62
+
63
+
<scripttype="application/ld+json">
64
+
{
65
+
"@context":"https://schema.org",
66
+
"@type":"VideoObject",
67
+
"name":"How to Mint an NFT on the XRP Ledger?",
68
+
"description":"How to Mint an NFT on the XRP Ledger?",
Minting an NFT involves creating a new, unique digital token on the blockchain. To [mint an NFT](https://xrpl.org/docs/concepts/tokens/nfts/) on the XRP Ledger:
77
+
Minting an NFT involves creating a new, unique digital token using blockchain technology. To [mint an NFT](https://xrpl.org/docs/concepts/tokens/nfts/) on the XRP Ledger:
55
78
56
79
1. Set the Flags: For testing, set the Flags field to 8. This makes your NFT transferable to others outside the issuing account. For a non-transferable NFT, you can omit this or set a different value.
57
80
2. Input the Token URL: This URL points to your NFT's data or metadata. You can use a sample URI or provide your own.
Copy file name to clipboardExpand all lines: docs/concepts/tokens/decentralized-exchange/automated-market-makers.md
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
2
seo:
3
+
title: Automated Market Makers (AMMs)
3
4
description: Automated Market Makers (AMMs) are an essential part of cryptocurrency, providing liquidity between asset pairs. Learn more about AMMs and the XRP Ledger.
4
5
labels:
5
6
- XRP
@@ -10,7 +11,7 @@ labels:
10
11
11
12
_(Added by the [AMM amendment][])_
12
13
13
-
Automated Market Makers (AMMs) provide liquidity in the XRP Ledger's decentralized exchange. Each AMM holds a pool of two assets. You can swap between the two assets at an exchange rate set by a formula.
14
+
Automated Market Makers (AMMs) provide liquidity in the XRP Ledger's decentralized exchange (DEX). Each AMM holds a pool of two assets. You can swap between the two assets at an exchange rate set by a mathematical formula.
14
15
15
16

16
17
@@ -24,6 +25,11 @@ LP tokens enable liquidity providers to:
24
25
- Vote to change the AMM fee settings, each vote weighted by how many LP tokens the voter holds.
25
26
- Bid some of their LP tokens to receive a temporary discount on the AMM trading fees.
26
27
28
+
<!--
29
+
## What is an AMM?
30
+
31
+
-->
32
+
27
33
## How the AMM Works
28
34
29
35
An AMM holds two different assets: at most one of these can be XRP, and one or both of them can be [tokens](../index.md).
@@ -57,7 +63,7 @@ Tokens with different issuers are considered different assets. This means that t
57
63
58
64
When the flow of funds between the two assets in a pool is relatively active and balanced, the fees provide a source of passive income for liquidity providers. However, when the relative price between the assets shifts, liquidity providers can take a loss on the [currency risk](https://www.investopedia.com/terms/c/currencyrisk.asp).
59
65
60
-
### DEX Interaction
66
+
### AMM and DEX Interaction
61
67
62
68
AMMs are integrated with the central limit order book (CLOB)-based DEX to enhance liquidity. Offers and payments are automatically optimized to determine whether swapping within a liquidity pool, through the order books, or both, provides the best rate and executes accordingly. This ensures that transactions use the most efficient path for trades, whether through offers on the DEX or through AMM pools, or a combination of the two.
63
69
@@ -89,7 +95,7 @@ To prevent misuse, some restrictions apply to the assets used in an AMM. If you
89
95
- If the asset is a token whose issuer uses [Authorized Trust Lines](../fungible-tokens/authorized-trust-lines.md), the creator of the AMM must be authorized to hold those tokens. Only your authorized trust lines can deposit that token into the AMM or withdraw it; however, you can still deposit or withdraw the other asset.
90
96
- If the [Clawback amendment][] is enabled, the issuer of the token must not have enabled the ability to claw back their tokens.
91
97
92
-
## LP Tokens
98
+
## AMM and LP Tokens
93
99
94
100
Whoever creates the AMM becomes the first liquidity provider, and receives LP tokens that represent 100% ownership of assets in the AMM's pool. They can redeem some or all of those LP tokens to withdraw assets from the AMM in proportion to the amounts currently there. (The proportions shift over time as people trade against the AMM.) The AMM does not charge a fee when withdrawing both assets.
95
101
@@ -108,7 +114,7 @@ The AMM is designed so that an AMM's asset pool is empty if and only if the AMM
108
114
LP tokens use a special type of currency code in the 160-bit hexadecimal ["non-standard" format](../../../references/protocol/data-types/currency-formats.md#nonstandard-currency-codes). These codes have the first 8 bits `0x03`. The remainder of the code is a SHA-512 hash, truncated to the first 152 bits, of the two assets' currency codes and their issuers. (The assets are placed in a "canonical order" with the numerically lower currency+issuer pair first.) As a result, the LP tokens for a given asset pair's AMM have a predictable, consistent currency code.
109
115
110
116
111
-
## Trading Fees
117
+
## AMM and Trading Fees
112
118
113
119
Trading fees are a source of passive income for liquidity providers. They offset the currency risk of letting others trade against the pool's assets. Trading fees are paid to the AMM, not directly to liquidity providers. Liquidity providers benefit because they can redeem their LP tokens for a percentage of the AMM pool.
114
120
@@ -138,7 +144,7 @@ No more than one account can hold the auction slot at a time, but as the success
138
144
139
145
The minimum bid to win the auction slot, if it is empty or expired, is equal to the current total number of LP Tokens outstanding multiplied by the trading fee, divided by 25. (In pseudocode, `MinBid = LPTokens * TradingFee / 25`.) If the auction slot is occupied, you must bid at least the minimum plus up to 105% of what the current slot holder paid, discounted by how much time they have remaining.
140
146
141
-
## Representation in the Ledger
147
+
## Representation of AMM in the Ledger
142
148
143
149
In the ledger's state data, an AMM consists of multiple [ledger entries](../../../references/protocol/ledger-data/ledger-entry-types/index.md):
144
150
@@ -153,7 +159,7 @@ In the ledger's state data, an AMM consists of multiple [ledger entries](../../.
153
159
These ledger entries are not owned by any account, so the [reserve requirement](../../accounts/reserves.md) does not apply to them. However, to prevent spam, the transaction to create an AMM has a special [transaction cost](../../transactions/transaction-cost.md) that requires the sender to burn a larger than usual amount of XRP.
154
160
155
161
156
-
## Deletion
162
+
## AMM Deletion
157
163
158
164
An AMM is deleted when an [AMMWithdraw transaction][] withdraws all assets from its pool. This only happens by redeeming all of the AMM's outstanding LP tokens. Deleting the AMM removes all the ledger entries associated with it, such as:
Copy file name to clipboardExpand all lines: docs/concepts/tokens/decentralized-exchange/index.md
+31-5Lines changed: 31 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,43 @@ parent: tokens.html
4
4
metadata:
5
5
indexPage: true
6
6
seo:
7
-
description: The XRP Ledger contains a fully functional exchange where users can trade tokens for XRP or each other.
7
+
title: Decentralized Exchange (DEX)
8
+
description: Explore how the XRP Ledger powers its decentralized exchange (DEX) for seamless crypto trading. Learn how you can trade tokens securely on the XRP Ledger.
8
9
targets:
9
10
- en
10
11
---
11
-
# Decentralized Exchange
12
+
# Decentralized Exchange (DEX)
12
13
13
14
The XRP Ledger has possibly the world's oldest _decentralized exchange_ (sometimes abbreviated "DEX"), operating continuously since the XRP Ledger's launch in 2012. The exchange allows users to buy and sell [tokens](../index.md) for XRP or other tokens, with minimal [fees](../../transactions/fees.md) charged to the network itself (not paid out to any party).
14
15
15
16
{% admonition type="warning" name="Caution" %}Anyone can [issue a token](../../../tutorials/how-tos/use-tokens/issue-a-fungible-token.md) with any currency code or ticker symbol they want and sell it in the decentralized exchange. Always perform due diligence before buying a token, and pay attention to the issuer. Otherwise, you might give up something of value and receive worthless tokens in exchange.{% /admonition %}
16
17
17
-
## Structure
18
+
## What is a Decentralized Exchange?
19
+
20
+
A decentralized exchange, abbreviated "DEX", is a platform that enables anyone to directly buy, sell, and trade digital assets with one another, without relying on a centralized intermediary like a bank or traditional exchange. DEXes typically use smart contracts and automated market makers (AMMs) to facilitate peer-to-peer trading and liquidity provision, enabling users to retain control over their assets while interacting in a decentralized manner.
21
+
22
+
The XRP Ledger's CLOB DEX is unique in that it does **not require** AMMs to swap. Trades on the XRP Ledger _can_ use AMMs to swap too, but unlike other DEXes, an AMM is not required.
23
+
24
+
<divalign="center">
25
+
<iframewidth="560"height="315"src="https://www.youtube.com/watch?v=VWNrHBDfXvA"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"allowfullscreen></iframe>
26
+
</div>
27
+
28
+
<scripttype="application/ld+json">
29
+
{
30
+
"@context":"https://schema.org",
31
+
"@type":"VideoObject",
32
+
"name":"What is a Decentralized Exchange, or DEX?",
33
+
"description":"What is a Decentralized Exchange, or DEX?",
The XRP Ledger's decentralized exchange consists of an unlimited number of currency pairs, tracked on-demand when users make trades. A currency pair can consist of XRP and a token or two different tokens; tokens are always identified by the combination of an issuer and a currency code. It is possible to trade between two tokens with the same currency code and different issuers, or the same issuer and different currency codes. <!-- STYLE_OVERRIDE: limited number -->
20
46
@@ -45,15 +71,15 @@ Later transactions, including ones executed immediately after Tran's in the _sam
45
71
{% admonition type="info" name="Note" %}The canonical order transactions execute in when a ledger is closed and validated is not the same as the order those transactions were sent. When multiple transactions affect the same order book in the same ledger, the final results of those transactions may be very different than the tentative results calculated at the time of transaction submission. For more details on when transactions' results are or are not final, see [Finality of Results](../../transactions/finality-of-results/index.md).{% /admonition %}
46
72
47
73
48
-
## Limitations
74
+
## DEX Limitations
49
75
50
76
The decentralized exchange is designed with the following limitations:
51
77
52
78
Because trades are only executed each time a new ledger closes (approximately every 3-5 seconds), the XRP Ledger is not suitable for [high-frequency trading](https://en.wikipedia.org/wiki/High-frequency_trading). The order transactions execute within a ledger is designed to be unpredictable, to discourage [front-running](https://en.wikipedia.org/wiki/Front_running).
53
79
54
80
The XRP Ledger does not natively represent concepts such as market orders, stop orders, or trading on leverage. Some of these may be possible with creative use of custom tokens and Offer properties.
55
81
56
-
As a decentralized system, the XRP Ledger does not have any information on the actual people and organizations behind the [accounts](../../accounts/index.md) involved in trading. The ledger itself cannot implement restrictions around who can or cannot participate in trading, and users and issuers must take care to follow any relevant laws to regulate trading tokens that represent various types of underlying assets. Features such as [freezes](../fungible-tokens/freezes.md) and [authorized trust lines](../fungible-tokens/authorized-trust-lines.md) are intended to help issuers comply with relevant laws and regulations.
82
+
As a decentralized system, the XRP Ledger does not have any personal information on the actual people and organizations behind the [accounts](../../accounts/index.md) involved in trading. The ledger itself cannot implement restrictions around who can or cannot participate in trading, and users and issuers must take care to follow any relevant laws to regulate trading tokens that represent various types of underlying assets. Features such as [freezes](../fungible-tokens/freezes.md) and [authorized trust lines](../fungible-tokens/authorized-trust-lines.md) are intended to help issuers comply with relevant laws and regulations.
0 commit comments