1

I am brainstorming on the architecture of a Cardano dApp that will be able to issue tickets as NFTs and can scale to around 1000 NFT tickets per second. From what I understand so far on UTXO, a minting transaction would need to consume a UTXO to produce the NFT and, since each block takes around 20 seconds, I would theoretically process 1 ticket every 20 seconds.

My understanding is that this issue is the much talked about concurrency issue sometime back. I have researched 'batching agents' but have not yet fully grasped the idea and if that's the solution.

Is batching the correct solution to this problem, and if so, what would the process flow look like to scale ticket issuance?

1
  • You can have unlimited UTxOs in an address, so you don't need to wait for the next block to create a new transaction. You can also create many chained transactions from a single UTxO in one block. You keep track of the outputs and use them in the next transactions, and submit the transactions in the order of creation to the same node. You won't be able to mint 1000 NFTs per second because there is not enough space in the blocks for the transactions. You can probably mint between 5 to 10 per second with the current network parameters, depending on the congestion. Jan 30 at 7:49

2 Answers 2

1

We need to understand first what is a NFT: It is a token that only exist ONCE. Can't be two tokens the same.

What we mean with two tokens the same? To understand that we need to know how a token is defined in Cardano.

It is defined by a Currency Symbol and a token name. Both together makes a token. To have two tokens the same we need to have same Currency Symbol AND same TokenName.

Following that we can see that we can have NFTs using the same Currency Symbol but different TokenNames.

What is a Currency Symbol? It is just the hash of the Minting Policy used to mint them.

How we assure that a Currency Symbol is unique? Using an UTXO to create a parameterized Minting Policy. The UTXO, that for his nature is unique, becomes hard coded in the Minting Policy, so when you get the hash of that parametrized Minting Policy, the Currency Symbol, is going to be related with that UTXO and is going to be unique. Same Minting Policy with different UTXO parameter will end up with a different hash and a different Currency Symbol.

UTxOs are unique, they exists only once in the blockchain and when they are consumed they disappear. Never will exist another UTxO equal to one that existed before.

So, you need a particular UTXO to have a particular Minting Policy.

You can create a Minting Policy that is going to run only once, if you check if that particular UTXO is used in the transaction.

Then you need to add extra validation to be sure that in this only time that is running it will mint only ONE token. If you let mint two or more tokens, they will not be NFTs anymore (if they share same TokenName)

But if you check in the Minting Policy that they are using different TokenNames, you also can mint several NFTs (1 unit of each of them) in the same transaction using the same UTXO.

You could potentially mint all 10.000 in the same transaction, with 10.000 different TokenNames, but you will end up with too many different assets in one or several outputs UTxOs and that could lead to some problems of transaction size. So your limit here wil be transaction size.

I never tried the limits here. Ill recommend you to use referencial scripts for the Minting Policy so you dont have to add the size of the script in this transaction and you have all the 16Kb to use in your big outtput with many NFTs.

0

Could you maybe mint 1000 units of the same NFT, then it becomes rather a token with metadata and an image?

When checking the ticket, you could have the app that is showing the ticket either sign it with their user wallet credentials or have the app send it to you in a transaction in which case you keep track of the wallet address that had that ticket

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.