Ready to start your Web3 development journey?
→ Download our guide to developing smart contracts

Stacks vs. Ethereum: Which Is the Best Blockchain for dApps?

In 2021, 34,391 new developers committed code across Web3 projects—the highest-ever developer activity in crypto. But while there are lots of opportunities in Web3, there are some pitfalls developers need to avoid as well. For starters, the blockchain network on which you build dApps could make or break your Web3 development journey.

Type
Deep dive
Topic(s)
Stacks
Published
November 7, 2022
Author(s)
Community Manager
STX vs ETH
Contents
Copy link

For developers interested in building decentralized applications (dApps), one of the most important decisions you’ll make is deciding which blockchain to build on. In this post, we’ll compare two of the most popular Web3 ecosystems: Stacks and Ethereum.

Stacks vs. Ethereum: Overview

Today, the Ethereum blockchain is the de facto platform for developers building dApps. It secured a first-mover advantage in the world of Web3 by being the first smart contract platform. It has the most active developers, and many of the most popular dApps today exist on Ethereum. However, a new generation of blockchains is emerging, and protocols like Stacks are gaining traction as they take learnings from Ethereum and apply them to fundamentally different architecture and design.

Stacks 

Bitcoin revolutionized the world with the introduction of blockchain technology. However, the protocol has a limited scripting language that makes it difficult to create more complex applications on top of Bitcoin. Finding a solution to that problem took years of research, and it’s only in the past few years that projects such as Lightning, RSK, Liquid and Stacks, among others, are bringing Web3 capabilities to Bitcoin.

Stacks launched its mainnet in 2021 and is a programming layer for Bitcoin that supports the creation of fully expressive smart contracts through a consensus mechanism that connects the Stacks chain to the Bitcoin chain. It does this without any modifications to Bitcoin itself. Stacks also introduced a new programming language, Clarity, for writing Bitcoin smart contracts and creating different kinds of dApps. 

Ethereum 

Ethereum was introduced in 2015 as a distributed global operating system—the first that could support the development of dApps. Today it is the second biggest cryptocurrency by market cap (after Bitcoin). 

Over the years, Ethereum has grown in popularity as the main protocol for building Web3 apps as it continues to capitalize on its first-mover advantage. There are more than 900K smart contracts launched on the network, and 58% of the total value locked (TVL) in DeFi apps are on the Ethereum blockchain. Ethereum developers created the Solidity programming language for writing smart contracts, a language which has since gone on to be used in several different Web3 ecosystems. 

Stacks vs. Ethereum: Network Architecture

Fundamentally, Stacks and Ethereum take a different approach to their network architecture. Ethereum combines all aspects of its distributed world computer in one place. The protocol packages its settlement layer, its programming layer, its payment layer, all into the base Ethereum blockchain.

In contrast, Stacks, and the Bitcoin ecosystem more broadly, is designed in layers. You can roughly think of the Bitcoin stack as:

  • Settlement layer: Bitcoin
  • Payment layer: Lightning
  • Programming layer: Stacks

This design comes with several benefits. First, it keeps the base layer (in this case Bitcoin) more secure. By limiting the programmability of the ecosystem’s settlement layer, you decrease its attack surface and make it more durable and more resistant to change. Users want these traits from a security standpoint since a separate programming layer can be more experimental without jeopardizing the security of the overall network.

Secondly, this design helps the overall ecosystem scale. By separating the network into layers, with each layer ultimately settling on the base chain, you can independently scale each layer, increasing the overall network capacity more efficiently than by handling all functionality at a single layer. Indeed, in the past few years, Ethereum has begun exploring a layering approach to scaling (through L2s like Polygon, Optimism, and others), similar to the Bitcoin ecosystem.

Stacks vs. Ethereum: Consensus Mechanism

For developers building Web3 apps, the consensus mechanism of the underlying blockchain is important because it has an impact on the security, the scalability, and the decentralization of the overall network.

Since blockchains are decentralized networks, the absence of a central authority requires a way for the various network participants to reach consensus on what the state of the network is (e.g. who owns what). The consensus mechanism on a blockchain determines how those different nodes agree on the validation of transactions and what version of the ledger holds the correct record of transactions. For developers building Web3 apps, the consensus mechanism of the underlying blockchain is important because it has an impact on the security, the scalability, and the decentralization of the overall network.

Stacks’ Proof of Transfer (PoX) 

Stacks uses a Proof of Transfer (PoX) consensus mechanism, which recycles Bitcoin’s Proof of Work (PoW) to secure its chain. Proof of Transfer anchors Stacks to the Bitcoin network. To change the history of Stacks, you’d have to change the history of Bitcoin. The Bitcoin blockchain has been battle-tested for more than a decade and offers unrivaled security compared to other blockchains.

Additionally, PoX allows users to earn BTC if they stake their STX to secure the network. Unlike a Proof of Stake blockchain (where users stake the network token and earn more of that same token), PoX allows users to earn a different cryptocurrency than that of the main network. This also makes the network token a productive asset, which can be leveraged in innovative ways, such as Arkadiko’s self-repaying loans

Ethereum’s Proof of Stake (PoS)

Ethereum originally used a Proof of Work (PoW) consensus mechanism, like Bitcoin, but in September 2022, Ethereum completed “The Merge” to transition its network to use the Proof of Stake (PoS) consensus mechanism instead. Unlike a proof of work chain, in which miners dedicate energy to solve math problems, in a PoS chain, miners simply stake tokens to the network to incentivize their behavior.

As a result of this change, Ethereum’s energy use dropped by 99.9%, but there are new concerns around centralization and censorship. For instance, 51% of blocks added to the Ethereum network in a 24-hour period in October passed through relays that were screening out transactions from Tornado Cash, an anonymizer service, in line with the U.S. Treasury Department's Office of Foreign Assets Control (OFAC) compliance recommendations. The PoS transition could set Ethereum on a slippery slope of censorship that goes against the permissionless philosophy of blockchain.

Stacks vs. Ethereum: Programming Language

To build Web3 apps on Ethereum, developers use the Solidity programming language. Solidity is an object-oriented language strongly influenced by JavaScript, C++, and Python. Solidity is the first smart contract programming language, and as such, it has the most robust tooling, documentation, and developer community. However, being first, Solidity also has several design flaws, which lead to common issues in its smart contracts. 

The Clarity programming language is used for creating smart contracts on Stacks. Clarity is a functional programming language with strong influences from LISP. Clarity is newer than Solidity and has been intentionally designed to sidestep the pitfalls responsible for common vulnerabilities in Solidity smart contracts.

Are you a visual learner? Watch Hiro's Developer Advocate Max Efremov explore the differences between Solidity and Clarity in a live webinar:

Interpreted or Compiled 

One of the key differences between Clarity and Solidity is that Clarity is an interpreted language, while Ethereum’s Solidity is a compiled language. Since Clarity is an interpreted language, the source code of Clarity smart contracts is broadcasted directly to the blockchain and available to anyone that wants to look at it. However, Solidity code is compiled, which converts the code to machine language for execution, and it is that machine language that is visible on the blockchain. This has a few consequences including:

  • Solidity code is vulnerable to compiler bugs and errors
  • It is harder for a user to verify Solidity code on the blockchain and ensure that the contract code does what it claims to do.

Clarity circumvents these issues altogether by being an interpreted language, and because all source code is available on the blockchain, it fosters composability and innovation because developers can reference each other’s code and more easily build off other work.

Turing Completeness

Turing completeness refers to a system’s ability to theoretically solve any computational problem if the system has enough time, memory, and instructions. Ethereum’s Solidity is a Turing-complete language, which more practically means that it can execute infinite loops and conditional jumps. This makes it easier to write insecure smart contracts because it fundamentally isn’t possible to predict all of the execution paths of the code. And if you can’t review everything the code might do, it’s much harder to do a thorough job of debugging that code.

Stacks proactively prevents a number of these vulnerabilities by being Turing-incomplete. Clarity smart contracts are not vulnerable to recursive calls or reentrancy attacks, and because the language is decidable (Turing-incomplete), developers can statically analyze the execution path of the code, reasoning with the code’s behavior and ironing out any bugs they find along the way.

Beyond Turing-incompleteness, Clarity is designed to be a secure programming language for smart contracts, one that addresses some of the dangerous vulnerabilities of Solidity that have caused a number of famous hacks in Ethereum.

Stacks vs. Ethereum: Security

Barring considerations of the security of their programming languages, both Stacks and Ethereum are secure at the protocol level. Any hacks in the network tend to occur at the smart contract level, not at the blockchain itself. 

Stacks itself is secured by Bitcoin, the most decentralized and secure blockchain, with over 15,000 nodes in 93 different countries maintaining the Bitcoin network today. Ethereum, on the other hand, has over 7,000 nodes in 86 countries.

While both blockchains have proven to be secure, Ethereum’s recent merge to a new consensus mechanism has introduced new centralization and censorship concerns that will take time to play out, whether to alleviate those concerns or to see them realized.

Stacks vs. Ethereum: Brand Recognition

Stacks’ thesis is that a new internet will be built on Bitcoin. As mentioned above, Bitcoin is the most secure and most decentralized, and importantly it’s also the most well known. According to a survey conducted by the UK’s Financial Conduct Authority, 78% of respondents had heard of Bitcoin, compared to only 17% for Ethereum.

Stacks vs. Ethereum: Market Cap

The Stacks market cap is much smaller than that of Ethereum: $427M to Ethereum’s $192B (as of October 31, 2022 on CoinMarketCap). But when you consider Bitcoin’s market cap as well, which is $392B, then the total latent capital that developers can build on in the Stacks ecosystem is a much bigger opportunity than that on Ethereum.

Stacks vs. Ethereum: Developer Ecosystem

The Ethereum ecosystem has the largest Web3 developer ecosystem, thanks to its pioneering position with the launch of smart contracts. Last year, there were over 4,000 monthly active developers building on Ethereum, and 20% of new Web3 developers make their debut into the space on Ethereum. 

However, Stacks’ developer count provides reason to be optimistic: Stacks is one of the newest Web3 ecosystems (launching in 2021), and with 120+ monthly active developers, Stacks is the largest and fastest-growing Web3 project on Bitcoin.

Developer Tooling and Resources

Stacks provides Web3 developers with a variety of tools, resources, and support to build. Hiro offers a number of developer tools, a library of learning resources, and you can enroll in Clarity Camp, a six-week course designed to equip you to build Web3 apps with Clarity. 

The Ethereum ecosystem also has a vast selection of developer tooling and learning resources to support you. Several organizations, such as ConsenSys, BloomTech, and Chainshot, provide tooling and learning resources. 

Funding 

There is a lot of funding in both ecosystems, but you may stand a better chance of getting funded faster in the Stacks ecosystem than in Ethereum, simply because Ethereum is so saturated. On Stacks, you can access early funding through the Stacks foundation. There’s also a $165M fund called Bitcoin Odyssey to support developers in the Bitcoin ecosystem, and Trust Machines recently raised $150M to support and expand the Bitcoin network. Beyond this, the Stacks Foundation has a 100M STX treasury earmarked for supporting community development and open-source contributions. 

For funding in Ethereum, the Ethereum Foundation runs the Ecosystem Support Program through which it provides grants for early funding capped at $30,000 per project. Ethereum also attracts a lot of VC funding, such as from a16z and Paradigm, though most do not exclusively invest in Ethereum. The challenge for developers with getting funding in the Ethereum ecosystem is that you’ll be competing with all of the other active builders in the space.

A Whole World of Opportunities for Web3 Developers Beyond Ethereum

Although Ethereum is the first blockchain to support smart contracts, the Bitcoin ecosystem offers Web3 developers more opportunities because of Bitcoin’s popularity, security, market capitalization, and brand recognition. 

While Bitcoin has a limited scripting language that doesn’t support smart contracts, this is no longer a limitation because you can now write fully expressive smart contracts for Bitcoin through Stacks. Rather than compete in a saturated Ethereum ecosystem, Stacks offers an opportunity to chart a new path to build Web3 apps for Bitcoin.

Want to learn more about how Stacks compares to other Web3 ecosystems more broadly?

Download Our Developer’s Guide to Web3 Ecosystems
Copy link
Hiro news & product updates straight to your inbox
Only relevant communications. We promise we won’t spam.

Related stories