# Token Mechanics / Standards

On DPub, a creator will create an NFT, mint the NFT, set it for sale, then add it to a story. Once in a story, the NFT can be seen by your customers and community.&#x20;

A DPub token has 3 components

* Hedera Token
* Metadata
* NFT with serial number

On Hedera, an NFT consists of two mechanisms. A token and a serial number.

## Hedera Token

The Token uses Hedera Token Service to create a Token ID on the Hedera network.

An example token can be found here as represented on the Hedera Mirrornode.

{% embed url="<https://mainnet-public.mirrornode.hedera.com/api/v1/tokens/0.0.705838>" %}

DPub uses the following standards to create your token.

* Admin Key = null --> this means the token is immutable and can not be changed
* Supply Key = YOUR PUBLIC KEY --> we set the supply key to your public key so that you can mint on or off the DPub platform as you wish.
* Max Supply --> the max number of NFTs you will be issuing. If you have a 1/1 - then this will be set to 1. If this is one of many, then you can set how many total you will be minting. The max supply must be set to something greater than zero.&#x20;
* Royalty --> a percentage that you will be paid everytime the NFT is sold (optional)
* Fallback --> the number of HBAR you will paid if there is no sale involving HBAR. If Royalty is greater than zero, you must set a fallback fee.

## Metadata

Hedera stores the base information about the token (like the information above), but does not store information about the specifics of your NFT like the name, creator, description, and image.

In order to express the specifics, each NFT on Hedera is also assigned a link to an accompanying metadata file which is saved on a blockchain designed for storing files called the [Interplanetary File System](https://ipfs.io) (IPFS).

In Hedera, the metadata link is stored on the NFT serial number in the metadata field. To see an example of how this looks on Hedera, check out this Mirrornode link.&#x20;

{% embed url="<https://mainnet-public.mirrornode.hedera.com/api/v1/tokens/0.0.705838/nfts>" %}

On Hedera, the metadata link to IPFS in the above example is stored as encoded Base64 code. For example,

```
"metadata":"aXBmczovL1FtZkg2VEZMc28yZ1FxOXB4WjcyMzFodXY2cHpIQUtEc2hVOWNqOUdVMXM4OFg="
```

Decoded, this is a direct IPFS link to the metadata: ipfs\://QmfH6TFLso2gQq9pxZ7231huv6pzHAKDshU9cj9GU1s88X

Using our IPFS gateway, this same link can be seen here:

{% embed url="<https://dpub.mypinata.cloud/ipfs/QmfH6TFLso2gQq9pxZ7231huv6pzHAKDshU9cj9GU1s88X>" %}

As you can see in the example, a very simple metadata structure of name, description, creator, and image.&#x20;

Currently, our metadata is simple and follows the cross-chain schema for OpenSea. That [documentation can be found here.](https://docs.opensea.io/docs/metadata-standards)

In the near future, we will be adding additional capabilities for Properties, Files, and Attributes as they adhere to the OpenSea standards.

Metadata is stored on IPFS using our custom gateway. To get more information on our gateway:

{% content-ref url="../../../metadata-and-ipfs/ipfs-gateway" %}
[ipfs-gateway](https://docs.dpub.xyz/metadata-and-ipfs/ipfs-gateway)
{% endcontent-ref %}

Currently, our metadata is simple and follows the cross-chain schema for OpenSea. That [documentation can be found here.](https://docs.opensea.io/docs/metadata-standards)

## NFT with Serial Number

While the token has much of the general setup and financial setup, the NFT serial number is what is actually sold and traded.

An NFT is made up of a serial number + token id.&#x20;

On Hedera, an NFT  looks like this: 1\@0.0.705838. Serial number 1 is what you will sell to a buyer. The serial number contains the metadata (name, description, creator name, properties and image/video)

A one of one NFT will have a token with a max supply of 1, and a single serial number <1@0.0.xxxxxx>.

A one of many NFT will have a token with a max supply that you determine. Each serial number up to that max supply will be the same. This enables you to sell one unique NFT many times (quantity of X).

For example, 0.0.705838 has 10 identical NFTs each with the same metadata. This means that this NFT is a one of many, meaning it is one unique NFT that has a quantity of 10 that can be sold or traded.

## Supported Media

DPub supports the following media types:

* Image (PNG, JPG, GIF)
* Animated GIFs
* Video (MP4)
* 3D (GLB)
