In this blog we are talking about Native Tokens and we are showing some screenshots of some native tokens we created on Launchpad/Mary. The functionality of native tokens will be added to the Cardano blockchain as part of the Mary hardfork combinator event.

A hardfork combinator event is an update of the blockchain protocol to adopt to new properties and features developed. With most blockchains this is a very painful and traumatic process since the whole ledger needs to be rebuild by node operators, this can takes days and success is not always guaranteed which means you have to start the whole process over again. In case of delivery deadlines in a production environment this is killing. In case of Cardano this is a very smooth process since it requires only an update of the node software and the ledger adopts automatically the new properties and features and still supports all the previous properties and features of all the previous protocol versions.

Native Tokens

Native tokens are used to represent any object of value that is stored on the ledger. An object can be anything, a representation of a digital currency, a role, a right, a credential, an identity, goods etc.

Native tokens it is the name of Cardano’s multi-asset support (the ledger supports tracking transfer and ownership of different types of assets). Native tokens enable users to transact with ADA (the digital currency of the Cardano blockchain) an unlimited number of user-defined (custom) tokens natively.

A token is the on-chain representation of an asset (see paragraph Asset) and its basic accounting unit.

Native tokes are supported by the Cardano accounting ledger without the need for additional smart contracts, as the ledger features built-in supports tracking and transfer of ownership of more than one type of asset. With other words native tokens are a first class citizens on the Cardano ledger.

Ethereum instead has no support for first class citizens, instead developers need to create smart contracts for the token lifecycle (mint, issue, using, redeeming and burning). This adds extra complexity, possibility for introduction of errors and security risks related to assets of value. Since this is not a wished situation the Cardano ledger handles all native token related functionality known as the token lifecycle to avoid these problems.

Native tokens extends the UTxO accounting ledger model (known from Bitcoin) for processing ADA only transactions also known as eUTxO to accommodate transactions using a range of assets.

Token types:

  • Fungible tokens (FT), assets that are exchangeable, examples of fungible assets are commodities, common shares, options and the dollar
  • Non-fungible tokens (NFT), assets that are non-exchangeable, examples of non-fungible assets are real-estate, intellectual property for example legal copies of films, music in the media industry, cyrpto kitties, sport collectibles, domain names, identification, luxury goods (supply chain)

General benefits digital assets (FTs and NFTs):

  • They can be tracked on the blockchain, providing an immutable history of assets
  • Allow for peer-to-peer, secure trading and trust without need for intermediates
  • They can be sold and traded/exchanged back into Fiat

Benefits of digital assets (NFTs):

  • They enable the creation of rare & unique assets that can’t be destroyed, replicated, or forged
  • They cannot deteriorate over time. So when utilized in applications such as digital collectibles they do not deteriorate like their physical counterpart

Asset

An asset or any object of value can be represented by a native token. Assets include ADA and a variety of user-defined custom token types.

On the Cardano blockchain an asset can refer to either:

  1. The identity of a class of objects, for example: ADA, A4PEU, SHITCOIN
  2. A particular amount of a specific object, for example: 10 Lovelace, 10 A4PEU, 10M SHITCOIN

An asset in Cardano is represented by a uniquely identifiable asset ID, which is a pair of both policy ID and Asset name. (The ADA digital currency can act as an asset but as such is not represented using
an explicit policy ID). Assets with the same asset ID have the property of being fungible and as such they can be exchanged with each other. An asset ID is a unique identifier for a collection of fungible tokens. The same asset names can be used under different policies which makes them non-fungible, they cannot be exchanged with each other.

Currency is a medium of exchange for goods and services that commonly refers to a payment unit. Both ADA (the native currency of the Cardano blockchain) and native tokens hold value and act as a payment and transaction unit. On the Cardano blockchain only ADA is used for payment of fees and rewards.

Minting (Creation of a native token)

In below example we made use of the https://github/gitmachtl scripts provided by Martin of ATADA to create the A4PEU native token.

In order to create this token we followed the following steps:

  1. Install the Launchpad node
  2. Create a payment address ./02_genPaymentAddrOnly.sh <PaymentAdd=ADA4Profit_payment>
  3. Retrieve ADA test tokens for Launchpad/Mary on the create payment address (communicate the above generated address to the chatbot)
  4. Create a policy for the asset name (native token) ./10_genPolicy.sh <PolicyName=ADA4ProfitPolicyID>
  5. Mint the asset name (native token) ./11a_mintAsset.sh <AssetName=A4PEUJUNO> <AssetAmount=55000000> <PolicyName=ADA4ProfitPolicyID> <PaymentAdd=ADA4Profit_payment>

Result:

The PolicyID above is the representation of the PolicyName ADA4ProfitPolicyID and the Name the representation of the asset.

Next step:

  1. We created a new Policy for the native asset with the PolicyName ada4profitdotcom ./10_genPolicy.sh <PolicyName=ada4profitdotcom>
  2. We minted the asset name (native token) ./11a_mintAsset.sh <AssetName=ada4profitdotcom> <AssetAmount=100000000> <PolicyName=ada4profitdotcom> <PaymentAdd=ADA4Profit_payment>
  3. Query the result ./01_queryAddress.sh <PaymentAdd=ADA4Profit_payment>

Result:

 

Transferring (native tokens)

Next step:

  1. Create a payment address ./02_genPaymentAddrOnly.sh <PaymentAddr=ada4profitdotcom_payment>
  2. Send native asset from the ADA4Profit_payment address to the ada4profitdotcom_payment address ./01_sendAssets.sh <FromPaymentAdd=ADA4Profit_payment> <ToPaymentAdd=ada4profitdotcom><PolicyID.Name=110952ebf507e63f1a775ba4b3e2d84f2bf35dc75496e1f1dbd8d10c.ada4profitdotcom> <Amount=50>
  3. Send native asset from the ADA4Profit_payment address to the ada4profitdotcom_payment address ./01_sendAssets.sh <FromPaymentAdd=ADA4Profit_payment> <ToPaymentAdd=ada4profitdotcom_payment><PolicyID.Name=110952ebf507e63f1a775ba4b3e2d84f2bf35dc75496e1f1dbd8d10c.ada4profitdotcom> <Amount=49999950>
  4. Query the result ./01_queryAddress.sh <PaymentAddr=ada4profitdotcom_payment>

Result:

Burning (native tokens)

Next step:

  1. Burn an asset ./11b_burnAsset.sh <AssetName=ada4profitdotcom> <AssetAmount=10000000> <PolicyName=ada4profitdotcom> <PaymentAdd=ada4profitdotcom_payment>
  2. Query the result ./01_queryAddress.sh <PaymentAdd=ada4profitdotcom_payment>

Result:

 

Conclusion

It is pretty easy to make native tokens on Cardano via the CLI and due to the contributed scripts of Martin of ATADA. No smart contracts are needed, just a limited amount of ADA to fuel the transaction.

Minting, issuing, using, redeeming and burning of native tokens has never been so easy. The improved security, low transaction fees and simplicity should attract lots of attention in the DeFi space. Why put your assets at risk if you can have a secure low cost native alternative.