Why Tenfold

Derek Chiang
Tenfold Protocol
Published in
7 min readNov 16, 2018

Since shipping the first version of Tenfold and getting feedback from developers and enterprises, we’ve realized that Tenfold has far broader applications than we originally imagined. To that end, we’d like to explain our evolving understanding of Tenfold’s value proposition: how we got here, what makes Tenfold different, and why we think Tenfold is one of the most important projects in the blockchain space.

The History of Tenfold

When we first started, we wanted to build a massive multiplayer blockchain game. We were intrigued by blockchain’s potential to empower gamers. With blockchain, gamers can truly own their digital assets, and participate in the governance and evolution of the games themselves.

However, since the game needed to interact with a large number of users in real time, it wasn’t feasible to run the game fully on the blockchain, which is known to have severe scalability issues with regard to throughput and latency.

We looked to existing layer-2 solutions such as Plasma, state channels, and Truebit. While being great technologies in their own rights, none of them fit our needs:

  • Plasma is mostly used for asset transfers, and not suitable for executing general computations such as those required in games.
  • State channels work well with a small, fixed set of users, but generally don’t work with a large and dynamic set of users, which is what our game needed to handle.
  • Truebit is great for executing stateless computation tasks such as factoring large numbers, but doesn’t work for stateful, interactive, and long-running services such games.

We built Tenfold as a layer-2 solution for scaling our blockchain game. Tenfold runs arbitrary containers in a decentralized network. From Docker’s website, a container is defined as “… a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.” By using containers, Tenfold allows developers to build DApps using any programming languages and frameworks.

Unlike traditional web applications, apps running on Tenfold are fully decentralized. The Tenfold containers are not executed on centralized servers, but on Tenfold “validators” anyone can run, much like how smart contracts are executed on blockchain clients. As a result, users can be sure of the integrity of Tenfold applications and the data contained within it.

Tenfold includes a bridge that allows the containers to communicate with the blockchain, so smart contracts can query the state of the containers, and vice versa. In the context of gaming, it means we can launch ERC721 tokens on the blockchain, while running core gameplay off-chain via Tenfold, which allows for much greater performance and interactivity.

We wound up spending all our time on Tenfold and never built games, but fortunately someone else did. MixMarvel, a top blockchain game company in China, launched HyperDragons on Tenfold in September, surpassing CryptoKitties as the #1 blockchain game on Ethereum.

Tenfold as a Scalability Solution

What made Tenfold appealing to the developers of HyperDragons? Performance and cost.

Prior to Tenfold, the core gameplay of HyperDragons was implemented fully on-chain, in order to ensure transparency and fairness. Users had to spend gas every time they play the game, and wait for their actions to be confirmed on-chain, which usually takes more than a minute. Imagine playing a game where every move costs money, and there are minutes of wait time between each move! Sadly, that was exactly the state of blockchain gaming.

Furthermore, due to the gas limit of Ethereum, there’s a hard limit on how much computation each transaction may incur. In practice, that imposes a hard limit on how advanced the gameplay may be. Even though developers would like to add features to their game, they are handicapped by the limits of the underlying blockchain.

With Tenfold, HyperDragons runs the core gameplay off-chain, without sacrificing the security and trustless-ness of blockchain. This is game-changing (pun intended) for players and developers alike. For players, they no longer have to pay gas, and the game is responsive enough to be compared with traditional games. For developers, they can now make their game as fun as they’d like, free from the limits imposed by the blockchain.

The improvement was immediate and obvious. We were seeing 5x increase in user count and 10x increase in transaction count, and users were putting in more ETH into the game than ever before. The leap in user engagement can very well be explained by the famous Amazon study, where it was found that every 100ms of latency cost them 1% in sales. Well, guess what happens when latency went from 90 seconds to 0.1? Furthermore, the less money players have to spend on gas, the more they can spend on the game.

In short, Tenfold as a scalability solution enables DApps with much higher throughput, lower latency, and drastically lower costs comparing to smart contracts. It also empowers developers to build much more advanced functionality into their DApps than what was possible before.

Tenfold for Developer Adoption

The success of our launch on HyperDragons drew a lot of attention from the blockchain gaming community, but perhaps somewhat surprisingly, most of the interest actually came from projects outside of gaming. These projects span all sorts of areas, including data marketplace, code auditing, real estate management, etc.

As we talked to these prospective users, we noticed a pattern: their projects are all powered by software written with traditional technologies such as C++, Python, etc. Since these software are not smart contracts and therefore cannot be deployed onto the blockchain, they are all run on centralized servers or some sort of permissioned network, yielding a low degree of decentralization.

With Tenfold, these applications can be fully decentralized. By executing the software on a decentralized network, no single party may control the execution of the software or manipulate the result. In other words, users of these applications no longer have to trust that the developer is honest, or that they will keep their servers secure from hacks.

But let’s pause and ask ourselves the following questions:

  • Why is decentralizing traditional software important in the first place?
  • Why can’t we just rewrite everything in Solidity and deploy them as smart contracts on blockchains?

Decentralizing Traditional Software

As a16zcrypto says, “trust is the new primitive.” When software is executed on a centralized server, users can only trust the output as much as they trust the server. The operator of the server, or a hacker who has gained access, can trivially alter the output. But when software is executed via Tenfold, users can trust the output is accurate and has not been tampered with, since it’s collectively approved by a decentralized network of validators.

To drive the point home, let’s look at two projects that have been evaluating Tenfold.

The first project has a suite of code auditing tools written in Python and JavaScript. The project would like to decentralize code auditing, so that anyone may submit a program to the protocol and the vulnerabilities of the program (or the lack thereof) would be recorded on the blockchain.

Without Tenfold, the auditing software is run on a permissioned network of nodes, meaning that one needs to apply with a centralized party in order to become an auditor, which involves trust in the said centralized party. With Tenfold, the auditing software may be executed in a decentralized network, such that anyone may become an auditor and be sure that the auditing result is accurate.

The second project is a marketplace for personal data. To make the data useful, a set of data analytics tools are used to transform the data. Again, buyers of the data need to be sure that the data analytics tools are outputting accurate results, or the data would be useless.

However, currently the buyers need to trust the centralized server that processes the data. But with Tenfold, the data transformation would be executed via a decentralized network, removing the need to trust an intermediary.

DApps without Smart Contracts

Can we just rewrite all these software in Solidity and deploy them as smart contracts? After all, smart contracts are the most decentralized form of software possible. Unfortunately, the answer by and large is no.

First of all, a lot of software is computationally intensive enough that they cannot exist as smart contracts. Consider the examples earlier: both code auditing and data analytics are computationally intensive tasks that make use of a large number of advanced algorithms and data structures. Implementing these algorithms on the blockchain would be difficult enough, and even if that was doable, the blockchain is simply too constrained and expensive of an environment for such heavy computations.

Furthermore, a lot of software has already been written way before blockchains exist, and have been used in production for many years. To require the software rewritten for the blockchain would be highly counter-productive, if not practically impossible.

Perhaps most importantly, the overwhelming majority of developers have no experience in smart contract engineering. If the history of computing teaches us anything, for a new computing platform to be widely adopted, it has to be able to onboard developers from the old platform. MS-DOS ignited the era of personal computing, but inherited its programming environment from IBM mainframes. Similarly, Android is leading the charge for mobile computing, and a significant part of its success can be attributed to its use of Java as the primary VM.

Therefore, we believe that for blockchains to become a mainstream computing platform, it needs to be able to onboard developers from the old world. While efforts like eWASM are important steps towards a more welcoming programming environment, Tenfold’s use of container technologies radically challenges the status quo, making it possible to develop DApps with literally any programming languages and technologies.

Summary

Tenfold is a new addition to the layer-2 family. As developers of the Tenfold Protocol, we are amazed by what people are building with Tenfold. Our understanding of Tenfold’s value is vastly different from when we just started. Back then, we thought of Tenfold as primarily a scaling solution, but now we see that its ability to decentralize traditional software is perhaps its biggest strength, and we believe the success of Tenfold will have heavy implications towards the mainstream adoption of blockchains at large.

If you are a developer interested in smart contracts, layer-2, and decentralized systems in general, we’d love for you to join us. If you are interested in building scalable DApps using traditional technologies, Tenfold can be a great fit for you. We have very exciting updates coming up that will make Tenfold ten times easier to use than before. For now, drop us a line at info@binarymint.io and we will be in touch!

--

--

Derek Chiang
Tenfold Protocol

Founder of Binary Mint, the company behind Tenfold Protocol