Metadata Standard for fungible Tokens

Other than the already familiar 721 Metadata Standard we know from CIP-0025, Fungible Tokens have an additional 20 Metadata standard

If you want to create Fungible Tokens that can be also registered in the Cardano Token Registry, you need to edit the regular 721 Metadata format. You can follow the official Entry in the Cardano Developer Portal about the Token registration, but we want to give you some details about that below.

Fungible Token with 721 + 20 Metadata Standard

The following is an example of the metadata of the NMKR Fungible Token. You can basically copy and paste this metadata section to the metadata override of your token after replacing all specific values with the ones related to your token as explained below.

{
  "20": {
    "0ac3ec8f23038027af5aae08715b2da79f56cbde2b48e5d5da9d8aae": {
      "4E4D4B52": {
        "ticker": "NMKR",
        "name": "NMKR",
        "desc": "The official NFT-MAKER Token.",
        "description": "The official NFT-MAKER Token.",
        "icon": "ipfs://QmaQMH7ybS9KmdYQpa4FMtAhwJH5cNaacpg4fTwhfPvcwj",
        "image": "ipfs://QmaQMH7ybS9KmdYQpa4FMtAhwJH5cNaacpg4fTwhfPvcwj",
        "mediaType": "image/png",
        "decimals": "6",
        "website": "https://NFT-MAKER.IO",
        "whitepaper": "https://NFT-MAKER.IO/WHITEPAPER",
        "token site": "https://NFT-MAKER.IO/TOKEN",
        "files": [
          {
            "name": "NMKR",
            "mediaType": "image/svg+xml",
            "src": "ipfs://Qmam38EhoMs1Xiiw5j2psFYeQq7SqqF3myKesLU4LDWr2N"
          },
          {
            "name": "icon-1000",
            "mediaType": "image/webp",
            "src": "ipfs://QmUbvavFxGSSEo3ipQf7rjrELDvXHDshWkHZSpV8CVdSE5"
          },
          {
            "name": "icon-1000",
            "mediaType": "image/png",
            "src": "ipfs://QmaQMH7ybS9KmdYQpa4FMtAhwJH5cNaacpg4fTwhfPvcwj"
          },
          {
            "name": "icon-1000",
            "mediaType": "image/gif",
            "src": "ipfs://QmXjKJ42vSHQTF3AJi1EU6813EvpAK3F2WWCZJBpdM5H82"
          },
          {
            "name": "icon-1000",
            "mediaType": "image/jpg",
            "src": "ipfs://QmasfyhtHXunvSLq6ifdJsVjc7oCFsPnByrhLc5i9cRRk9"
          }
        ]
      }
    },
    "version": "1.0"
  },
  "721": {
    "0ac3ec8f23038027af5aae08715b2da79f56cbde2b48e5d5da9d8aae": {
      "NMKR": {
        "name": "NMKR",
        "ticker": "NMKR",
        "image": "ipfs://QmaQMH7ybS9KmdYQpa4FMtAhwJH5cNaacpg4fTwhfPvcwj",
        "mediaType": "image/png",
        "description": "The official NFT-MAKER Token.",
        "website": "https://NFT-MAKER.IO",
        "whitepaper": "https://NFT-MAKER.IO/WHITEPAPER",
        "token site": "https://NFT-MAKER.IO/TOKEN",
        "files": [
          {
            "name": "NMKR",
            "mediaType": "image/svg+xml",
            "src": "ipfs://Qmam38EhoMs1Xiiw5j2psFYeQq7SqqF3myKesLU4LDWr2N"
          }
        ]
      }
    },
    "version": "1.0"
  }
}

The first thing you might notice is that there are two JSON objects at the top level, these are denoted by the 721 and 20 labels and these relate directly to the respective metadata standards. You might recognise the 721 metadata standard from that which is used for NFTs. The 20 metadata standard is used specifically for FTs.

3rd party applications/websites essentially look for these standards and use them to automatically search for, identify and display the information regarding the tokens.

Note that you will see some information repeated in here, that is to ensure we provide the data in such a way that as many 3rd party applications/websites support our metadata.

Note - his is particularly important at the moment as at the time of writing, the CIP for the 20 standard has not yet merged.

721 in-depth

Let's cover the more familiar part first:

  • Line 3 is the policy ID of the token

  • Line 4 is the name of the token

  • Lines 5, 6 and 7 are used to store the URL of the publisher's website

  • Lines 8, 9 and 10 are the usual information relating to the media

20 in-depth

This is where it gets more specific to fungible tokens, more interesting parts are shown in bold:

  • Line 15 is policy ID of the token (same as line 3)

  • Line 16 is the name of the token but given in HEX format

    • You can use an ASCII to Hex converter to do this

    • 4558414D504C45 = EXAMPLE in Hex

  • Lines 17 is the ticker for the token

    • This is used as a short-form of the token name

    • It is convention to keep this to 4 characters or less

  • Line 18 is used to store the URL of the publisher's website

  • Line 19 provides an opportunity to give a description of the token

  • Lines 20, 21 and 22 again are used to provide a link to where the token image is stored, these are repeated due to this being (at the time of writing) non-standardised

    • Including all 3 options means that most 3rd party applications/websites will be able to locate this attribute correctly.

  • Line 23 is the Decimals, lets talk more about this:

Decimals

As you may know Lovelace is the actual native currency on Cardano and not ADA, the reason is, that 1 ADA is defined as 1,000,000 Lovelace. If you send someone one ADA, you are actually sending him one million Lovelace.

Because of this, when we mint a fungible token, we want to also specify the number of decimals that our token will have.

The reason for this is that it gives you the opportunity to define how granular you want your token to be. If you think about the Dollar, this would have 2 Decimals and can only be as granular as 1 Cent (0.01 Dollars).

Let's say we want to mint 25 Million EXAMPLE token:

  • 25,000,000 EXAMPLE token

  • With 6 Decimals

  • Means we need to mint 25 Trillion

  • 25 Trillion = 25,000,000,000,000 tokens

  • Note, we have 6 more zeros, for each of the decimals

All applications/websites will then know to display the amount of EXAMPLE token held as the amount divided by 1 Million (6 zeros).

Last updated