IN THIS LESSON

Want your NFTs to evolve, interact with smart contracts, or have programmable features? CIP 68 enables more dynamic and secure representation of your NFTs, opening up new possibilities for on-chain interactions and customizable asset logic.

CIP 68, the Datum Metadata Standard, introduces a significant upgrade to how token metadata is handled on Cardano. By storing metadata within datums on the blockchain, this standard allows for more flexible, programmable, secure, and dynamic asset representation compared to CIP 25.

Unlike CIP 25, which primarily focuses on NFT metadata, CIP 68 utilizes output datums - a feature of the extended UTXO model - allowing metadata to be an integral part of the output that holds the asset. This serves not only NFTs but also fungible tokens (FTs), presenting a more versatile standard that can adapt to various use cases.

CIP 68 introduces the concept of a 'reference NFT' locked in a script alongside a 'user token.' The 'user token' can be an NFT, FT, or any asset representing value. Metadata is located by finding the output where the 'reference NFT' is held. Asset issuers can decide the locking script's logic for the 'reference NFT.' This flexibility allows for immutable metadata or updatable metadata, depending on the use case.  Each asset name must be prefixed by a label, as defined by CIP 67, to identify the token's purpose, enhancing the recognition of token types and their functionalities. To ensure the metadata's integrity, CIP 68 specifies conditions that must be met, such as the 'user token' and 'reference NFT' being under the same policy ID, and the asset names of both tokens following a standard naming pattern with respective prefixes. This approach secures the link between the 'user token' and its metadata, safeguarding against metadata spoofing and promoting authenticity.

The standard supports different kinds of tokens right out of the box:

222: Standard NFTs (similar to CIP-25)

333: Fungible Tokens (representing quantities)

444: Rich Fungible Tokens (think fractionalized NFTs, blending NFT and FT concepts)

CIP 68 Key Points :

  • CIP 68 unlocks the potential to directly access an NFT's details from within Cardano smart contracts. This opens the door to all sorts of on-chain interactions.

  • CIP 68 breaks away from the old way of storing metadata directly within the NFT transaction.  Instead, it introduces two tokens:

    • Reference NFT: It acts as a locked container holding the metadata, securely linking it to the user token.

    • User Token: This is the "real" NFT that lives in someone's wallet. It's associated with the Reference NFT to fetch its metadata.

  • Each token has a special tag at the start of its name to identify its purpose.

  • The Reference NFT's lock contains a special "datum" – this is where the metadata lives. The datum also has a version number to manage updates.

  • Offers the capacity for metadata to be programmable, which was not possible with CIP 25.

  • Allows for updates or changes to metadata without being constrained by the limitations of the minting transaction. This is a major step forward for representing things that evolve, like game assets.

  • Makes NFT and asset details readily accessible for marketplaces, wallets, and other Cardano tools.

  • Provides a system for classifying tokens so wallets and third parties can easily recognize the type of token.

  • A clever design ensures NFT information is tamper-proof.