This article is one in a series of my 🍌Banana Papers— blockchain whitepapers re-written in an easy to digest (like bananas!) manner. My goal is to help readers quickly understand and evaluate complex blockchain ideas with minimal pain.
Today we’ll take a look at TrueBit — a blockchain startup founded by Jason Teutsch, funded by Polychain Capital, with a strong team, some great partners (Numerai, Ocean Protocol, Livepeer), and a very smart solution to a couple important Ethereum problems…
TrueBit — The Easy Explanation
Running complicated calculations on Ethereum is expensive, slow, and at times impossible. TrueBit is trying to fix this problem by moving these complex calculations off Ethereum and onto their own TrueBit network, which can solve calculations quickly and cheaply, and yet remain decentralized, trustless, and verified.
TrueBit accomplishes this by paying one group of people on the TrueBit network to solve the calculations, and paying another group of people on the TrueBit network to verify those solutions. If the solvers and the verifiers don’t agree on the solution, the calculation is then, and only then, passed to the Ethereum network which provides a final, binding answer.
TrueBit — The Detailed Overview
A massive amount of processing power exists on the Ethereum blockchain, but nearly all of it is used for mining, simply because mining is where the money is. Nearly none of the collected massive power is used to process or verify the actual smart contract computations. This skewed assignment of computing power severely limits the ability of the Ethereum network to do the revolutionary thing it’s built to do — be a worldwide, decentralized computer — and instead results in a network that is slow, limited, and expensive.
For example, consider a DAO (Decentralized Autonomous Organization — essentially an organized, but decentralized, group of people with many members) tallying the results of an internal election with 10 million participants. Tallying and iterating through that many individual votes using an Ethereum smart contract would require a large number of transactions replicated by every miner on the Ethereum blockchain, which would be extremely expensive and slow.
TrueBit fixes this problem by creating a new layer on top of Ethereum that pays people to both process and verify smart contract transactions off the Ethereum blockchain — they call this process “secure outsourced computation.” This TrueBit layer vastly increases the computing ability of the Ethereum blockchain, bringing it closer to what it was meant to be — a worldwide, decentralized computer.
In practice, TrueBit is a smart contract deployed on the Ethereum blockchain. Users submit tasks to the smart contract, which then outsources the task to an available computer registered on the TrueBit network — a Solver. This Solver —and anyone with an available computer can be a Solver — is paid a small fee to complete and return the results of the task.
Since only one resource is completing the task (instead of the task being replicated by every node on the Ethereum network) and the computation is happening off the Ethereum blockchain, computing the task is no longer expensive or slow.
But how does TrueBit ensure that the results from the Solver are correct? And how does TrueBit protect against bad actors who want to scam the system? To answer these questions, let’s look at an example flow using our task of tabulating DAO votes on TrueBit.
Step 1 — Task Submitted
A new task — tabulating votes — is submitted by the DAO to the TrueBit smart contract. The TrueBit code announces to all registered participants on the TrueBit network that this new task is available, and that there is a reward for solving this task.
Step 2 — Task Solved
All participants on TrueBit that are interested in tabulating the votes let the network know. These participants are known as Solvers. A single Solver from this group is selected by lottery. This winning Solver tabulates the votes, effectively “solving” the task. Next — and here’s an important point I’ll explain in more detail later — the Solver creates both a correct solution and an incorrect solution. So the Solver might prepare a correct solution of 1,500,000 “Yes” votes, and a second, incorrect solution of half that amount, 750,000 “Yes” votes.
Step 3 — Task Solution is Verified / Not Verified
In a normal case, the Solver reports the correct solution, and Verifiers on the network check the solution by tabulating the votes independently. If their solution matches the Solver solution, the Verifier alerts the network, the system accepts the solution as true, and the task is closed. Like Solvers, anyone is free to join the TrueBit network and be a Verifier.
Step 4 — Judges Make the Final Decision
However, if the Verifier finds the solution to be incorrect — let’s say a Verifier tabulates the correct answer to be 1,490,000 “Yes” votes instead of 1,500,000 — they Challenge the results. Challenged results are passed to Judges, who make the final determination as to the correct answer. Judges are the Ethereum network itself, and it re-calculates the task as any other normal Ethereum task. Effectively, TrueBit falls back to the Ethereum network and its trustless smart contracts as the final arbitrator. This reduces the tasks handled by the Ethereum network to a very small fraction of the total tasks solved on TrueBit. TrueBit removes the burden from the Ethereum network by only asking the Ethereum network to step in if there is a dispute.
This above step is known as the Dispute Resolution layer.
There are two major problems with the above model. First, how does TrueBit incentivize Solvers and Verifiers to participate in the network, and second, since this is a trustless, decentralized network, how does TrueBit guarantee that these actors stay honest?
The answer to these questions is the secret sauce of TrueBit: The Incentive Layer.
The Incentive Layer assumes that all actors in the system want to maximize profits, and thus incentivizes participation in the TrueBit network by paying both Solvers and Verifiers for their participation.
Solvers are paid every time they correctly solve a task. If they make a mistake, they are not paid. Instead, they are actually penalized money that they have deposited with the network. Their maximum payout results from consistently calculating and reporting correct solutions.
Verifier incentives are more complicated — Verifiers are paid every time they find a mistake by the Solvers. But since mistakes by the Solvers may rarely or even never happen, which would frustrate Verifiers and cause them to leave the network, TrueBit requires Solvers to occasionally report their false solution, as noted in Step 2 above. This reporting of a false solution is called a Forced Error. When a Verifier discovers and reports this false solution from the Solver, they are awarded a very large monetary Jackpot. Thus, Verifiers know that there are false solutions on the network that have big payouts, and so are incented to participate continuously in the network in order to find them, and are incented to actually do the work of verifying, not just pass all results.
Note: the Jackpots and Solver fees are paid by the task submitters, who pay a tax for every submitted task.
Use Cases for TrueBit
There are many use cases for TrueBit and its ability to complete and verify complex calculations in a decentralized network. Several are already in development. Some of the more popular use cases are:
- Outsourcing computational power off the Ethereum blockchain (as described above)
- Trustless, decentralized mining pools
- Accessing and manipulating massive amounts of off-chain data
- Transcoding video
- See the TrueBit website for more
The above is a simplification of the TrueBit whitepaper, and probably leaves you with many questions. How does the system protect against threats? How does the system keep actors from maliciously playing both Solver and Verifier? For answers to these questions and more, the white paper is a great next step.
Resources for TrueBit
How about giving some claps?
If you enjoyed this article, feel free to clap many times or share with a friend. This lets me know my work is helping, and encourages me to write more.
Also - if you’d like to see more of these 🍌Banana Papers, comment below and let me know which blockchain projects you are interested in, and would like to understand a little better.