<p>They will also have to come up with the same keyHash to have the same policy ID, and that is virtually impossible.</p>

CC BY-SA 4.0
2022-02-21T11:09:04.690Z
2022-02-21T11:09:04.690Z
George - APEX Stake Pool
<p>Let's suppose I am starting an NFT project, and I choose to use a time-lock based policy script.  For example, the policy is enabled until some slot in the future.</p>
<p>E.g, here's the Hosky Cash Grab NFT script, which is open until slot <code>112500819</code>.</p>
<pre><code>{
  &quot;type&quot;: &quot;all&quot;,
  &quot;scripts&quot;: [
    {
      &quot;keyHash&quot;: &quot;4d04380dcb9fbad5aff8e2f4e19394ef4e5e11b37932838f01984a12&quot;,
      &quot;type&quot;: &quot;sig&quot;
    },
    {
      &quot;slot&quot;: 112500819,
      &quot;type&quot;: &quot;before&quot;
    }
  ]
}
</code></pre>
<p>When you calculate the Blake2B hash of the policy script serialized to bytes, you get a policy ID, e.g. <code>a5bb0e5bb275a573d744a021f9b3bff73595468e002755b447e01559</code>.</p>
<p>If another project happens to choose the same slot for their required-time-before policy and generates the same script or they simply choose to use the same script, won't they also have the same policy ID? This seems like a bad outcome, since I assume that querying the NFT assets minted under the policy ID could potentially show NFTs from another project.  Am I correct about this?</p>
<p>As a related question, I understand that projects may register a policy ID for their project in a github repo <a href="https://github.com/Cardano-NFTs/policyIDs" rel="nofollow noreferrer">Cardano-NFTs/policyIDs</a>.  What protection or value does registering offer?</p>

<plutus><plutus-pioneer-program><nft>
Ensure a unique policy ID for a "time before" type minting policy
# Ensure a unique policy ID for a "time before" type minting policy

(Asked by: username_0 on 2022-02-20)

Let's suppose I am starting an NFT project, and I choose to use a time-lock based policy script.  For example, the policy is enabled until some slot in the future.
E.g, here's the Hosky Cash Grab NFT script, which is open until slot 112500819.
{
  "type": "all",
  "scripts": [
    {
      "keyHash": "4d04380dcb9fbad5aff8e2f4e19394ef4e5e11b37932838f01984a12",
      "type": "sig"
    },
    {
      "slot": 112500819,
      "type": "before"
    }
  ]
}

When you calculate the Blake2B hash of the policy script serialized to bytes, you get a policy ID, e.g. a5bb0e5bb275a573d744a021f9b3bff73595468e002755b447e01559.
If another project happens to choose the same slot for their required-time-before policy and generates the same script or they simply choose to use the same script, won't they also have the same policy ID? This seems like a bad outcome, since I assume that querying the NFT assets minted under the policy ID could potentially show NFTs from another project.  Am I correct about this?
As a related question, I understand that projects may register a policy ID for their project in a github repo Cardano-NFTs/policyIDs.  What protection or value does registering offer?

**Tags:** plutus, plutus-pioneer-program, nft

---

## 1 answers

### Answer by username_1 on 2022-02-21. Score: 1 | Accepted answer

They will also have to come up with the same keyHash to have the same policy ID, and that is virtually impossible.


---

