Cartesi is a second layer project (Layer 2) that seeks to offer advanced functions for the creation of dApp through a verifiable distributed computing system, supported by blockchain technology and with enormous scalability and security capabilities.
El world of dApps it is transforming rapidly, and more and more projects are interested in it. One of them is Cartesi, a second layer project (Layer 2) that is focused on offering unique capabilities for the deployment of advanced dApps under the concept of verifiable distributed computing, a revolutionary concept that can radically change the way we interact and how dApps work in blockchain ecosystems.
What is Cartesi?
Cartesi is a platform specialized in the deployment of dApps through a Layer 2. The intention of this project is to allow dApps to be executed on-chain and off-chain, with the same results thanks to the fact that their operations can be completely verified once they reach the network.
To achieve this, Cartesi uses a hybrid system that allows operation of nodes at the on-chain and off-chain level. The on-chain operation is identical to what we can see now on platforms such as Ethereum (ETH) o Left (LEFT), where the dApps is in one or more smart contracts distributed in several addresses of the network, and to which we can access to interact. The execution of this type of dApps is possible thanks to the Cartesi Machines, which are nothing more than "reproducible machines" that are in charge of executing the dApps code and under any circumstance, offer an identical result that is later verified by the network actors and stored in the blockchain.
However, Cartesi Machines allow that these dApps can also be executed off-chain and then when they have a connection, send that data to the network for verification. In this way, it is possible to use dApps in an off-chain way, carry out the operations that we want and, in the end, send all this data so that the network verifies it and includes it in the history of the blockchain in a safe way, given that if a fault is found, it can be corrected without problems.
The positive side of this operation offered by Cartesi is that its "reproducible machines" can use all the available processing power of the nodes and devices that are connected to the network. That is, we can use the power CPU, GPU and other computational resources that we have, making the execution of smart contracts extremely fast.
History of Cartesi
Cartesi (CTSI) is a project that began in 2018 thanks to Erick de Mora, Augusto Teixeira, Colin Steil and Diego Nehab. Of these four characters, Augusto Teixeira is a well-known figure in the crypto world, as he was one of the creators of IOTA. The initial idea behind the project was to take the best of IOTA's capacity, its very high hardware integration and take it to an extreme applicable to new fields of blockchain technology such as AI on blockchain, or distributed computing system without trust. That was the seed of what would later become Cartesi.
The idea caught the attention of two large companies: Microsoft y ETH Zurich, who already had experience in the field and who saw a unique opportunity to investigate a new technological field. The result of all this effort was to create a reproducible blockchain system (where Microsoft contributed its knowledge) and that uses a free architecture and on which they could support its development (where ETH Zurich is a great industrial known for its support to RISC-V and the creation of other initiatives free of RISC-type architectures).
This is how the project evolved into a two-tier infrastructure in the fully versatile Linux environment. This with the aim of overcoming the main scalability and infrastructure problems for applications executed on the blockchain.
How does Cartesi work?
Cartesi (CTSI) is a blockchain project that allows creating highly scalable decentralized applications. To achieve this, Cartesi creates a hybrid operating structure in which:
- There is a blockchain (second layer) where data on transactions and smart contracts deployed on the network are shared and stored. This network works thanks to the consensus protocol of Proof of Stake (PoS) and which is powered by the native CTSI token of the type ERC-20 deployed on Ethereum.
- There is a reproducible machine (Cartesi Machine), capable of operating off-chain and on which smart contracts are executed separately from the rest of the network nodes, lightening the consensus load, which improves the scalability and general response speed of the network.
All this while being built using free, secure, private, portable technologies that guarantee decentralization at all times. In this way, Cartesi can offer us powerful, flexible dApps with capabilities not seen so far. But how does all this work?
What is a playable machine in Cartesi?
We can assimilate a reproducible Cartesi machine as a set of software that is capable of perfectly mimicking the operation of a computational machine, and that meets three conditions:
- It is that said machine or set of software can be built from scratch by two or more individuals, in different conditions and locations, without communication with each other, and obtain as a result the same set of software and the machine related to it.
- If we execute the same set of instructions on all those built machines, regardless of the conditions, the end result will be the same.
- The final result may be verifiable in each of its steps, and it will have both temporary and cryptographic stamps that help to prove its validity on any other reproducible machine of its type.
All three conditions can be difficult to understand, so let's look at it with the following example:
Suppose we have the instructions to build a calculator. Those instructions tell us how the calculator software and hardware should work at all times. Motivated by curiosity, Carlos, Ana and Miguel each decide to build a calculator in their respective houses using these instructions. Result? They have built them, the calculators are identical both at the software and hardware level, and any operation they perform on them has the same result no matter which calculator it is performed on. They are all reproducible machines.
Importance of reproducible machines
Sure, the example is simple, but it gives you an idea of what a reproducible machine is and how useful it is. In fact, humans have always looked for reproducible patterns for different things. For example, at first we try to make time measurements using the Sun, then we switch to mechanical, electromechanical, and even nuclear devices. Of all of them, curiously the most reproducible is the nuclear one, because the nature of the atom makes it possible to create a machine that indicates the value of one second with unimaginable accuracy.
The same thing happens in computing. Programs as common as Firefox or Chrome comply with the "reproducible construction" paradigm that allows These programs can be built through a series of instructions and that, in the end, the construction can be exact to any other that is made of the same program and version.
All this is very useful as an "anti-cheat measure" since, being reproducible, we can easily recognize if the program, machine or result has been altered, which helps us to increase security at all times. Cartesi does the same, generates reproducible software and machines, which guarantees us that you cannot cheat, and unites this functionality to all the security that blockchain already offers us, without a doubt, one more step in favor of security.
What is inside each Cartesi Machine?
Each Cartesi Machine is actually a virtualized machine using the RISC-V architecture. This virtual machine is written in C / C ++, in order to provide the highest possible speed and access to hardware. In this way, a Cartesi node runs a Cartesi machine using all the potential that the hardware on which that machine runs can provide.
To interact with the machine, Cartesi has designed a gRPC interface (similar to the one used by Ethereum with its RPC Web3) and which allows remote control of the Cartesi machine. This interface is our gateway to interact with the machine and the smart contracts that run on it.
Like any machine, the Cartesi machine has a processor, memory, storage and other elements that work through virtualization, and that are capable of direct access to hardware if it is allowed to do so. In any case, the virtualized machine is controlled by a Linux operating system, which is in charge of performing all the operations that are requested: from starting the machine to loading the smart contract that is stored in it.
Instruction of Cartesi machines
Now, we know that Cartesi machines execute code that we offer them. But what code do they execute? Well, if in Ethereum they use Solidity for their smart contracts, in Cartesi you can use any language you want.
Cartesi machines are not limited to a language they can use whatever they want, as long as it is supported by the system. This is possible because each Cartesi machine is actually a reproducible build of a Linux operating system using an architecture known as RISC-V.
The use of RISC-V is consistent with making the Cartesi machines very portable and small in size, and the use of Linux helps to make the system generation free software and with rapid development. Also, the choice helps that dApps can be generated using languages like C / C ++, Python, Lua, Perl, and even Vala. To this you can join well-known frameworks such as GTK, QT well known in the Linux world or .NET Framework, developed by Microsoft. And that is only part of the possibilities of this system.
Ultimately, Cartesi allows dApps developers to use all the programming languages, tools, libraries, software and services that they are already familiar with and that are supported by the architectures available on Cartesi machines. That way, by moving most of the complex logic of their dApps to portable off-chain components, developers free themselves from the limitations and idiosyncrasies imposed by blockchains. In this way, Cartesi allows developers to select the best runtime environment in which to host each part of their DApps.
Advantages of Cartesi machines
What advantages does all this bring us? Well, among them we can mention:
Scalability
DApps run inside Cartesi Machines can process virtually unlimited amounts of data, and at a rate more than 4 orders of magnitude faster. This is possible because Cartesi Machines work off-chain, free from the overhead imposed by the consensus mechanisms used by blockchains.
In a typical scenario, one of the parties involved in a dApp will run the off-chain Cartesi Machine and report its results to the blockchain. Different parties do not need to trust each other because the Cartesi platform includes an automatic dispute mechanism for their machines. All interested parties repeat the calculation out of the chain and, if their results do not match, they enter a dispute. The mechanism ensures that an honest party will always win over any dishonest party.
To enable this dispute mechanism, the Cartesi Machines run inside a special virtualizer that contains three unique properties:
- Cartesi Machines are self-contained: They are run isolated from any external influence on the calculation;
- They are reproducible: two parties that perform the same calculation always obtain exactly the same results;
- They are transparent: they expose their entire state for external inspection.
Productivity
Thanks to the fact that Cartesi is able to "liberalize" the development of dApps using known and well-established tools, in addition to accessing the full potential of the hardware where it runs, it is possible to improve productivity both at the level of development and use of said dApps. .
Cartesi has chosen the RISC-V architecture because it considers it a mature, fast and promising architecture. RISC-V is the first processor architecture that was not born in the bosom of a private company, but of a university, UC Berkeley, and whose ISA (Instruction Set) is completely free. RISC-V is strongly supported by its community and a group of companies seeks to make this architecture a strong opponent to ARM (the architecture of smartphones and Macs) and X86 (that of PCs and laptops).
Cartesi CTSI Token
The Cartesi token (CTSI) is the token in charge of operating the sidechain network that unites all the nodes of the Cartesi network. This sidechain network is called Noether, and is powered by a Proof of Stake (PoS) type consensus protocol.
Among the functions of the token we can highlight:
- It serves to give rewards to the stakers who support the network with their tokens.
- The nodes use CTSI to measure their voting power and thereby choose who will be the validator of transactions for a block in their history.
- It is used for the payment of commissions within the network.
- Allows use in dApps on the Cartesi network.
The total supply is limited to 1.000.000.000 CTSI. Of this total:
- 25% of the tokens are destined for the reward system.
- 57,33% goes to the network team, advisers and the foundation's reserve.
- In 2017, 2% of the total supply was sold in an ICO during the entire month of August.
- Two years later, in a “Private Sale Token” 5% of the total supply was sold. In the same year, 200.000 USD were raised in a “Strategic Sale Token” with 0,67% of the total supply of tokens.
- Finally, the remaining 10% was allocated to a "Launchpad Sale" where $ 1.500.000 was raised.
Conclusions
Cartesi is a one-of-a-kind project with capabilities to make concepts such as AI and Machine Learning on blockchain, building self-contained computational clouds, metaverses and more come true, in such a way that its execution would be hundreds of times faster than following the operating scheme that blockchains currently have.
It has a complex construction, but with a huge projection demonstrated in projects such as books, Creeps o simracer. In any case, it is a technology that still needs to evolve and continue to improve in order to exploit its full potential.