Cartesi Review (CTSI): Scaling Ethereum Smart Contracts
As the DeFi revolution continues to grow and Ethereum becomes an increasingly important network, there has been a huge amount of attention placed on increasing scalability and lowering fees for the smart contracts used in such transactions.
One innovative development team running the Cartesi project is looking to improve smart contracts by solving the urgent issues of high transaction fees and a need for scalability in the Ethereum network.
It is accomplishing this by using a variant on Optimistic roll-ups and more importantly is revolutionizing smart contract creation by allowing developers to code with more mainstream software stacks rather than Solidity.
Smart contracts are important to understand as they have limitless potential and astronomical use cases as they allow traditional sectors to be ported into blockchain. To learn more about them, check out our educational piece: What are Ethereum Smart Contracts.
Developers have been well aware for some time of the difficulty in building dApps given the currently available blockchain technology. Cartesi is developing a solution that will have dApps running all their complex and expensive computations off-chain, removing the prohibitive blockchain costs and the other limitations imposed by blockchain technology.
In fact, the dApps built using Cartesi are cable of executing computations that are millions of times more intensive than if they were running on-chain.
Cartesi is accomplishing this by offering a Linux runtime environment. This has made it the only software-based verifiable off-chain compute system. By using Linux developers now have the option to use the vast selection of software that’s been developed over the past 3 decades and that runs many of the internet applications in use today.
There are a number of features that make Cartesi an attractive development environment. Below are three of the main features that recommend the use of Cartesi in dApp development:
- Real world computations meet the blockchain: The blockchain wasn’t developed with intensive computations in mind. These demanding types of computations need a realistic platform. With Cartesi external computations can be run externally using a RISC-V processor under the Linux operating system. This allows developers to use all the tools, services and libraries that have been developed for Linux over the past 30+ years.
- Portable across multiple blockchains: Cartesi nodes are unaware of what blockchain is using it for computations, making it capable of running computations for any blockchain. This removes the details of the blockchain, allowing the computations to become isolated. In turn this makes them portable, while also providing immutability and security, and allowing for the deployment of a payment system.
- Guaranteed consensus: The computations being run outside the blockchain can easily be verified by any party involved. When disputes arise they are sorted by Cartesi automatically. This also keeps any necessary computation within the blockchain to a minimum.
Cartesi’s Scalability Solution
With Cartesi dApps are capable of running any computations without worrying about transaction fees and other blockchain limitations. Plus all of the computations done inside the Cartesi node are reproducible and verifiable. This maintains the decentralization necessary for the blockchain, as well as the security guarantees of the blockchain. Local consensus is achieved within the node, with any disputes being handed off to the main chain for resolution.
This makes Cartesi an off-chain scalability solution. Scalability has been a key issue for blockchains in their current evolution, since the lack of scalability has been a limiting factor in the large-scale adoption of dApps. With the obvious need for scalability on the infrastructure layer there are a good number of public blockchains that have focused their development efforts on solutions to the scalability problem.
Currently these projects are primarily working on two types of solutions to the scalability problem: Layer-1 solutions and Layer-2 solutions.
In Layer-1 solutions the scalability of the blockchain is improved by implementing changes to the underlying mechanisms. Some examples of this are the projects that are implementing sharding solutions, or those that are looking for ways to improve the consensus mechanism.
Layer-2 solutions are different because they look to solve the scalability issues of the blockchain off-chain. In this way it’s possible to call any of the projects focused on side chains, Plasma solutions, and state channels peers of Cartesi. This makes the competition in this solution quite fierce, but as of early 2021 there hasn’t been any ideal technical solution proposed and brought to market.
Cartesi hopes to be the first in its unique method to improve scalability. That involves performing the complex calculations off-chain to create a trusted node environment, and then resolving any disputes by providing incentives for verifying the results of the computations.
Cartesi Node Off-Chain Local Consensus
One of the problems with blockchains is that they run very slowly when compared with other software solutions. This lack of speed is because the blockchain requires many computers to reach consensus. Global consensus like this is very time consuming, and quite expensive besides. And of course this complicates the issue of scalability as well.
However any decentralized app doesn’t need to reach global consensus, it only needs to reach local consensus in most cases. This allows a solution like Cartesi to split the vital on-chain processes from the less important process and run these in the Cartesi VM. By using local consensus where possible, which is the majority of computations, Cartesi can reduce the cost of dApps while also increasing the speed.
And the Cartesi VM is not exclusive. It is complimentary to Ethereum 2.0 and to other Level-2 scaling solutions. These include side-chains, ZK-proofs, state channels, and plasma. All these other Layer-2 solutions are able to specify “full Cartesi computations within their transactions.”
Cartesi’s Decentralized Gaming
So far there have been two approaches taken with decentralized gaming. The first solution uses the blockchain to interact with NFTs. The second uses fully decentralized gaming logic to offer a provably fair gaming solution. This second type is preferred for situations such as tournaments since it prevents any cheating.
With a decentralized logic game there is no need to use a central authority to verify scores. Even better, this type of game is open-source in nature, which allows other developers to create forks of the game. Plus they can even be governed in the same manner as a DAO.
One fun way that Cartesi is demonstrating this technology is through a tower defense game is has created called Creepts. It is the first fully decentralized tower defense dApp, and by using decentralized logic the outcome of the game is provably fair.
And because Creepts is built on a decentralized Linux platform it is able to use extremely heavy computational loads, which just wouldn’t be possible if running the game on-chain. Because the game is being run on a Layer-2 solution it is both inexpensive and fast. While this and other dApps are in the gaming and gambling space, there are many other use cases for Cartesi. These include AI marketplaces, logistics, and DeFi.
The Cartesi Core
We’ve talked a lot about the off-chain side of Cartesi and how it can improve speed and cost, but Cartesi uses a hybrid on-chain / off-chain approach. Most computational work is done off-chain, however vital tasks such as payments remain off-chain. The full system is comprised of three primary core components: Cartesi Nodes, Cartesi Machines, and The Cartesi Data Ledger.
What is a Cartesi Node?
The Cartesi nodes are where all the off-chain components and computations of an app are contained. Nodes are comprised of both hardware and software. In order to run any app on Cartesi users are required to interact with the nodes. Within each node is a Cartesi Machine, which is a type of virtual machine running distributed Linux. All of the decentralized logic for the app is run and replicated in the VM.
What is a Cartesi Machine?
As mentioned above, the Cartesi Machine is a virtual machine contained within the Cartesi Node and running a decentralized version of Linux. All of the computations that are handled by the Cartesi machine are reproducible and verifiable. The core of the Cartesi Machine is able to determine which computations need to be reproducible and which do not and it divides them accordingly. By dividing the computations in this way the Cartesi Machine is able to bring the speed and storage capacity of the system in-line with other modern systems.
The Data Ledger
While Layer-2 projects solve cost and speed issues, they do have a data availability problem which occurs if one of the parties goes off-line in the midst of a transaction. Cartesi fixes this issue by adding a Proof-of-Stake side chain they’ve called the Data Ledger. This data ledger side chain is used for a number of things, including “short term storage, garbage collection, sharding, off-chain emulated computations, and localized consensus.”
Potential Use Cases of Cartesi
As we’ve already seen Cartesi is able to run Linux, to complete massive amounts of computation, and to build scalable dApps. While its current most visible usage is the creation of the Creepts tower defense game, Cartesi has uses that extend far beyond just gaming. It can be used to improve the performance of any type of app, which extends its utility to any niche, including:
- Decentralized Finance (DeFi)
In addition to the tower defense game Cartesi has also released two products specifically for the developer community: Descartes and Noether.
Descartes is an SDK enabling developers to code their smart contracts using Linux instead of Solidity. This makes it easier for developers who aren’t familiar with Solidity, but who may have been using Linux for years, if not decades already. Creating and deploying applications using a familiar programming language can significantly reduce development time.
Descartes can make dApp logic processable in an off-chain operating system that can significantly reduce smart contract costs.
Noether is the other developer product that’s been created by Cartesi. Noether is a sidechain that’s been developed for short-term data storage, specifically for the Cartesi dApps that are meant to run on Ethereum. Noether is helpful because much of the data used when interacting with an app only needs temporary storage.
With Noether developers will have access to inexpensive storage with a high throughput on demand. It is Noether that will convince devs to deploy dApps using Cartesi, in the knowledge that they won’t be crippled by rising storage costs or transaction bottlenecks.
CTSI Reserve Mining & Proof of Stake
The Cartesi team spent the fourth quarter of 2020 working feverishly in order to deliver CTSI Reserve Mining and the Proof of Stake system. Just short of the end of the year, on December 27, 2020 the CTSI Reserve Mining and the Proof of Stake system went live on the Cartesi mainnet. Cartesi also provided a detailed guide on How to Stake and Run a Node if you’re interested. In a nutshell the system provides:
- Miners get a reward of 2900 CTSI per block claimed. On average, each block is created every 30 minutes.
- User’s funds are safe with while held on staking contract, duly audited by SlowMist.
- No slashing and no risks to the principal due to node malfunction or unavailability.
- Rewards distributed directly to the user’s wallet, eliminating extra ETH transaction fees.
CTSI Reserve Mining was implemented as a means to bootstrap the Noether side-chain and provide users with a highly optimized data availability oracle for temporary storage. This will become a very important part of the scalability stack planned by Cartesi.
Once that’s complete the final planned phase of Cartesi staking will be the innovative staking auction system being planned. This system will bring a number of benefits to stakers, such as being able to define their opportunity costs and staking rewards ahead of time.
Here’s the planned timeline for the complete staking system:
- December 2020: Proof of Stake Mainnet launch
- 2021 Q1 : Delegation system
- 2021: Noether, Cartesi’s optimized data availability oracle
- 2022: Innovative macroeconomy system with staking auctions
The Cartesi team has a very detailed description of the completed CTSI macroeconomy, but the short version is as follows:
Cartesi Side Chain node operators can stake cartesi tokens by buying staking rights. These staking rights keep CTSI locked until the end of a staking cycle after which it pays the owner the locked principal plus a reward in CTSI. Staking rights are acquired through periodic Dutch auctions and give the owner the rights to execute rewarded mining tasks until their expiration date.
The Cartesi Team
The Cartesi project was started in 2018 by four co-founders: Erick de Moura, Augusto Teixeira, Diego Nehab and Colin Steil. The four originally became interested in blockchain due to Augusto Teixeira being friends with IOTA’s founder Serguei Popov. Once Cartesi was started Popov became one of the earliest investors and advisors in the project.
The initial idea put forward by Augusto was to create a trustless AI marketplace for data scientists. However once the project was underway the team came to realize that they were broadening the scope and Cartesi evolved into a Layer-2, Linux-based solution to the problems of scalability and computation for blockchain dApps.
Now the CEO of Cartesi is Erick de Moura, a serial entrepreneur and technical leader with over 20 years in the software industry. After graduating with a Bachelor’s degree in Electrical Engineering he went on to various software design and development roles over two decades.
- Augusto Teizeira, who had the initial idea for Cartesi, remains as its Chief Scientific Officer. He is also a professor at the Instituto de Matematica Pura e Aplicada (IMPA) in Rio de Janiero, Brazil. Augusto has a PhD in Mathematics from ETH Zurich and has spent his career in academia.
- Diego Nehab remains with Cartesi as its Chief Technical Officer and also serves as a researcher at IMPA. He has a PhD in Computer Graphics from Princeton University, and early in his career he worked as a researcher at Microsoft.
- Colin Steil is the Chief Operating Officer at Cartesi. He was a graduate of the University of Alberta with a degree in International Business and Fianance and has held a number of roles in venture capital firms with an eye towards helping technical startups.
The CTSI Token
The Cartesi blockchain achieves consensus through Proof-of-Stake and is maintained by a network of Node Operators. In this scenario the native token of the blockchain is a crucial element in making the system work. The CTSI token provides all of the following:
- Staking — Since block generators will be selected in proportion to their stakes in the economy, there needs to be a way to query and lock everyone’s balance in the system.
- Election of block producers — The miners will be selected to propose blocks in proportion to their token balance, so that the network is run by a pulverized community of stakeholders.
- Slashing — Bad behavior is disincentivized by locking and potentially slashing the tokens of dishonest actors.
- Transaction fees — Although the Side Chain is orders of magnitude cheaper than the underlying main chain, users or DApp developers still need to pay for their transactions to be processed, transmitted and temporarily stored by others. These fees will be paid to Node Operators with the CTSIToken.
- Challenge computations — The CTSI token will also be important in order to challenge computation results posted on the blockchain. This will work as an exit mechanism that guarantees the correct execution of DApps and discourages bad behavior.
The CTSI token has a total supply of 1 billion tokens, and a circulating supply of 215 million tokens currently. The team has held several private sales in the past, raising a total of $800,000 through those private sales. In April 2020 there was an ICO where 100 million CTSI tokens were sold for $0.015 each which raised an additional $1.5 million for the Cartesi team.
The CTSI token was listed and began trading just after the ICO on April 24, 2020. It opened at more than 200% above the ICO price, trading above $0.05 for the first few days. It quickly dropped under $0.03 within weeks, but then rebounded and on August 18, 2020 it reached an all-time high of $0.1298. It hasn’t dropped below $0.03 since then and as of February 2021 is trading at $0.06770.
Most of the trading volume in the token can be found on Binance, although there is also a decent amount of volume on Bilaxy too.
Given the heavy emphasis on scalability, and the fact that Ethereum 2.0 scaling will likely take years to achieve, the Layer-2 scaling projects like Cartesi are in demand and very popular.
Cartesi appears to be able to fix Ethereum’s scaling problem, and in addition to that it makes life easier for most developers by allowing them to code dApps and smart contracts using Linux instead of Solidity.
Cartesi allows for far greater computational power, without a loss of security. This is almost guaranteed to drive up the creation of next generation dApps that can take advantage of the increase in computational power, and the far lower fees.
Because Cartesi is functioning on a Proof-of-Stake consensus mechanism the demand for the CTSI token should increase as more dApps are added to the ecosystem. While it’s true that 1 billion tokens is a large supply, the majority of those are held back for mining rewards and to support the foundation and the future growth of the Cartesi project.
The founders are all very experienced and extremely capable individuals, and having the association with IOTA and its founder Serguei Popov can only help the project in forging connections with other blockchain projects.
As long as the team continues to deliver results there seems to be little to criticize with the project. It provides a useful technology and a critical piece of the scalability puzzle. Through Cartesi developers should be able to create far better dApps, which in turn should speed the adoption and growth of the entire ecosystem.
Disclaimer: These are the writer’s opinions and should not be considered investment advice. Readers should do their own research.