Jun 14, 2021

How to Tokenize Assets on a Blockchain: A Guide for Developers

By: Algorand

Tokenization of real-world assets, including money, real estate, commodities, shares, and art, is poised to become the next big trend in finance once the regulatory framework is adjusted to leave the door open for such digital assets. Companies that already implement tokenization use cases are one step ahead of everyone else. 

Read how to tokenize assets on the Algorand blockchain. 

Tokenizing Assets on Algorand: What Is an ASA?

Tokenized assets on Algorand do not require to be coded on a Smart Contract like they do on other blockchains. Tokenized assets on Algorand leverage the Algorand Standards Assets (ASA) framework, which enables developers to create new tokens, either fungible or non-fungible, on Layer-1 within a few minutes.

ASA acts as the underlying technology for tokenization processes, letting issuers benefit from all great features of the Layer-1 network, including high throughput, decentralization, speed, security, and transparency, among others. 

The good news for developers is that tokenization processes can be deployed on Layer-1 through a simple transaction.The tokenized assets are highly configurable, enabling developers to mint tokens, and configure them to allow revoking and freezing.

Here are the main benefits of ASAs:

  • They are fast and secure thanks to the capabilities of Layer-1 technology.
  • Minting and maintaining ASAs is cheap, as Algorand charges fractions of a penny transaction fees.
  • Algorand puts a great emphasis on user experience – issuing assets through the ASA tool is easy and simple.
  • ASAs benefit from universal interoperability among all Algorand assets.
  • ASAs enable Role Based Asset Control (RBAC), which are optional and flexible asset controls for developers and managers for the purpose of business, compliance, and regulatory requirements.

How to Tokenize Assets on Algorand

Developers can build tokenized assets by using their preferred programming language, as Algorand supports Java, JavaScript (node.js and browser), Go, and Python SDKs, REST APIs, and many community sdks ie rust, swift, PHP, dart, C# etc...

Before starting the tokenization process, you should be aware of a few things:

  • For every asset type an account creates, its minimum balance requirement increases by 0.1 Algos.
  • If any transaction is issued while the related account violates the maximum number of assets or the minimum balance requirement, the transaction fails, and the new asset cannot be created.
  • Before a new asset can be transferred to a specific account, the receiver has to opt-in to receive the asset.

The type of newly minted asset is defined by the parameters selected during the creation process. There are eight immutable parameters and four mutable ones. The former include:

  • Creator (required);
  • AssetName (optional, but recommended), e.g., Apple.
  • UnitName (optional, but recommended), e.g., AAPL or APP.
  • Total (required) – this is the total number of base units (you can treat it as total supply) that cannot be changed.
  • Decimals (required) – this parameter determines the number of digits to be used after the decimal point. For example, if you put 0, then the asset is not divisible, while setting two digits will make it divisible by 100 (like the US dollar is divided into cents).
  • DefaultFrozen (required) – true to freeze holdings for this asset by default.
  • URL (optional) – you can create a URL where more data about the asset can be retrieved. Its maximum size is 32 bytes.
  • MetaDataHash (optional) – while this parameter is optional for ASAs in general, it is recommended for tokenized assets. This field is an up to 32-byte hash of some metadata that is relevant to your tokenized asset and/or asset holders. Note that this field can only be specified upon creation. For instance, you can use MetaDataHash to represent the hash of some certificate that stipulates the digitized asset is the representation of a certain real-world asset.

As mentioned, there are also four other parameters that can be changed, and all of them imply addresses that may authorize certain functionality for an asset. Here they are:

  • Manager Address – the manager account is the only one that can authorize transactions to modify or destroy an asset. It is not recommended to leave this section empty if you want to be able to re-configure or destroy the asset.
  • Reserve Address – non-minted assets can reside in an account holding the reserve address instead of the default creator account. Note that the reserve account has no functional authority in the asset’s protocol.
  • Freeze Address – the freeze account can freeze or unfreeze the asset holdings for a given account. If an account is frozen, it cannot send or receive the asset. This option can be used to investigate criminal activity, for example.
  • Clawback Address – the clawback account is able to transfer assets from and to any asset holder. This option can be used to revoke assets from an account that breaches certain contractual obligations.

Now that you understand ASAs’ parameters, you can start creating the asset in the coding language you prefer. Any account with sufficient ALGO balance can create a new asset. 

Here is an example of asset creation:

You can find the complete code on GitHub.

Besides asset creation, you can conduct other functions, such as:

  • Modifying an asset – it can be authorized by the asset manager account; 
  • Receiving an asset – any account opting in can receive the asset; 
  • Transferring an asset – any account holding the asset can transfer it; 
  • Freezing an asset – it can be authorized by the Asset Freeze Address; 
  • Revoking an asset – it can be authorized by the Asset Clawback Address; 
  • Destroying an asset – it can be authorized by the asset manager only. 

Algorand makes it easy for anyone to tokenize real-world assets and contribute to the digital revolution. The improved user experience is one of the key factors that will spur wider adoption of tokenized assets. 

Further Reading