Programmable NFTs: integrating executable code into NFTs

XP.NETWORK
XP.NETWORK
Published in
4 min readJan 21, 2024

--

In the emerging NFT 2.0 landscape, NFT code can go far beyond simple royalty settings. Programmable NFTs (pNFTs) can interact with dApps, evolve, self-reveal, and even self-destroy. We’ll go through the most interesting use cases and a few protocols that have already implemented pNFTs.

Programmable NFT definition and applications

A programmable NFT (pNFT) is an NFT whose code contains parts that are executed in response to specific outside triggers. Just like a smart contract responds to external calls in a deterministic “if-A-then-B” manner, a programmable NFT responds to an external event either by changing itself or by causing something to happen.

Instead of asking “what types of programmable NFTs are there?” or “what can a programmable NFT do?”, it’s better to ask what kind of executable code we can embed in an NFT and what sort of events we can produce.

The most basic example is enforceable royalties: whenever an NFT is sold in the secondary market, a percentage of the sale price is automatically sent to the original creator.

Other interesting tricks that programmable NFTs can do (at least in theory) include:

  • Change traits to rarer ones after a certain number of in-game transactions with an NFT. For example, if you’ve played your NFT character card 50 times in battle, it will go from Rare to Legendary, or perhaps the character’s weapon will change from the common sword to a rare fireball.
  • Run whole programs — even games, for example. Imagine that an NFT contains a basic racing or shooting game — like those games we used to play on early smartphones. (In the future we may be able to code more complex games into NFTs, but the resulting collectible should remain light enough so as not to clog the blockchain.)
  • Decentralized reveals: instead of the collection creators swapping up metadata from dummy pictures to individual images, programmable NFTs can reveal their image themselves at a predetermined time.
  • Self-destroy or “give birth” to another NFT. Imagine a game where you play with an NFT, and if you lose, it automatically gets burned (sent to an address from where it can never be retrieved). Or perhaps interacting with a game contract can trigger code for minting a new NFT to your address.
  • Interact with dApps and smart contracts: sure, we already have NFTs that can be staked for rewards, but this just means depositing an NFT into the contract like any other token. Imagine, however, that an NFT is used as a key to “unlock” a yield farming bonus — without it having to be deposited in the contract.
  • Interact with contracts selectively: you can program an NFT to only connect to certain dApps and blacklist others. This can be useful for security.
  • Combinations: for example, think of an NFT that contains an executable game and, in case you play and win, interacts with a dApp smart contract that pays you a reward.

Examples of programmable NFT projects

Metaplex on Solana

Metaplex is a collection of NFT tools on Solana — everything you need for minting, creating marketplaces, and so forth. Its programmable NFT (pNFT) standard was deployed on mainnet in January 2023 and is now supported by most marketplaces and protocols, such as Magic Eden, Phantom, Tensor, etc.

The main programmable feature is royalties enforcement, where creators can make it impossible to sell their NFTs on marketplaces that don’t enforce royalties.

pNFT creators can also add other protocols to an allow list or a deny list to determine which protocols can interact with their NFTs. You can also delegate various functions (mint, burn, transfer) to specific addresses.

Envelop

Envelop’s cross-chain protocol allows you to wrap an existing NFT into a new, programmable one. When wrapping, you can set rules like royalties and time-locks, and even add collateral in fungible tokens.

These programmable wrapped NFTs (wNFTs) have many use cases in DeFi, RWA, and so on. For example, a startup can wrap batches of its utility tokens into a single wNFT and sell them on a pre-sale. Or you can create an NFT out of yield farming tokens and sell the whole position on an NFT marketplace.

Hitch Interactive and the Immutable Miniverse Format

The team of Hitch, led by Dr. Allen Y. Yang, developed a way to embed images, music, games, and other content inside NFTs to form “miniverses”. The most interesting aspect of this new standard (called Immutable Miniverse Format, or IMF) is that you can encode ChatGPT-like chatbots into NFTs, together with all the data that is necessary for such a mini-LLM to function.

Users would be able to have conversations with AI that “lives” inside the NFT. Such decentralized programmable AI could be useful for keeping information private and at the same time processing it using the power of AI — sensitive technical designs, for example.

The first collection to use IMF, however, isn’t some high-tech utility NFT but rather Yummy Hamo — cartoon characters enjoying various delicacies.

Programmable NFTs are one of the most interesting sub-narratives in the NFT 2.0 space, and we’ll surely see more use cases emerge for this technology. XP.NETWORK will keep covering this topic in the blog — stay tuned for more articles!

--

--

A powerful NFT bridge connecting 20+ EVM and non-EVM blockchains. Go multichain effortlessly: attract fresh liquidity and audiences across all ecosystems