CIP-68 Standard Reference

Detailed technical reference for the CIP-68 standard including token relationships, lifecycle workflows, datum structure, and implementation specifications for developers.

This page provides detailed technical information about the CIP-68 standard for developers implementing CIP-68 tokens.

Token Relationship Overview

CIP-68 Dual-Token Model

CIP-68 uses a dual-token system where each NFT consists of two linked tokens:

  • 🏷️ Reference Token (label 100): Contains the metadata and lives at a script address. This is the "data storage" token that can be updated by the creator.

  • 🎨 User Token (label 222): The actual NFT that users own and trade. This token inherits its metadata from the Reference Token.

Both tokens share the same Policy ID and base asset name, but have different label prefixes. When dApps need to display an NFT, they:

  1. Find the User Token (222) in the user's wallet

  2. Derive the Reference Token name by converting (222)Name → (100)Name

  3. Query the blockchain for the Reference Token to get current metadata

  4. Display the NFT with the inherited metadata

Token Lifecycle Workflow

spinner

Datum Structure

CIP-68 tokens use a standardized datum structure: [metadata, version, extra]

  • metadata: CIP-25 compatible metadata (name, image, description, etc.)

  • version: Integer version field indicating supported token standards:

    • Version 1: NFTs (222) and Fungible Tokens (333)

    • Version 2: Rich Fungible Tokens (444) - fractionalized NFTs

    • Version 3: Reserved for future token standards

  • extra: Optional custom Plutus data for application-specific use

The version field enables different token types and maintains backward compatibility. Higher versions support all features from lower versions.

circle-check

Token Labels (CIP-67 Encoding)

CIP-68 uses labels to identify token purposes:

Token Type
Label
Hex Prefix
Purpose

Reference Token

100

000643b0

Holds metadata, locked at script address

User Token

222

000de140

Actual NFT in user's wallet

circle-info

Anvil Handles Label Encoding Automatically

Anvil automatically handles CIP-68 label encoding when you specify the label field:

  • label: 100 → Anvil prefixes with 000643b0 (Reference Token)

  • label: 222 → Anvil prefixes with 000de140 (User Token)

  • format: "utf8" → Anvil converts the name to hex automatically

  • format: "hex" → Anvil uses the name as-is (already hex encoded)

This ensures proper CIP-68 compliance without manual hex encoding.

Supported URI Schemes for Metadata

Per the official CIP-68 specificationarrow-up-right, these URI schemes are supported for metadata images and files:

Best Practices

  • Use IPFS for decentralized, content-addressed storage

  • Use Arweave for permanent, immutable storage

  • Use HTTPS only for trusted, long-term available sources

  • Use data URLs sparingly due to transaction size limits

Transaction Payload Structure

Here's the basic structure for minting CIP-68 tokens with Anvil:

References

Last updated

Was this helpful?