May 06,2023 ·
12 min read
Page last updated 14 minutes ago
High compute costs have held back blockchain adoption and use cases
In the bull markets of 2021 (or Pepe season May 2023), when everyone was talking about crypto and sending out millions of transactions on Ethereum, gas prices could reach as high as 200 or more Gwei. That meant if you wanted to send 10 USDC to someone on Ethereum, it would cost you $50 or more. Not a very good deal.
With many new users of the blockchains, the demand for block space skyrocketed. This surge in gas prices on Ethereum (and other chains) exposed the limitations of monolithic blockchains. The public was ready — but the technology was not.
To address this issue, a shift to modular design emerged with “layer 2” solutions, a set of technologies built on top of a base blockchain that increases scalability and cost-effectiveness. As per Polynya’s article, “all blockchains worth their salt will pivot away from purely monolithic, in some way or another, over the coming years (unless the scale is not required, like Bitcoin).”
Starknet — a validity (or zero-knowledge) rollup — is a leader among these layer 2 solutions and has massively decreased the cost of computation. In this article, we’ll explore how high compute costs have held back blockchain, and then look in detail at several new use cases now possible through the cheap computation costs of Starknet.
The great thing about rollups is that they derive their security from Ethereum L1 (thus utilizing a decentralized network of over 600k validators). However, they also offer much faster and cheaper execution than a transaction on the mainnet. They achieve this by performing the computations outside of layer one (where computation is cheaper), but periodically posting the state of the L2 on the mainnet (to keep the security of the mainnet) as a bundle (hence “rolling up” the transactions).
Starknet is a validity rollup (commonly known as a zero-knowledge rollup) developed by StarkWare that uses cryptographic systems called STARKs to achieve decreased computation cost.
Today, the mainnet version of Starknet already has transaction fees much lower than Ethereum.In version 0.13.0 (expected to release in Q3 2023), Starknet’s transaction costs are expected to go down even more with the introduction of Volition (or off-chain data availability). Currently, 95% of the transaction fees on Starknet are due to the transaction costs on Ethereum Mainnet (the rest 5% is compute). Furthermore, once EIP 4844 is implemented on Layer 1, the team will push upgrades to adapt to it as soon as possible. As a result of these 2 upgrades, the transaction costs are expected to go down drastically.
Aside from the outrageously high fees just to send tokens, there are other issues with high compute costs. Even today, many applications are limited in their use cases due to this high computation cost. And as blockchain technology continues to evolve, the demand for complex computations will increase. The high compute costs are creating limitations on the growth and adoption of decentralized applications. For example:
However, if we can achieve cheap computation, we open a new set of blockchain use cases. Starknet is already live on mainnet and processes tens of thousands of transactions daily (with more than 7 million transactions done to date). As mentioned, once EIP-4844 is integrated, the cost of transactions will go down by orders of magnitude.
Let’s look at some of the use cases this cheap computation on Starknet enables.
The simplest of all is that with cheap transactions comes day-to-day usage. Paying for your coffee now only costs you a couple of cents (or even a fraction of a cent). Additionally, due to account abstraction, your crypto wallet functions similarly to a traditional wallet. Much like keeping the bulk of your finances in a secure savings account, you store most of your assets in a wallet with multiple security layers (e.g., requiring a trusted individual to co-sign large transfers or using a unique private key).
With the introduction of cheap on-chain computation, oracles will look much different than today.
First, frequent updates of oracle feeds become possible since individual transactions cost much less. This will result in more accurate data feeds and will enable more use cases for the users to build markets based on this data (complicated options protocols, prediction markets, etc.).
Since Starknet is a rollup, it needs to periodically send a commitment on Ethereum mainnet to update the state of the rollup (generally the gap between commitments can be from a couple minutes to hours). This commitment is one of the significant costs that a user pays when paying transaction fees on an L2. However, rollups must only commit the latest state to the L1. Overwriting the same storage slot multiple times in a single block does not incur high storage costs. In case of oracles, if some variable (e.g. the price of some asset) is updated frequently within the same commitment, the L1 cost would still be equivalent to a single write, as only the final state is published to mainnet as calldata.
Computational feeds — or feeds of aggregated and computed data — become possible due to the cheaper cost of execution. In traditional finance, financial applications utilize sophisticated data feeds, including risk, yield, and volatility. Teams like Pragma are working on bringing these feeds to web3. Pragma already has two computational feeds live on Starknet testnet — a volatility index and a yield curve.
The utilization of storage proofs will also change the landscape of oracles. Storage proofs are a cryptographic way to keep track of storage. Using these cryptographic commitments makes it possible to trustlessly prove that a particular state existed at a certain time (or at a specific block, in the case of blockchains). In order to verify these proofs, computations are needed (though they are very light), and cheap computation will enhance the UX. With storage proofs, it becomes possible to transfer information between different chains in a decentralized manner, offer historical data from the blockchain, and much more. If you want to dive deeper into storage proofs, check out our Medium article.
The world of gaming is immense. The largest gaming market, the USA, generates a whopping 54 billion USD per annum in revenue from gaming. Blockchain games have been in the spotlight recently, but as previously discussed, those games mainly belong to “web2.5” rather than being actual “web3” games.
In order for games to be actually considered a blockchain game, they must:
For the game logic to be completely on-chain, cheap execution is essential.
For the game to be considered a web3 game, an elementary “litmus test” could be whether the game could survive if the developers behind the game suddenly disappeared. This is very similar to how a smart contract lives on-chain; no matter if the developer of the smart contract is still active or not, the game should continue. Different interfaces could be built on the game logic if the basic game mechanics and rules are on-chain. The developers, on the other hand, would be incentivized to build with game-specific tokens. Even though no major game is currently wholly built on-chain, multiple projects on Starknet are working in the right direction, including Realms, and Influence.
Ecosystem developers like Dojo are working on providing an open-source ECS (Entity-Component-System) framework for the Starknet ecosystem. An ECS framework is a basic design pattern used to build games in a modular way. For example, for the case of Mario Kart, Mario and his car would be entities, the position and velocity of the cars would be components and the logic for car collisions would be implemented as a System. The game developer would then use these components to build the game. Projects like this are needed as the ecosystem grows, and more game developers are joining to build games on Starknet.
With the recent buzz of artificial intelligence, it seems that AI may soon be integrated into our digital being. While it’s not a sure thing that AI models will be put on-chain, there are several reasons why this could be beneficial. And cheap computation is a must for these use cases.
In the near future, Starknet’s roadmap focuses on performance and a better UX. Increased throughput, reduced latency and lower transaction fees are expected by Q3 of 2023. For more details on the plans for development, you may refer to the roadmap given here.
Cairo is designed specifically for STARK proving, making it optimal for harnessing the benefits of algebraic proof systems and ensuring efficient computation and verification processes.
Starknet is engineered for scalability, ensuring that it can accommodate exponential growth without sacrificing security, or decentralization.
With the intensive research around the “modular blockchain” space, the “bringing one billion users” goal is getting closer and closer. And with Starknet, cheap computation is here, and it’s only getting cheaper.
The growing Starknet book offers an excellent starting point for developers embarking on their Cairo journey for Starknet, with chapters 0 to 2 providing an introduction to various topics.
Share this post: