NFTs are being minted in Cardano even without a smart contract in place. How does it ensure that no more token gets minted with the same ID?
-
1Useful document on the minting can be found here docs.cardano.org/en/latest/native-tokens/…– GerMCommented May 11, 2021 at 16:39
-
1Please mark one of the answers as accepted or give feedback as to why they are not. Your fellow SE members have put in time and effort to supply answers to your question.– gRebelCommented Jan 14, 2022 at 7:26
-
@GerM link broken: docs.cardano.org/native-tokens– LeeCommented Jun 22, 2022 at 10:11
2 Answers
On Cardano, an NFT doesn't require a Smart Contact, as it is minted as a native asset.
To make sure a NFT is a really non-fungible, the minter of the native asset is usually locking its minting policy in time. In other words, you mint just one native asset and lock any further minting/burning in time, so it is impossible to increase its supply starting from a specific slot time.
As an example, have a look at the minting script of nutcoin.
Lecture 5 in the Plutus Pioneer Program talks about different ways NFTs can be implemented.
A naive way to implement NFTs is by looking at the forge field of a transaction and check that the amount is set to 1. That in itself allows for the minting of just one token - per transaction. Now you can combine that with deadlines in the policy script by allowing the minting of the token until the deadline has passed. This is the way NFTs have been implemented since Mary on Cardano. With the policy in place, and the deadline passed, you can then check a blockchain explorer, that there is only one token minted for that policy.
With Plutus things are much more straightforward of course, but in terms of minting NFTs w/o smart contracts (Mary) that's essential how it's done.