Minting Native Tokens on Cardano

Cardano launched the support of Native Token on 1 Mar, 21. This is a major milestone of Cardano’s development roadmap. From now on, we can issue our own Cardano tokens and use them for whatever innovation services we can build. In the following paragraphs, I am going to share my experience of minting Cardano native tokens as well as some of my suggestions for improvement.

What is Native Token?

Native Tokens are assets that everybody can issue on public blockchain. The use cases are endless. For example, they can be used for ICO (Initial Coin Offering). We can list the coins (tokens) on crypto exchanges for public trading, raising money to fund our projects. We can also build services which can be enjoyed by users holding the right tokens only. (e.g. theta token).

Currently, most of the tokens are issued on top of the Ethereum blockchain platform. Some more use cases can be found here.

How to Mint Native Token?

For now, Cardano native tokens can only be minted by command lines. This can be performed on a machine (e.g. with Ubuntu Linux as OS) running as a Cardano node with “cardano-cli” tools installed.

I am not going to write down all the commands here. Details can be found on Cardano official website. Instead, I will explain the meanings behind each step.

Step 1: Generate a verification key and a signing key

  • This is the very 1st step to generate the keys in order to generate a payment address in the next step.

Step 2: Generate the payment address

  • The payment address is used to fund the transaction for token generation and to hold the tokens after they are generated.

Step 3: Fund the address

  • Token generation needs transaction fee. So, the payment address need to be funded with Ada before proceeding to the next step.

Step 4: Create a policy

  • For Cardano blockchain, asset controllers can set policies for token mining such as the need for specific token issuers to agree to mint new tokens, or to forbid minting tokens after a certain slot. Details can be found here.

Step 5: Mint the new asset

  • Based on the policy defined, we use the policy script generated in Step 4 to create the policy ID.

Step 6: build the raw transaction

  • This step is to generate the raw data by specifying the token policy and number of new tokens to be minted.

Step 7: Calculate The Minimum Fee

  • With the temporary raw transaction available, we can calculate the minimum transaction fee based on the size of the data.

Step 8: Build The Transaction Again

  • With the minimum transaction fee calculated, we can build the final raw transaction data.

Step 9: Sign The Transaction

  • before sending the transaction to the Cardano platform, we have to sign the transaction using:

a.) Payment Key generated in step 1

b.) Policy Key generated in step 4

c.) Policy Script generated in step 4

Step 10: Submit The Transaction

  • Finally we can send the signed transaction to the blockchain. If successful, there will be no response. Otherwise, it will come back with an error that can be used for debug.

Step 11: Submit Metadata (Optional)

  • The metadata of the token can be shown on the wallet. This can be done by submitting metadata on Cardano server. The spec of the Cardano Metadata Transmitter can be found here and submission to Cardano metadata server here.

For now, native tokens can be shown on Daedalus Wallet 4.0.4 or above.

Daedalus Wallet

Advantages over Ethereum ERC20

Cardano native tokens are similar to tokens (usually follow ERC20 standard) issued on Ethereum. But, the main difference is that no smart contract is needed for Cardano to issue tokens. This is a great improvement since this saves us time and errors (which are extremely costly) from writing our own smart contracts. Considering that Ethereum smart contracts are written in Solidity which is not a common programming language, this saves us the headache of finding the right programmers in the IT market as well.

Another great advantage is the cost of minting tokens. For Ethereum, it is directly proportional to the price of Eth. With the surge of Eth price (> US$2,000 at the time or writing) , cost can be as high as > US$65. But for Cardano, it’s just < US$0.2 (only 1/300!!!). Also, since Cardano transaction cost is calculated using the following formula:

a * size(tx) + b

where:

  • a & b are protocol parameters

the cost can remain low even if price of Ada surges by adjusting the a & b protocol parameters (through Cardano’s voting mechanism — DAO)

You can take a look of the following transactions. One showing the transaction fee for minting 1b native tokens on Cardano while the other is deploying a smart contract for ERC20 on Ethereum.

Tx fee for Cardano
Tx fee for Ethereum

Limitations

As can see from the above, the creation of Cardano native tokens can be done only by command lines for now. It’s quite a long procedure that is error prone. I think this part has plenty of room to improve. For example, a friendly UI can be developed so that users only need to type in the necessary information (e.g. token name, total supply,..), then the minimal transaction fee can be calculated automatically and then send the final transaction to the Cardano platform after validation.

On the other hand, Cardano blockchain is not supporting metadata for native tokens now. We can only upload the metadata to a server run by Cardano (not de-centralized) separately after the tokens are created. I think this can be improved by allowing user to specify metadata during token creation. In this way, we can save the extra step and the metadata of the token can be stored on the blockchain natively.

Conclusion

The creation of native tokens on Cardano is quite straightforward. If the procedure can be improved as suggested above, it will be more appealing. Even users who are not tech savvy can issue their own tokens. The low transaction fee is the killer feature that will make users migrate their existing tokens from platforms like Ethereum to Cardano.

If the development plan goes as scheduled, smart contract will be available on the Mainnet in August, 21. By that time, Cardano will nearly have full functionalities including the support of NFT (Non-Fungible Token). Expect Cardano will take off then. Can’t wait to see that happen!!!

References

Owner of IT companies. Blockchain/Crypto enthusiast. Interested in Cardano, Chainlink, Ethereum, Hyperledger,……

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store