Overview page background
What is a dynamic NFT (dNFT)?

What is a dynamic NFT (dNFT)?

Alchemy headshot

Written by Alchemy

Brady Werkheiser headshot

Reviewed by Brady Werkheiser

Published on 2022-08-115 min read

Non-fungible tokens (NFTs) have generated billions in sales for things like digital art, games, sports cards, music and more. When most people think of NFTs, they often think of a static image, video or multimedia asset.

But, dynamic NFTs (dNFTs) are growing in prominence. In this post, we will describe what dynamic NFTs are, as well as actual and potential dNFT use cases, and how those desiring to build dNFTs can use oracles to access trust-minimized off-chain data and computation. 

What is a dynamic NFT?

A dynamic NFT is a non-fungible token that can change based on certain circumstances. Due to their ability to adapt and change in response to external events and data, dNFTs are expanding the design space that NFTs can handle.

At the moment, the most common use of NFTs is in digital art where an artist creates a token that represents a digital work of art, such as a 1-of-1 NFT, and a collector can buy this token to prove ownership. When new NFTs are made, the tokenIDs don't change.

Remember that you don't have to give any information about an NFT, like its description, picture, or other features. An NFT is, at its most basic, a movable token with a unique identifier called a tokenID.

This static NFT model helps digital artists all over the world in a number of ways. Before, digital artists couldn't stop or even track the illegal spread of their original works of art because there was no way to tell the difference between any two files. This meant that no single original file could be kept.

For the first time in the history of the Internet, creators can sell digital art to their fans if they can prove ownership. Fans can also prove ownership of an original piece of art, even if the picture underneath it is copied.

Static NFTs are now used in most generative NFT art projects, play-to-earn games, and digital collectibles. In addition to these use cases, they offer a unique value proposition for the digitization of real-world assets like real estate papers, patents, and other unique identifiers.

But this strategy is limited by the fact that static NFTs can't be changed once they are put on a blockchain and their metadata can't be changed. Some examples of why someone would want an NFT that requires data updates include: 

  • Tokenizing real-world assets

  • Making video games that progress

  • Building fantasy sports leagues on the blockchain

  • And much, much more.

Dynamic NFTs let NFTs keep their unique IDs while also getting updated information.

A dynamic NFT is one that can change in response to something outside of it. Change in a dNFT usually means that a smart contract has changed the metadata. This is possible because the NFT smart contract has automatic updates that tell the underlying NFT when and how its information should change.

How does a dynamic NFT (dNFT) work?

The enabling technology is smart contracts, which allow the growth of dynamic NFTs by letting them use both off-chain and on-chain calculations. When a user asks for an NFT, smart contracts look at both off-chain and on-chain data to decide what to tell the user.

  1. First, an NFT request is sent to a smart contract

  2. The smart contract looks for information on the blockchain

  3. The contract asks an oracle for information that is not on the blockchain

  4. The smart contract then sends back one or two pieces of media

This means that smart contracts make it possible for NFTs to be changed over time. So, smart contracts use both off-chain and on-chain data to figure out if a non-fungible token should change and, if it should, update the metadata of a dynamic NFT.

How are oracles used in Dynamic NFTs?

Aside from metadata updates, dynamic features can occur. For example, dynamic NFTs can be made when certain things happen, like when a hidden location in an augmented reality app is found. 

In addition to information, dNFTs may have "hidden features" that become clear when the user interacts with them. Tokens like NFTs that are completely unique and can be set up in different ways can be programmed in an endless number of ways.

Most dNFTs, though, must include some kind of metadata change so that users who aren't tech-savvy can "see" the changes. A part of dNFT design that is often overlooked is how to get the data and features needed to make a secure, fair, and automated dNFT process.

External variables, both on and off the chain, can change dNFT metadata in more than one way. Blockchains, on the other hand, can't access or process data that isn't part of the chain.

Oracles gets around these problems by offering a variety of off-chain data and computing services that can be used to trigger dNFT upgrades. Oracles act as a bridge between the two worlds. It makes it possible to make dNFT processes that are automated, decentralized, and even “fun” as the dNFT ecosystem grows and NFTs become more connected to the real world.

How to Create a Dynamic NFT (Tutorial)

Before you start making your own dynamic NFTs, choose your item, its variables, and which chain you want to use.

For example, you may want to choose an Ethereum NFT that changes pictures based on the price of ETH. When the price of ETH is going up, the NFT image is a bull, and when the price of ETH is going down, the NFT image is a bear.

Once you have your plan, it's time to set up your developer environment.

Tools for Creating a dNFT

To get started, make sure you have the required tools:  

Once you're environment are setup, here are the basic steps to building a dNFT with Alchemy.

Steps to Create a Dynamic NFT

This is a brief outline of Alchemy's dynamic NFT tutorial that changes it's design based on market prices.

  1. Set up the ERC721 token 

  2. Upload the NFT image links in the IPFS URIs 

  3. Complete a compile check

  4. Make the NFT contract “Keepers Compatible” 

  5. Have the smart contract interact with Chainlink Price feeds that will change the NFT based on your defined variables (in this case, market prices). 

  6. Test your dNFT to see if it is dynamically updating as expected. 

  7. Mint and deploy your dNFT!

This is a simplified version of how to create a dNFT. For the full version, read our step-by-step guide.

LaMelo Ball is a professional basketball player who has released eight different LaMelo Ball NFTs. Each one of his dNFTs keeps track of a different set of his stats, such as rebounds, assists, and points scored, and changes based on his game statistics.

For example, if he gets 10 assists in a game, the NFT could change to a different background color. Based on how well LaMelo keeps doing, dynamic NFT holders can get into unique raffles and get other NFT-only benefits.

One of these eight NFTs, the Gold Change NFT, came with a condition: if LaMelo Ball won Rookie of the Year for the 2021 NBA season, the NFT would be changed. After LaMelo won, the NFT changed into a different image entirely.

Another example is Regenerative Resources (RRC), which is an ecosystem services company whose goal is to turn land that has been damaged into marine environments that can make money.

RRC announced the release of five Short Film NFTs made by well-known artists. The money made from the sales will be used to plant and grow 100 million mangroves through RRC's existing projects. The first thing in each Short Film NFT will be one frame. When an NFT is bought or sold, the short film is shown frame by frame until the NFT holder can see the whole thing.

Overview cards background graphic
Section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key