Vivek Teega
Apr 17 · 5 min read

Vivek Teega and Rohit Tripathy, Ranchi Mall

Let’s say we could create tokens just like this:

Create 21 million tokens with name alphacoin#

or

Start an alphacoin# token system with 21 million tokens

or

Begin a token system called alphacoin# with an initial supply of 21 million tokens

In a system like this, there’d be no need to write technical code. Everyone would be able to create and launch their own token systems, without knowing any kind of programming.

Once such tokens have been created, we would have to figure a way to transfer these tokens to someone who pays for them. Assuming the commands were as simple as:

Transfer 100 alphacoin# tokens to Romeo

or

Give 100 alphacoin# tokens to Juliet

The above commands would be a complete description of any token creation and transfer system.

Let’s see some more examples:

100 alphacoin# transfer

alphacoin# 100 transfer to Sherlock

alphacoin# give 100 to Sherlock

SEND 100 COINS OF ALPHACOIN# TO SHERLOCK

A user friendly token creation and transfer system should be able to understand common English language constructions for it to be acceptable at mass level. Creating a system that can parse user commands like this is relatively easy with a couple of if/then/else statements.

So we created a parsing system for token creation and transfer : https://flodata-tester.duckdns.org/

Execution on the blockchain

To execute a natural language based token creation and transfer system we first need a blockchain that permits storage of free text. That blockchain exists. It’s called FLO.

We will use the floData feature of FLO blockchain which permits storage of 1040 characters in a transaction as part of transaction comments.

Once data goes into the blockchain it stays there forever. So a user instruction issued inside the blockchain can never be altered. Using that property of the blockchain we can create a data interpretation system outside the blockchain with the following rules :

  1. Any FLO address can create a new token system by supplying a name which has not been taken earlier. Any word ending with ‘#’ is the name.
  2. The supply of tokens is specified; either in decimal numbers or number followed by thousand/million/billion/trillion.
  3. An explicit instruction is given to invoke the token creation system with one of the following keywords: create, start, begin, incorporate.
  4. The token supply amount will be credited to the sender’s FLO address.
  5. Any confusing instruction is rejected.
  6. The words in an instruction can be provided in any order.

Similarly for token transfer system, the following rules can be specified:

  1. An explicit instruction is given to invoke the token transfer system with one of the following keywords: send, transfer, give.
  2. The name of the token system is specified.
  3. The amount of tokens to be transferred is specified.
  4. There can be only one sender address on the input side, and only two addresses on the output side, one belonging to the receiver and the other, is the sender address, acting as change address.
  5. The sender address must have a token balance greater or equal to the amount being transferred.
  6. Additional text can be used so long as it does not obscure the meaning of essential instructions.
  7. The words in an instruction can be provided in any order.

These rules themselves are global specifications of the Token Creation and Transfer system. Rules need to be put in the blockchain just once in order to become immutable and inform all operators and users of the rules of the system.

Implementation of the system

Our system design is such that data will be inside the blockchain and the interpretation of data will be outside the blockchain.

We have already specified the format of data that will go into the blockchain, and now we have to create the implementation script outside the blockchain. We have used python for this, although any client language that implements the rules should work.

The code is available on GitHub and a live interpretation of it can be found at https://flo-tokenexplorer.duckdns.org.

Now lets say someone creates an rmt# token with the instruction “create 21 million rmt#”. They can avail the services listed below:

Token explorer APIs [ for developers ]

API endpoint : flo-tokenexplorer.duckdns.org/v1.0

  • /gettokeninfo
Return a JSON object with a token's informationMethod - GETParameters 
1. token - Name of the token system
  • /getaddressbalance
Return a JSON object with token balance at the given FLO addressMethod - GETParameters 
1. address - FLO address to query
2. token - Name of the token system
  • /gettransactions
Return a JSON object with a token's transaction informationMethod - GETParameters 
1. token - Name of the token system
(Optional)
2. senderFloAddress - Filter results to show only transactions with the given sender Address
3. destFloAddress - Filter results to show only transactions with the given receiver Address

For example, if a token is created on the FLO blockchain with the name rmt#, one could use the API in the following way:

  • Token Info

flo-tokenexplorer.duckdns.org/api/v1.0/gettokeninfo?token=rmt

  • Address Balance

flo-tokenexplorer.duckdns.org/api/v1.0/getaddressbalance?token=rmt&address=FHQ5rPqqMZT4r3oqpecM54E7tieQoJwZTK

  • Get Last Transactions

flo-tokenexplorer.duckdns.org/api/v1.0/gettransactions?token=rmt

User access to the blockchain

For users to make use of this system they need a way to enter floData into the blockchain by doing a transaction, in a rather not-too-technical way. To facilitate easy access we provide a companion wallet where a person can generate a FLO address and write the data in the FLO blockchain if he provides the private key of that address.

Note — Any FLO wallet which cannot send the change to the sender address will not work because the system will not know which, among the two output addresses in a transaction, is the receiving address.

List of tools used

  1. FLO data tester — Test weather the data being entered into the FLO blockchain is correct or not flodata-tester.duckdns.org
  2. Token Tracking System source code https://github.com/ranchimall/flo-token-tracking
  3. Checking the status of tokens through token explorer https://flo-tokenexplorer.duckdns.org (Token explorer)
  4. Source Code of token explorer for any token created https://github.com/ranchimall/flo-token-explorer
  5. User Accessibility: A web based wallet to generate FLO addresses and write data into the FLO blockchain, at the link https://flo-webwallet.duckdns.org
  6. Source Code of Web Based FLO Wallet: https://github.com/ranchimall/FLO_webWallet

FLO token transfer vs Other token transfer systems

This approach brings a dramatic simplification in the application of blockchain technology in real life use cases. Every other token creation or transfer systems currently needs some knowledge of coding or deep technical knowledge to be able to use them. This approach also reduces the number of steps needed compared to any other leading asset creation and transfer system.

We have compared the token creation and transfer system on Ethereum, Stellar, EOS, Tron and Omni at this medium article

Credits and Updates

This is a Ranchi Mall FLO Blockchain Contract project.

Updates are available at https://twitter.com/ranchimallFLO

Ranchi Mall

Global | Transparent | Trust-Based | Creative | Innovative | Collaborative | Borderless | Officeless |

Vivek Teega

Written by

Ranchi Mall

Global | Transparent | Trust-Based | Creative | Innovative | Collaborative | Borderless | Officeless |

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade