XRP Ledger Standards
XLS-0046 Final Amendment

Dynamic Non Fungible Tokens (dNFTs)

Support for XLS-20 NFTs to modify and upgrade token properties as mutable NFTs

Authors
Vet, Mayukha Vadari, TeQu
Created
2023-08-18
Updated
2026-12-02
Requires
XLS-20
Discussion
XRPLF/XRPL-Standards/discussions/130

1. Abstract

This proposal aims to provide support for XLS-20 NFTs to modify/upgrade token properties. It adds a new tfMutable flag to NFTokenMint and a new NFTokenModify transaction, which the issuer (or an entity authorized by the issuer) uses to modify the URI of an NFT minted with tfMutable.

2. Motivation

XLS-20 provides Non-Fungible Token support, these tokens are immutable and don’t allow any changes. Currently NFTs can’t be modified, resulting often in new mints, which leads to ledger bloat that eat valuable resources as well as experimental approaches to use website endpoints to mimic dynamic abilities.

Apart from the use of immutable NFTs, there is a wide range of use cases around dNFTs (Dynamic Non-Fungible Tokens) which are considered mutable NFTs. The goal is to provide both options to developers and users to cover all aspects of non fungibility, while choosing the least invasive approach to achieve this functionality.

Usually, NFTs are typically static in nature. A static NFT refers to an NFT that possesses unchanging and immutable characteristics stored on the blockchain, rendering them unmodifiable. These static NFTs encompass various forms like images, videos, GIF files, music, and unlockable components. For instance, an illustration of a basketball player making a shot into a hoop serves as an example of a static NFT.

On the other hand, dynamic NFTs, often abbreviated as dNFTs, represent the next phase in the evolution of the NFT landscape. These dynamic NFTs seamlessly integrate the inherent uniqueness of NFTs with the inclusion of dynamic data inputs. These inputs can arise from calculations conducted either on the blockchain or off-chain.

Oracles could supply dynamic real-world data to NFTs. To illustrate, a dynamic NFT might showcase real-time updates of a basketball player's performance statistics as they actively play.

3. Specification

This specification adds a new transaction, NFTokenModify, and a new flag for NFTokenMint, tfMutable.

3.1. Transaction: NFTokenMint

3.1.1. Fields

The fields of this transaction do not change.

3.1.2. Flags

New flags for NFTokenMint:

Flag Name Flag Value Description
tfMutable 0x00000010 Allow issuer (or an entity authorized by the issuer) to modify URI.

3.1.3. Transaction Fee

The fee for this transaction does not change.

3.1.4. Failure Conditions

TODO: content pass.

3.1.5. State Changes

TODO: content pass.

3.1.6. Example JSON

The JSON format of this transaction does not change.

3.2. Transaction: NFTokenModify

NFTokenModify is used to modify the URI property of a NFT.

3.2.1. Fields

Field Name Required JSON Type Internal Type Default Value Description
TransactionType Yes string UINT16 NFTokenModify Identifies this as an NFTokenModify transaction.
Owner No string ACCOUNT N/A Indicates the account which is owning the NFT, in case of Owner not specified, it's implied that the submitting account is also the Owner of the NFT.
NFTokenID Yes string UINT256 N/A Indicates the NFToken object to be modified.
URI No string BLOB N/A The new URI that points to data and/or metadata associated with the NFT.

3.2.2. Transaction Fee

TODO: content pass.

3.2.3. Failure Conditions

3.2.3.1. Data Verification

TODO: content pass.

3.2.3.2. Protocol-Level Failures
  1. tfMutable is not set. (TODO: content pass — result code.)
  2. tfMutable is set, and neither the Issuer nor an account authorized via NFTokenMinter, according to the specific flag, is executing the transaction. (TODO: content pass — result code.)

3.2.4. State Changes

On Success (tesSUCCESS):

  1. The URI of the NFT is set to the new URI.
  2. If a URI is omitted then the corresponding URI record in the XRP ledger, if present, is removed.

3.2.5. Example JSON

Example (modify URI):

{
  "TransactionType": "NFTokenModify",
  "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
  "Owner": "rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6",
  "Fee": "10",
  "Sequence": 33,
  "NFTokenID": "0008C350C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D5A048C0A300000007",
  "URI": "697066733A2F2F62616679626569636D6E73347A736F6C686C6976346C746D6E356B697062776373637134616C70736D6C6179696970666B73746B736D3472746B652F5665742E706E67",

  ...

}

4. Rationale

This approach takes into consideration that NFToken Flags are part of the NFTokenID, mutating anything that is part of the NFTokenID must be avoided.

5. Security Considerations

TODO: content pass.