<p>You can add custom metadata to your NFT. The most used standard is <a href="https://github.com/cardano-foundation/CIPs/blob/8b1f2f0900d81d6233e9805442c2b42aa1779d2d/CIP-NFTMetadataStandard.md" rel="nofollow noreferrer">CIP-721</a>.</p>
<p>The metadata could look like this:</p>
<pre class="lang-json prettyprint-override"><code>{
  &quot;721&quot;: {
    &quot;&lt;policy_id&gt;&quot;: {
      &quot;&lt;asset_name&gt;&quot;: {
        &quot;name&quot;: &lt;string&gt;,
        &quot;image&quot;: &lt;uri | array&gt;,
        &quot;tier&quot;: 1 
      }
    }
  }
}
</code></pre>
<p>As you mentioned you could then use an API like <a href="https://blockfrost.io/" rel="nofollow noreferrer">blockfrost</a> or <a href="https://www.koios.rest/" rel="nofollow noreferrer">Koios</a> to get the metadata, check the <code>tier</code> property and do whatever you want with that information.</p>

CC BY-SA 4.0
2023-05-06T00:17:27.780Z
Brilliant! This seems like the perfect solution to go with.

I will take a look at the blockfrost docs and see the best way to do so. If you happen to know any open source code or a good pre-built tool for this that would be fantastic!

Thank you for the help!
Aidan
CC BY-SA 4.0
2023-05-05T07:52:50.367Z
2023-05-05T07:52:50.367Z
eddex
<p>You could build a Merkle tree of asset names for each tier and encode the root hash in the smart contract.
In the redeemer you give the correct intermediate hashes (public), compute the root hash and verify with the tier root hash.</p>

CC BY-SA 4.0
2023-05-06T00:16:25.217Z
Ok fantastic! I appreciate this advice.

I think we are staying away from smart contracts on this one and just using NMKR for the minting side of things.

Where the more code intensive side of things come into play will be around differentiating asset types and then rewarding.
Aidan
CC BY-SA 4.0
2023-05-06T08:42:59.880Z
Definitely easier to start without smart contracts and do this with a backend / multi-sig instead. Something like a merkle tree based solution could still be added later.
DaveStrider
CC BY-SA 4.0
2023-05-05T12:04:56.793Z
2023-05-05T12:04:56.793Z
DaveStrider
<p>For Example:</p>
<p>You have an NFT collection that has 5 different tiers all under the same policy ID (cip-25 metadata standard). You want to be able to provide on-chain benefits to holders of the NFT dependent on the tier they hold.</p>
<p>Because each tier shares the same policy ID what is the easiest way to categorize and reward the different tiers?</p>
<p>The solution that comes to my mind is having 1 piece of the NFTs metadata mention its tier, then using blockfrost to take a policy ID snapshot that sorts by tier name.</p>

<nft><minting><policy><rewards>
How to differentiate NFTs of the same policy id?
# How to differentiate NFTs of the same policy id?

(Asked by: username_0 on 2023-05-04)

For Example:

You have an NFT collection that has 5 different tiers all under the same policy ID (cip-25 metadata standard). You want to be able to provide on-chain benefits to holders of the NFT dependent on the tier they hold.

Because each tier shares the same policy ID what is the easiest way to categorize and reward the different tiers?

The solution that comes to my mind is having 1 piece of the NFTs metadata mention its tier, then using blockfrost to take a policy ID snapshot that sorts by tier name.

**Tags:** nft, minting, policy, rewards

---

## 2 answers

### Answer by username_1 on 2023-05-05. Score: 2

You can add custom metadata to your NFT. The most used standard is CIP-721.
The metadata could look like this:
{
  "721": {
    "": {
      "": {
        "name": ,
        "image": ,
        "tier": 1 
      }
    }
  }
}

As you mentioned you could then use an API like blockfrost or Koios to get the metadata, check the tier property and do whatever you want with that information.

> **Comments:**
> **username_0**: Brilliant! This seems like the perfect solution to go with.  I will take a look at the blockfrost docs and see the best way to do so. If you happen to know any open source code or a good pre-built tool for this that would be fantastic!  Thank you for the help!  

---

### Answer by username_2 on 2023-05-05. Score: 0

You could build a Merkle tree of asset names for each tier and encode the root hash in the smart contract.
In the redeemer you give the correct intermediate hashes (public), compute the root hash and verify with the tier root hash.

> **Comments:**
> **username_0**: Ok fantastic! I appreciate this advice.  I think we are staying away from smart contracts on this one and just using NMKR for the minting side of things.  Where the more code intensive side of things come into play will be around differentiating asset types and then rewarding.  
> **username_2**: Definitely easier to start without smart contracts and do this with a backend / multi-sig instead. Something like a merkle tree based solution could still be added later.  

---

