Running Blockchain Tokens on top of IOTA’s Qubic Protocol

2017 was perhaps the most insane and spectacular year for crypto we have seen so far. Without a doubt, ICOs have been one of the main drivers of this hype. One project, Ethereum (which has gained 10,000% in 2017, making it the 2nd largest crypto by marketcap as of today), has immensely profited by creating a new market for ERC20 tokens, – entire token assets built on top of Ethereum.

However, Ethereum was not designed to be highly scalable. Transaction fees have been rising, making it more and more unattractive for a wide range of applications. But while Ethereum now starts to run into these scaling problems, another project has taken the exact opposite direction.

qubic tokens running on the third layer (graphic by Qyvxz)

IOTA, being designed with the idea of scalability in mind from the very beginning, has just very recently published the technical concept for a special smart contract platform, called Qubic, running on top of the core IOTA protocol. Because Qubic works entirely different and has a lot more open parameters (assembly size, reward stakes, etc.) than Ethereum smart contracts do, the question arises, whether Qubic might be able to simulate virtual tokens as well?

In the following, I will outline a design to run blockchain tokens (called toqens) on the Qubic protocol. The article requires a basic understanding of how Qubic works on a technical level.

Building the Toqen Platform

So how can we create these “toqens” (token blockchains running on Qubic)? The idea is to implement a Toqen Platform, a decentralized system that simulates multiple of these blockchains.

First Component: The Toqen API

To allow other qubics to utilze this service, we need some sort of API, an interface where qubics can:

  • request the creation of a new toqen¹
  • send transactions on the blockchain of an existing toqen
conceptual design of a toqen platform (graphic by Qyvxz)

This Toqen API is the first of the two modules we need. It will be a qubic that searches through the tangle to pick up any API calls. Having done that, it filters out all invalid calls (e.g. transactions with an invalid signature, or transactions of toqens that do not exist). The API manages a record of all existing toqens (the toqen list). It also picks the N (a constant integer ≥ 1) transactions with the highest priority² out of the transaction pool for further processing. Both the toqen list, as well as the picked transactions are the output of this qubic and are written onto the tangle, from where they can be used as input for the second component (another qubic) of our Toqen Platform.

Second Component: The Toqen Chain

Now that we have the API in place to create new toqens and filter out the transactions with the highest priority, we can finally do the interesting part: the block creation. This will be done by the Toqen Chain, a second qubic that manages the ledgers of each individual toqen. To do this, it switches ledgers after each epoch (qubics work in rounds called “epoches”).

the Toqen Chain creates a new block every epoch (graphic by Qyvxz)

This way, it will create a block for toqen A, thereafter a block for toqen B, then C and so on, until it reaches the last toqen, before switching back to A and repeating that circle. Since all toqens are listed in the toqen list, it knows all of them.

Each toqen will receive a new block after a few epoches. As opposed to classical blockchains, the blocks in these blockchains are not bundles of confirmed transactions, but snapshots of the ledger (all current accounts and their respective balances). This is necessary, as we will see in the next paragraph (although there is a simple improvement to bypass this limitation, see the section “Account Ledgers”).

Before adding the new transactions to a ledger, the Toqen Chain needs to validate the transactions it receives from the Toqen API. Validating includes checking the balances in the latest block of the ledger (therefore each block needs to contain all balances). The accepted transactions move balances on the ledger, resulting in the creation of a new block. The block is then published on the tangle where it can be seen by other entities (humans or machines checking their toqen balances) or other qubics which use the result as input (this opens entirely new possibilities, as I will outline in my next blog post).

Why are Toqens so Interesting?

What makes toqens so interesting, is that there is not just a single, global Toqen Platform but there can be an unlimited amount of them with different parameters (assembly size, costs, latency, etc.). and various, very powerful implementations that I will describe in concept here:

Atomic Swaps / Cross-Chain Transfers

A more advanced implementation would allow cross-ledger transfers within the same Toqen Platform. Instead of reading the latest block of a single ledger, the Toqen-Chain would read the very last blocks of both ledgers that are referenced by the transaction. This is a pretty straightforward upgrade to the initial idea adding a lot of functionality.

You can also connect Toqen Platforms (there is a lot of room for different approaches here) to send inter-platform transfers from Platform A to Platform B. This opens possibilities for a global token economy connected through decentralized exchanges.

Account Ledgers

Now let’s take those cross-chain and inter-platform transfers to the next level. Let’s say each user creates their own toqen, a ledger just for their account. If they want to send toqens to somebody else, they can just send a cross-chain transfer to the receiver ledger. This is very important, because now blocks will not contain the entire snapshot, actively limiting the amount of possible accounts per toqen by the block size. Instead, there can be as many as needed, each having their own ledger (as it is currently done by Nano).

Dynamic Ledger Rotation

Going through every single ledger one after another, even when some ledgers have an empty transaction pool, is rather inefficient. Instead, one can rotate dynamically by switching directly to the ledger referenced by the highest priority transaction. This will make transacting much much faster.

Other Use Cases

This multi-ledger platform can be supplemented with all kinds of functionality. You can create smart toqens which behave in custom ways. Or instead of having toqens on the ledger, you can even create decentralized games utilizing account systems to store inventories or game states. It’s hard to think of where the actual limits are and the possible implications.

Conclusions

Whether there will be tokens on top of the Qubic protocol, will certainly depend on the actual implementation and final functionality of Qubic. So far, however, the theoretical concept seems to allow for blockchains to run on top of it without any unusual assumptions. How this could redefine the landscape for Qubic, smart contracts and even crypto in general, will be subject of the second blog post linked below:

Tokenized Smart Contracts - Redefining the Landscape for Cryptocurrency

Footnotes:

1 … Requires to send a service fee to the qubic in order to compensate for the permanent computational expenses.

2 … To prevent spam, every transaction burns a certain amount of toqens. The amount you are willing to burn determines the priority. Please note that this is akin to mining: instead of inflating the supply with mining rewards, it deflates it over time and increases the holdings of other toqen users.

CREDITS

The graphics were created by Qyvxz. If you like his works, consider sending him a little “thank you” to his donation address:

KVHXQAQRKHXESTOOPLIFIPFJHUTHZE9JZWCGYAIYQHMQBSFEOYEAJFWBWQRJGMALXBSXBAJJ9DQQM9VOZMGRAP9NGW

For technical discussions about Qubic, join the Qubic Forum on qubIOTA.com

Get real time updates directly on you device, subscribe now.

You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

×
Ava
IOTA AI
GM! :-) Do you have any questions about IOTA?
 
AI-generated responses may be inaccurate. Not financial advice.