What’s Hotter than the Blockchain Itself? Tokenisation?

Niharika Singh
HackerNoon.com

--

The de facto business idea that will lead the Web 3.0 revolution is tokenisation.

Just when the world thought blockchain is the new big thing, the bomb of tokenisation on blockchain” exploded. People had barely started to understand blockchain and in the background a new paradigm shift was already brewing.

I kid you not; tokenisation on blockchain is hotter than vanilla-blockchain itself.

Source: https://mashable.com/2013/07/09/excitement-gifs/

Forethoughts

The rationale behind tokenisation coincides with the rationale behind blockchain.

The essence of blockchain lies in the idea of decentralising everything: Power, Money, Value.

What if someone tells you that you can own a part of the Taj Mahal or the Moon or (to be extremely far-fetched) Saturn? The idea sounds radical, doesn’t it?

If you do happen to own a part of any of the above mentioned objects, the power of the current owners (government, or God…) will dissolve. In actuality, the one who owns more part will have more say.

This will breakdown all the enterprise empires and common man will gain and flourish. This will give rise to a whole new economy in the universe — The Token Economy. This economy will not be limited by governments, neither controlled by any set rules by bureaucrats, there won’t be any boundaries on land. Concept of countries and citizenship will fade away. All institutions set up by middlemen will diminish. Everything will be autonomous. Everything will be one.

With that being said; EVERYTHING can be tokenised — Your car, your house, free-storage on your computer etc.

Tokenisation in Simple Terms

Imagine that you own a hard disk with 2TB (1 TB = 1024 GB) storage but about 70% of it remains unused for most of the time. So, your friend tells you that there is an app which gets you money if you offer people your unused storage. This means, people can use your unused disk space and in return of that service they will pay you. The unused part of the disk is divided into smaller parts so that each part can be put up on the “storage market” for people to buy. This is essentially what is tokenisation.

Similarly, anything (assets) can be broken down into divisible bits and sold by their parts — essentially known as, tokenised.

How to do it?

There are platforms like Ethereum, BigchainDB on which this can be implemented.

In this article, I’ll show you how to do it on BigchainDB.

Step 1: Install BigchainDB driver

npm i bigchaindb-driver

Step 2: Connect to BigchainDB node

const BigchainDB = require('bigchaindb-driver')

const API_PATH = 'https://test.bigchaindb.com/api/v1/'
const conn = new BigchainDB.Connection(API_PATH, {
app_id: 'Get one from testnet.bigchaindb.com',
app_key: 'Get one from testnet.bigchaindb.com'
})

The code snippet below illustrates how to create a divisible asset with 100,000 tokens associated to it.

const nTokens = 100000
let tokensLeft
const tokenCreator = new BigchainDB
.Ed25519Keypair(bip39.mnemonicToSeed('seedPhrase').slice(0,32))

function tokenLaunch() {
// Construct a transaction payload
const tx = BigchainDB.Transaction.makeCreateTransaction({
token: 'TT (Tutorial Tokens)',
number_tokens: nTokens
},
// Metadata field, contains information about the transaction itself
// (can be `null` if not needed)
{
datetime: new Date().toString()
},
// Output: Divisible asset, include nTokens as parameter
[BigchainDB.Transaction.makeOutput(BigchainDB.Transaction
.makeEd25519Condition(tokenCreator.publicKey), nTokens.toString())],
tokenCreator.publicKey
)

// Sign the transaction with the private key of the token creator
const txSigned = BigchainDB.Transaction
.signTransaction(tx, tokenCreator.privateKey)

// Send the transaction off to BigchainDB
conn.postTransactionCommit(txSigned)
.then(res => {
tokensLeft = nTokens
document.body.innerHTML ='<h3>Transaction created</h3>';
// txSigned.id corresponds to the asset id of the tokens
document.body.innerHTML +=txSigned.id
})
}

Now that the tokens have been minted, you can start distributing them to the owners. Tokens can be transferred to an unlimited number of participants.

In this example, you are now going to make a transfer transaction to transfer 500 tokens to a new user called Bill. For that, you first need to create a new user and then do the transfer. The code below shows that.

const amountToSend = 500

const newUser = new BigchainDB
.Ed25519Keypair(bip39.mnemonicToSeed('newUserseedPhrase')
.slice(0, 32))

function transferTokens() {
// User who will receive the 500 tokens
const newUser = new BigchainDB.Ed25519Keypair()

// Search outputs of the transactions belonging the token creator
// False argument to retrieve unspent outputs
conn.listOutputs(tokenCreator.publicKey, 'false')
.then((txs) => {
// Just one transaction available with outputs not being spent by
// tokenCreator. Therefore, txs[0]
return conn.getTransaction(txs[0].transaction_id)
})
.then((txOutputs) => {
// Create transfer transaction
const createTranfer = BigchainDB.Transaction
.makeTransferTransaction(
[{
tx: txOutputs,
output_index: 0
}],
// Transaction output: Two outputs, because the whole input
// must be spent
[BigchainDB.Transaction.makeOutput(
BigchainDB.Transaction
.makeEd25519Condition(tokenCreator.publicKey),
(tokensLeft - amountToSend).toString()),
BigchainDB.Transaction.makeOutput(
BigchainDB.Transaction
.makeEd25519Condition(newUser.publicKey),
amountToSend)
],
// Metadata (optional)
{
transfer_to: 'bill',
tokens_left: tokensLeft
}
)

// Sign the transaction with the tokenCreator key
const signedTransfer = BigchainDB.Transaction
.signTransaction(createTranfer, tokenCreator.privateKey)

return conn.postTransactionCommit(signedTransfer)
})
.then(res => {
// Update tokensLeft
tokensLeft -= amountToSend
document.body.innerHTML += '<h3>Transfer transaction created</h3>'
document.body.innerHTML += res.id
})

}

The official guide can be found here.

Some great resources to read from:

  1. https://blog.bigchaindb.com/tokenize-the-enterprise-23d51bafb536
  2. https://masterthecrypto.com/tokenization-tokens-create-liquid-world/
  3. https://medium.com/prysmeconomics/the-economics-of-tokenization-part-i-not-everything-can-or-should-be-tokenized-ed9b32f5a0f2

If you have anything else to add, please feel free to mention in the comments below. I’d love to know your thoughts. Thank you very much!

--

--