Skip to content

Commit 057436e

Browse files
authored
Merge pull request #3023 from XRPLF/docs-seo-updates
Recommended SEO updates for AMM and DEX pages, and Minting an NFT blog post.
2 parents bdcfac6 + 91b7bad commit 057436e

File tree

3 files changed

+71
-16
lines changed

3 files changed

+71
-16
lines changed

blog/2024/how-to-mint-nfts.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@ markdown:
1010
editPage:
1111
hide: true
1212
---
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
1414

1515
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.
1616

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

1919
<!-- BREAK -->
2020

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+
2127

2228
## How Much Does it Cost to Mint an NFT?
2329

@@ -38,9 +44,9 @@ The following table provides examples of how much the total owner reserve might
3844
| 200 | 14 XRP | 18 XRP | 26 XRP |
3945
| 1000 | 64 XRP | 84 XRP | 126 XRP |
4046

41-
## Getting Started
47+
## NFT Minting: Getting Started
4248

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:
4450

4551
1. Open the `3.mint-nfts.html` file in a browser to initiate.
4652
2. Obtain test accounts:
@@ -49,9 +55,26 @@ Before diving into NFT minting, ensure you have access to test accounts on the X
4955

5056
![Screenshot: Token Test Harness to mint and burn NFTs](/blog/img/devblog-how-to-mint-nfts-token-test-harness.png)
5157

58+
59+
<div align="center">
60+
<iframe width="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+
<script type="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?",
69+
"uploadDate": "2024-02-29",
70+
"embedUrl": "https://www.youtube.com/watch?v=oGzKbQJCTJ0&t=9s"
71+
}
72+
</script>
73+
74+
5275
## What does it mean to mint an NFT?
5376

54-
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:
5578

5679
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.
5780
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.

docs/concepts/tokens/decentralized-exchange/automated-market-makers.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
seo:
3+
title: Automated Market Makers (AMMs)
34
description: Automated Market Makers (AMMs) are an essential part of cryptocurrency, providing liquidity between asset pairs. Learn more about AMMs and the XRP Ledger.
45
labels:
56
- XRP
@@ -10,7 +11,7 @@ labels:
1011

1112
_(Added by the [AMM amendment][])_
1213

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

1516
![Automated Market Maker](/docs/img/cpt-amm.png)
1617

@@ -24,6 +25,11 @@ LP tokens enable liquidity providers to:
2425
- Vote to change the AMM fee settings, each vote weighted by how many LP tokens the voter holds.
2526
- Bid some of their LP tokens to receive a temporary discount on the AMM trading fees.
2627

28+
<!--
29+
## What is an AMM?
30+
31+
-->
32+
2733
## How the AMM Works
2834

2935
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
5763

5864
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).
5965

60-
### DEX Interaction
66+
### AMM and DEX Interaction
6167

6268
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.
6369

@@ -89,7 +95,7 @@ To prevent misuse, some restrictions apply to the assets used in an AMM. If you
8995
- 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.
9096
- If the [Clawback amendment][] is enabled, the issuer of the token must not have enabled the ability to claw back their tokens.
9197

92-
## LP Tokens
98+
## AMM and LP Tokens
9399

94100
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.
95101

@@ -108,7 +114,7 @@ The AMM is designed so that an AMM's asset pool is empty if and only if the AMM
108114
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.
109115

110116

111-
## Trading Fees
117+
## AMM and Trading Fees
112118

113119
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.
114120

@@ -138,7 +144,7 @@ No more than one account can hold the auction slot at a time, but as the success
138144

139145
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.
140146

141-
## Representation in the Ledger
147+
## Representation of AMM in the Ledger
142148

143149
In the ledger's state data, an AMM consists of multiple [ledger entries](../../../references/protocol/ledger-data/ledger-entry-types/index.md):
144150

@@ -153,7 +159,7 @@ In the ledger's state data, an AMM consists of multiple [ledger entries](../../.
153159
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.
154160

155161

156-
## Deletion
162+
## AMM Deletion
157163

158164
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:
159165

docs/concepts/tokens/decentralized-exchange/index.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,43 @@ parent: tokens.html
44
metadata:
55
indexPage: true
66
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.
89
targets:
910
- en
1011
---
11-
# Decentralized Exchange
12+
# Decentralized Exchange (DEX)
1213

1314
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).
1415

1516
{% 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 %}
1617

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+
<div align="center">
25+
<iframe width="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+
<script type="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?",
34+
"uploadDate": "2022-01-10",
35+
"embedUrl": "https://www.youtube.com/watch?v=VWNrHBDfXvA?feature=shared"
36+
}
37+
</script>
38+
39+
<!-- To Do
40+
## How DEX Works?
41+
-->
42+
43+
## DEX Structure
1844

1945
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 -->
2046

@@ -45,15 +71,15 @@ Later transactions, including ones executed immediately after Tran's in the _sam
4571
{% 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 %}
4672

4773

48-
## Limitations
74+
## DEX Limitations
4975

5076
The decentralized exchange is designed with the following limitations:
5177

5278
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).
5379

5480
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.
5581

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

5884
## See Also
5985

0 commit comments

Comments
 (0)