Blockchain Capital: A Detailed Explanation of Dynamic NFTs (dNFT) Built on Metadata

BlockchainCapital
2022-08-24 14:58:12
Collection
We need more complex and dynamic metadata to enable NFTs to play a greater role in the future open and decentralized financial system.

Original Title: 《dNFT, Metadata-Enabled

Author: Nico Pei, Blockchain Capital

Translation: Biscuit, Chain Catcher

Background

When mentioning NFTs, most people might first think of Bored Apes or Punks—rising from being worthless in 2020 to millions of dollars. From early 2021 to 2022, Nike, LVMH, and Tiffany & Co either launched their own NFT projects or acquired their NFT partners.

image

With the rapid growth of NFT trading volume, we have been exploring the NFT space for a year and a half, and curious individuals might ask: what else can this technology achieve?

Let’s take a step back and think about what NFTs are truly doing on-chain. Fungible tokens map users to balances, while NFTs map tokens to users (user → balance vs NFT_id → user). Therefore, if we want to assess the potential of NFTs, the right question is: how many financial instruments are non-fungible?

Non-Fungibility

To evaluate which asset classes are non-fungible, let’s look at the balance sheet of a large company—Walmart.

image

To be clear, fungibility refers to the interchangeability of assets—my Bitcoin is the same as your Bitcoin. Strictly defined, non-fungibility refers to one of many asset classes. It is worth noting that there exists a complete spectrum between truly non-fungible assets (like a piece of art or a house) and truly fungible assets (like BTC/USD or common stock of Apple Inc.).

Some assets/liabilities can be non-fungible because they are defined by expiration dates, interest rates, strike prices, underlying assets, counterparties, etc. However, portions/shares of these assets/liabilities can also be traded, bringing liquidity to the assets, thus allowing for more effective price discovery of these otherwise purely non-fungible assets. Typically, they are negotiated and constructed through banks and over-the-counter trading. Their liquidity is generally lower than that of fungible assets. Obvious examples of non-fungible assets can include real estate, over-the-counter options, over-the-counter futures, bespoke derivatives negotiated between two parties, artworks, and collectibles.

On the other hand, fungible assets refer to assets/liabilities defined by underlying assets/cash and cash equivalents. They are typically issued by governments or large corporations, or issued collateralized by cash and cash equivalents. Fungible assets are traded on exchanges but can also be traded over-the-counter and have significant liquidity due to the services of market makers.

Here are the details of non-fungible assets on Walmart's balance sheet.

image

With so many non-fungible financial instruments in the world, how can we represent these assets on-chain in an open and decentralized financial system? Are NFTs the solution?

The short answer is yes, but we need to adopt a more complex and dynamic form of metadata.

NFTs as Data Containers

NFTs essentially consist of two components: TokenID and metadata. The TokenID is a unique identifier representing ownership. Metadata is the information associated with the NFT. Metadata can include names, descriptions, the CID of stored media files, or any other attributes that can be integers, strings, or objects. The media files stored under the CID contain the content of the NFT—it can be images, videos, websites, a piece of code (e.g., generative art), or any arbitrary data.

The easiest-to-understand example of metadata is when you view an NFT on OpenSea; the name and description displayed on the OpenSea page are not manually specified by the creator or the OpenSea team but are queried from the metadata.

NFTs can interact with protocols in ways specified in smart contracts, and the metadata contains all the key data that defines the asset. Therefore, by adding more programmability and functionality, NFTs will transcend the forms of artworks and collectibles and change the way we use metadata.

Most existing NFTs' metadata contains names, descriptions, and CIDs pointing to media files. However, due to the flexibility of the aforementioned metadata, it can be used to specify many things: expiration dates, underlying assets, strike prices, yields, counterparties, fixed rates, depreciation rates, game character levels, accessibility, etc.

Metadata can also contain functional attributes, such as specifying character levels in a game, recording the number of scans of a QR code on a membership pass, or specifying the non-fungible status in financial information.

For example, Uniswap v3 uses NFTs to represent the positions of liquidity providers (LPs). The NFT specifies the LP's fee tier, range, poolID, position size, and earned fees in its metadata. Below is the code of the Uniswap v3 contract that defines the NFT metadata representing LP positions.

image

Uniswap v3 NFTs open up a world where NFTs go beyond artworks and collectibles: NFTs can serve as receipts for non-fungible financial positions. NFTs act as receipts for providing liquidity in liquidity pools and the fees earned from the provided liquidity. When users sell the NFT, they are selling their position. When users send the NFT back to the Uniswap protocol, they can reclaim what they own—the liquidity assets they provided and the fees earned throughout the period.

For static NFTs, the metadata is defined at the time of generation and cannot be changed afterward. Bored Ape NFTs only contain Bored Ape images and cannot be altered. Having static metadata is very suitable for artworks and collectibles NFTs.

However, to build a robust and open NFT system beyond artworks and collectibles, many attributes in the metadata need to be updated. For example, the fees earned during the liquidity provision period may increase, the underlying asset of the position may change, a player's performance in the game may affect their character level, and holders may wish to postpone the expiration date by paying a premium.

Dynamic NFTs come into play here.

Introducing Dynamic NFTs (dNFTs)

Dynamic NFTs (dNFTs), also known as NFT 2.0, have metadata that can change based on instructions written in smart contracts and external conditions or actions. Dynamic NFTs have a unique and static TokenID (ownership) and dynamic metadata (or other dynamic elements, such as certain external conditions triggering minting/burning). The unique TokenID serves as the identifier for the dNFT, while their dynamic metadata can change based on external conditions, including on-chain or off-chain events, actions, outcomes, or data updates.

dNFTs essentially require two pieces of information to understand how to update metadata:

  1. Instructions on when and how to change the metadata for the underlying NFT
  2. Access to relevant external data sources

The instructions are written in smart contracts, and the data sources come from on-chain data or off-chain data provided by tamper-proof oracles.

image

dNFTs can update in various ways based on external conditions. These upgrades include description updates, financial position size and liquidity range updates, unlocking and upgrading hidden features, image changes, utility changes, and granting access, most of which fall into categories of financial position NFTs, on-chain games, and utility NFTs for ticketing and token-gated content and communities.

In addition to changes in metadata, dynamic elements can also exist, allowing dNFTs to be minted based on specific external conditions, such as minting a dNFT when a real-life team wins a game.

dNFTs can also include user interaction-generated "hidden features." For example, the transfer function may be disabled after scanning a QR code, which is very useful for using NFTs as tickets.

Demonstration: dNFT Applications Are More Than ERC-20 and Static NFTs

Solv Protocol—dNFTs Applied in Financial Certificates

The Solv Protocol uses a dNFT version based on the ERC-3525 standard, known as semi-fungible tokens, allowing any user with specific issuance needs, whether a protocol looking to raise funds or an institution wanting to sell structured products, to flexibly configure and trade derivative products.

Solv has launched three products: Ownership Certificates, Convertible Certificates, and Bond Certificates. Ownership Certificates allow ERC-20 tokens to be locked in issued NFTs and owned by the holder. Convertible Certificates and Bond Certificates allow protocols to issue zero-coupon bonds with fixed yields or based on call options.

Using dNFTs to represent these assets has many advantages.

First, it brings a better developer experience. If using ERC-20 range tokens instead of dNFTs, deploying a new ERC-20 contract would be required for every parameter change. Meanwhile, a single NFT contract (collection) can contain many NFTs with different parameters (for different underlying assets and ranges). Unlike ERC-20 tokens, dNFTs with configurable parameters allow for no-code creation and deployment, significantly improving the developer experience.

Second, it creates a better experience for users. The SVG files of these dNFTs clearly convey all information about the positions and can be traded directly on all NFT markets. The SVG images are not static but are dynamically generated based on on-chain data and oracles, ensuring the authenticity of the displayed information. Additionally, like an account, ERC-3525 tokens can also receive, store, and send tokens. This allows each NFT in the collection to be subdivided—just like using ERC-20 tokens, enhancing asset liquidity.

Swell Network—dNFTs for Liquid Staking

Swell Network allows users to stake ETH through swNFT and receive swETH. While swETH is a liquid version of staked ETH, similar to Lido's stETH, swNFT contains the user's swETH, which can be used to enter the treasury to maximize returns from staked ETH.

Using both swETH and swNFT has many benefits. swNFT allows users to trade ETH-staked assets and expand treasury positions without closing treasury positions or unstaking ETH. For large positions in the treasury, it is better to purchase existing positions rather than open new ones, as all treasury positions compete for staking rewards. While swETH creates a price ratio difference between swETH and ETH, swNFT minimizes the price ratio difference between ETH and swNFT, reducing liquidity while keeping the market relatively stable.

dNFTs in Gaming

dNFTs can do much more than ERC-20 tokens or static NFTs, and we are starting to see some innovative approaches in gaming. To some extent, games are low-risk environments for developers to explore cutting-edge technologies. I really appreciate this quote:

"Games are leading indicators of emerging technologies because they are a technically demanding but relatively low-risk environment to explore scalability and usability issues early in the technology platform lifecycle: security and compliance issues in games are much smaller compared to 'strictly regulated' commercial or financial applications, and the iterative cycles are often faster. Therefore, while those less familiar with this area may find 'just' a bunch of gaming platforms boring, those with vision recognize it as a valuable testing ground. Many interaction patterns and habits stem from early mobile games like Doodle Jump, Cut the Rope, and Angry Birds?"

------Gubsheep, creator of Dark Forest, "The Strongest Crypto Game Paper"

Wolf Game

Wolf Game is an NFT game that became popular at the end of 2021. It implements dynamic NFTs that can steal parameters or tax other NFTs based on rules specified in smart contracts.

Pak Merge (Extinction Game)

Merge is an NFT/game project by the anonymous designer Pak. If these NFTs are in the same wallet, they automatically merge together. Two qualities merge into a larger quality. These changes are reflected in the visuals and metadata of the NFTs. Once merged, the qualities cannot be separated.

Existing Issues

Display of Metadata

In the early days of Uniswap v3 NFTs (May 2021), unfortunate events often occurred, such as someone selling a large number of LP positions at extremely low prices. This was because some people did not realize that these NFTs represented their liquidity assets. At the same time, this was also due to the current NFT market's metadata display being unsuitable for showing non-fungible financial positions and complex utility-based NFTs.

As we see more and more dNFT use cases in DeFi and gaming, the demand for metadata that can display features will significantly increase. However, different types of dNFTs require different metadata to be displayed, which often involves some calculations around the metadata and obtaining price-related data from oracles. Therefore, we may see market segmentation in NFT markets. This may also follow a similar path to e-commerce—a platform starts with a dominant single-category store and gradually expands to all categories due to customer network effects (liquidity in NFT markets).

Separation of Metadata and On-Chain Data

If Uniswap v3 LP positions are traded at prices x, y, and z, and the holder updates the price range multiple times based on market conditions, merely having timestamp data for x, y, and z is not enough—we need to know how x, y, and z prices map to the different ranges chosen by the holder (i.e., associating on-chain trading data with dynamic metadata to extract insights). Currently, there is no connection between on-chain data and dynamic metadata. Many analyses cannot be conducted as a result.


Other Examples of This Issue:

1/ We use dNFTs as characters in games that can be upgraded or downgraded based on activities in the game. Level information (Level 1 - Level 10) is stored on-chain and is continuously updated during NFT transactions. Without a dynamic metadata snapshot, it is impossible to obtain the average price for each level.

2/ Gym membership cards have x usage limits. Each time used, the metadata records usage by subtracting 1 from x. x is stored on-chain and is continuously updated with the usage of the membership card. To assess market interest fluctuations, we want to obtain the average price of membership cards with x remaining visits. Due to the lack of metadata snapshots for each change in x, it is impossible to associate transaction data with x.

Currently, dNFTs have limited trading in secondary markets, so the issue is less apparent. However, if NFTs become more complex and the dynamic metadata argument holds, this issue must be addressed. Therefore, we need to store metadata snapshots after each significant change and make metadata snapshots easy to query.

Security and Cost Trade-offs

From a security perspective, having dynamic metadata certainly brings more challenges. Since metadata defines the asset, protecting metadata is as important as protecting ownership. The most common issue is where to host the metadata. Hosting metadata on centralized servers is cheaper but prevents public access to the metadata. Hosting metadata on-chain can be expensive, as each significant change in metadata incurs gas fees. Additionally, all forms of descriptive attributes need to be stored on-chain (except for digital attributes), which can be costly.

Conclusion

1/ NFTs as data containers go far beyond ERC-721 type artworks and collectibles or ERC-20 tokens; their magic lies in complex and dynamic metadata.

2/ Many things in the financial system are non-fungible, and dNFTs can play a crucial role in the tokenization of these non-fungible assets and liabilities.

3/ We need tools that can better meet the market for complex metadata displays and support the analysis of metadata and on-chain trading data.

Special thanks to Kinjal Shah, Yuan Han Li, Spencer Bogart, Michael Blau from A16Z, Knowerofmarkets, 0xBoFan from Dragonfly, and Richard Chen from 1Confirmation for their valuable feedback.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators