
IOTA’s Qubic explained #2
After the teaser on the 3rd of May, the IOTA Foundation has now revealed the full meaning behind the long-awaited Qubic project. In my previous blog, I explained the individual components that were teased: Oracles, Smart Contracts, and Outsourced Computation. The explanations still hold true as the details of Qubic seem to work as I assumed. However, a lot more information has come to light about the implementation details of Qubic. The concepts are very hard to understand, but in this blog, I will try and explain it in an easy to follow way.
Qubic explained
So far, IOTA is used as a platform for feeless transactions with great scalability. With the introduction of the IOTA Data marketplace, Internet of Things (IoT) devices could start sending data to the Tangle. The data could be purchased by other individuals or devices for applications like machine learning. However, that would all be done outside of the IOTA environment. With the new Qubic release, IOTA can serve as a platform for data gathering, processing and even allow systems to respond to the results, without the need for any servers or third parties. The IOTA Tangle was developed to become a platform for Qubic, which means that Qubic is the big second step in the vision of the IOTA Foundation for IOTA. The new Qubic protocols require a distributed ledger with zero fee transactions and data transfer capabilities, which is what IOTA is today.
Currently, IoT devices can upload data to the Tangle in data streams. In addition to IoT sensor data, the data on the Tangle could come from external sources like a news feed or even human input like lab observations or bird spotting. All sources of external information are called Oracles. Some Oracles might already compress data from a set of other Oracles, enriching the data and creating a new source of information for applications. The problem with basing decisions on external data sources is the fact that these Oracles have power over your decision making. Therefore, we need to either only use Oracles we trust, or acquire data from multiple Oracles and try to find out what the true data is.
Finding such a consensus among the Oracles can be done through a smart contract, which is called a Qubic. A Qubic is a piece of code that receives input data and outputs a conclusion. However, the calculation is executed on a set of machines to achieve a truly trustless application. Oracles that execute the Qubic code are called Oracle Machines. The entire set of Oracles that execute the Qubic is called an Assembly. Once 66% of the Assembly comes to the same conclusion, the Quorum (minimum number of agreeing Oracles to reach consensus) is reached and the result of the Qubic is outputted to the Tangle. The result of one Qubic can possibly be fed into another Qubic, triggering the execution of the second Qubic. This allows the creation of a cascade of Qubic function calls that together can resolve complex tasks. Anyone can add to the cascade of Qubics and therefore the Qubics don’t require a single owner. For example, a transportation company may have set up a traffic prediction Qubic using a cascade of Qubics to process traffic Oracles. Another party might want to further process the traffic predictions to calculate the best time to do road constructions. They do this by automatically executing their Qubic based on new information received from the traffic prediction Qubic.
The code for all these Qubics will be written in a completely new programming language called Abra, developed by the IOTA Foundation. Abra is a functional programming language that avoids global states. Given a constant input, every device will output the same values. This is a lot easier to debug and platform agnostic, hopefully preventing costly smart contract issues that have happened before. Abra is made to work optimally with trinary computers. Our next IOTA Deepdive blog will explain why this is important.
Protection against dishonest Oracles
A Qubic smart contract will only be executed in the Assembly, where other smart contract platforms will execute the code on every node on the network. This is great for scalability and reduces the costs for the creator of the smart contract. However, this does reduce the security as smart contracts use the concept of trust in numbers (more executing nodes = less chance of cheating). Fortunately, the Qubic protocol has several mechanisms to decrease the chances of dishonest or cheating participants who reach a Quorum with incorrect or copied results.
In my previous blog, I hypothesized that Qubics might be free, due to the nature of feeless transactions on the Tangle. It turns out that execution of Qubics does cost money. Every Oracle that has helped reach Quorum using the accepted truth is paid for participation, while Oracles who were “dishonest” and outputted the wrong result do not get paid. The total costs of executing the Qubic depends on what the creator is willing to offer, and the Assembly can decide if they find the payment sufficient. This is a basic supply and demand model that is also found in blockchain fees. The Oracles collect this fee, which allows anyone with spare hardware to run an Oracle and receive money in exchange for there computational power. In essence, this is like mining, but while actually doing a useful task!
The creator of the Qubic can choose which Assembly they want to run their Qubic on. The decision will be based on the size and reputation of the Assembly. A bigger Assembly will have more individual Oracles, which decreases the chance of a cheated Quorum result. However, having more participants also requires you to pay more Oracles, thus increase the expenses. The payment of honest Oracles is a great incentive to both run an Oracle and keep it honest. In addition, the Oracle might not be in the same Assembly all the time. An Assembly can change in size based on a vote between Assembly members and this might even give an Assembly the ability to kick out dishonest participants or increase in size to reduce the effect of the known dishonest participants.
To prevent malicious actors to split their hardware into multiple Oracles within the same Assembly to create more voting power, the Qubic protocol has a resource test. Depending on the Assembly, the resource test will benchmark the hardware of the Oracle by requesting a stress test. For example, to measure computational power, an Oracle must complete as many Proof-of-Work puzzles in a set timeframe. If a malicious actor would run two Oracles on the same hardware, the performance would half for each Oracle. The performance of the Oracles determines the size of their vote to reach a Quorum. Thus, making it irrelevant if a malicious actor has multiple Oracles on the same hardware. Lastly, the system prevents Oracles from copying the results from other Oracles, using a commit and reveal design. All Oracles submit their findings first in the form of a hash of the result and a hash of the result concatenated with a unique random number. This makes copying the results impossible and forces the Oracles to come up with there own answers.
Business implications
Although the Qubic project has now unveiled its details, we are still far away from a working implementation. The project is the top priority for the fast-growing IOTA Foundation, meaning we will see regular updates. What we do know is that it is going to have a big impact on many industries. Any company which is interested in trustless applications should have a look into IOTA and Qubic. In addition, IOTA and Qubic add a lot of new options for revenue streams. IOTA already allowed businesses to sell their (enriched) data, but with Qubic, companies can set up an Oracle to sell their computational models as well! We could even go a step further and expect the distributed computing to train and improve machine learning models and turn these into profitable Oracles, without the need of high-performance hardware.
Another technology that might be disrupted is the trend of serverless computation and microservices, which is popular in IoT, as Qubics are very similar. However, Qubics have an inherited feeless payment protocol and are decentralized, therefore removing the influence from the cloud providers. Companies that currently work on any blockchain/DLT use case should reconsider using IOTA for all the advantages. IOTA with Qubic allows free transactions and relatively cheap execution of smart contracts. It is also a fact that IOTA and Qubic both scale and are future proof, allowing companies to prepare for bigger use cases that won’t be halted by the limitation of blockchains like Bitcoin and Ethereum.