Tokenization Explained

What is Tokenization?

Tokenization has become a buzzword today due to its adoption in the payment industry and blockchain. However, Its usage is not limited to the aforementioned industries. It can be applied to many other industries such as healthcare, stock trading, gaming and more.

The primary purpose of tokenization is to ensure data security. It is used for handling sensitive data such as payment, medical record, personal ID and more.

According to Wikipedia,

“Tokenization, when applied to data security, is the process of substituting a sensitive data element with a non-sensitive equivalent, referred to as a token, that has no extrinsic or exploitable meaning or value. The token is a reference (i.e. identifier) that maps back to the sensitive data through a tokenization system. The mapping from original data to a token uses methods which render tokens infeasible to reverse in the absence of the tokenization system, for example using tokens created from random numbers.

The tokenization system must be secured and validated using security best practices applicable to sensitive data protection, secure storage, audit, authentication and authorization. The tokenization system provides data processing applications with the authority and interfaces to request tokens, or detokenize back to sensitive data.”

In short, Tokenization is the process of substituting sensitive data with non-sensitive identification symbols known as tokens. Tokenization retains all the essential information of the data without compromising its security.

A Short History

According to Wikipedia, the concept of tokenization has existed since the invention of the currency system centuries ago. It was adopted as a means to reduce risk in handling financial instruments by replacing them with surrogate equivalents.

In addition, coin tokens have a long history of use replacing the financial instrument of minted coins and banknotes. In more recent history, tokens are used in mass rapid transit payment, casino chips and more.  The adoption of the above systems is to replace physical currency and cash for reducing risks such as theft.

In the digital world, tokenization techniques have been used since the 1970s. They were meant to isolate real data elements from exposure to other data systems(Wikipedia, 2018). In databases, surrogate key values have been used since 1976 to isolate data associated with the internal mechanisms of databases and their external equivalents for a variety of uses in data processing.

More recently, these concepts have been extended to consider this isolation tactic to provide a security mechanism for the purposes of data protection. For example, in the payment card industry, tokenization is one means of protecting sensitive cardholder data in order to comply with industry standards and government regulations.

Definition in Blockchain

In blockchain, tokenization is a method that converts rights to an asset into a digital token. Thus, we can take an asset, tokenize it and create its digital representation that lives on Blockchain. Blockchain guarantees that the ownership information is immutable.  The tokens created in this way is also known as crypto tokens.

For example, you can tokenize an asset such as a book that you authored. The book is kept somewhere while the book token is uploaded to the blockchain network. The book crypto token is a representation of the book ownership. You can specify how many tokens need to be transferred to your crypto wallet before you can transfer the book ownership to a buyer by means of a smart contract.

One of the actual use cases is https://stamp.io , a platform where you can store your tokenized documents on the block and certify it, as shown in the following figure:

Cryptokitties is a brilliant example of the crypto token that allows users to acquire an adorable collectible by transferring some cryptocurrencies to the owner. The owner will then transfer the digital collectible to the buyer. The transaction occurs automatically via the smart contract.

Another use case is we can create a crypto token that represents some customer loyalty points on a blockchain. This type of token is also known as utility token. It can be used to manage customers’ reward schemes for the retail chains. Other examples include the crypto token that gives entitlement to the token holder to view certain hours of video streaming on a video-sharing blockchain. A house owner can sell his house by transferring the tokenized house deed to the buyer. Last but not least, a crypto token may even represent another cryptocurrency.

Fungible Tokens vs Non-Fungible Tokens

We often come across the terms fungible Tokens and non-fungible tokens in the blockchain. What are they?  The following table explains what are they and how they differ.

Fungible TokensNon-fungible Tokens
Interchangeable
A fungible token can be exchanged with any other fungible token of the same type. It is like exchanging a dollar bill with another dollar bill and the value is still the same.
Non-Interchangeable
A non-fungible token cannot be exchanged with another non-fungible token of the same type. It is like your passport or ID, they cannot be exchanged.
Uniform
Each fungible token is identical to all other fungible tokens of the same type. For example, your one-dollar bill is the same as John’s one-dollar bill.
Unique
Each token is unique and different from all other tokens of the same type. For example, your bank account is not the same as John’s bank account
Divisible
A fungible token can be divided into smaller units and the total value is still the same. For example, you can divide a dollar bill into two 50 cents or five 20 cents and the total value is still the same.
Non-divisible
The non-fungible token cannot be divided into smaller units. The basic unit is one token and one token only. For example, your driving license.
ERC-20 Standard
The Ethereum Standard is used for issuance tokens to be used as cryptocurrencies.
ERC-721 Standard
The Ethereum Standard is used for the issuance of unique, non-fungible tokens. The most well-known case is CryptoKitties, which is a virtual collectibles marketplace where each kitty is unique.

Non-fungible tokens can be used in KYC (Know Your Customer) procedures, for academic degrees and other educational certificates, collectibles, badges, voting & elections, loyalty programs, in-game items, copyright, supply chain tracking, medical data, software licenses, warranties, and more.

Creating Your Own Token for ICO

ICO is a hot topic in the crypto world today. In this article, I will attempt to explain how to create your own token for an ICO project. 

First of all, you need to set up a private Ethereum network, before you can proceed to create the token. After setting up the private network, you need to run it. (The detail steps for setting up a private Ethereum network is discussed in another article)

Next, you need to install the Ethereum wallet before you proceed. Follow the steps below to install the Ethereum Wallet.

  1. Install Ethereum Mist Wallet for Windows 10.
  2. Visit the link https://github.com/ethereum/mist/releases
  3. Download Ethereum-Wallet-win64-0-11-0.zip
  4. Create a folder Ethereum under the Program Files folder and extract the zip files there.

Launch the Ethereum wallet after successful installation. Also, create an account in the wallet.

Next, Open the Wallet app and then go to the Contracts tab as shown in the figure below:

Click on DEPLOY NEW CONTRACT and bring up the  Solidity Contract Source code text editor as shown the following figure:

Now type the following smart contract  code in the code editor.

pragma solidity ^0.4.24;

contract BestToken {
    /* This creates an array with all balances */
    mapping (address => uint256) public balanceOf;
     string public name;
     string public symbol;
     uint8 public decimals;

    /* Initializes contract with initial supply tokens to the creator of the contract */
 constructor(
     uint256 initialSupply,
     string tokenName,
     string tokenSymbol,
     uint8 decimalUnits
     ) public {
     balanceOf[msg.sender] = initialSupply;  // Give the creator all initial tokens
     name = tokenName;                        // Set the name for display purposes
     symbol = tokenSymbol;                   // Set the symbol for display purposes
     decimals = decimalUnits;               // Amount of decimals for display purposes
    }
    

    /* Send coins */
    function transfer(address _to, uint256 _value) public returns (bool success) {
     require(balanceOf[msg.sender] >= _value);   // Check if the sender has enough
     require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
     balanceOf[msg.sender] -= _value;                    // Subtract from the sender
     balanceOf[_to] += _value;                        // Add the same to the recipient
     return true;
    }
}

Don’t worry about the code first, I will explain them in another article.

If the code compiles without any error, you should see a “pick a contract” drop-down list on the right, as shown in the figure below:

Click Pick a contract button and select the “BestToken” contract. On the right column, you’ll see all the parameters you need to personalize your own token. You can tweak them as you like, I use the following parameters: 10,000 as the supply, BestCoin for the token name, “#” as the symbol and 2 decimal places. Your wallet should be looking like this:

Scroll to the end of the page and you’ll see an estimate of the computation cost of that contract and you can select a fee on how much Ether you are willing to pay for it. Any excess Ether you don’t spend will be returned to you so you can leave the default settings if you wish. Press “deploy”, type your account password and wait a few seconds for your transaction to be picked up.

Now click the DEPLOY button to deploy the smart contract, the output dialog is as follows:

Upon entering the password for your account and click send transaction, the contract is successfully deployed, as follows:

Now the new token Best Token is shown in your wallet, as follows:

Tokens are currencies and other fungibles built on the Ethereum platform. In order for accounts to watch for tokens and send them, you have to add their address to this list. Proceed to add BestCoin to the list, as shown in the following figure.

Now the new token BestCoin will be shown in the list, as shown in the figure below.  

Now you can send some funds from BestCoin to a wallet, as shown in the figure below:

References