How to Scale Ethereum Dapps

scale an Ethereum DApp

Interested in how to scale Ethereum Dapps? 

This is a great question which we will answer here.

Scaling your Ethereum Dapp is a great way to reach more customers and to increase your profits. Here’re a few amazing case studies of companies who hired DevTeam.Space to build their software products:

  1. DentaMatch – Healthcare Android and iOS App
  2. Dencenture – Blockchain Mobile App and Web Application
  3. Medicoin – Healthcare Blockchain-Based Web Application

Contents

What is an Ethereum DApp?
Decentralization and security overshadow scaling Ethereum DApps
Ethereum sidechain: #1 of Ethereum blockchain scaling tips
Plasma: # 2 among potential Ethereum scaling best practices
“Casper Protocol”: The 3rd strategy to scale an Ethereum DApp
Raiden Network: 4th option to scale an Ethereum DApp
Sharding: the 5th Ethereum blockchain scaling tip

What is an Ethereum DApp?

An Ethereum DApp is a web app with certain characteristics. These are as follows:

  • An Ethereum DApp should be open-source.
  • You can code the front-end in any language. However, the back-end of the DApp must consist of smart contracts.
  • You must run an Ethereum DApp on the decentralized Ethereum blockchain network.
  • The user community of a DApp decides its future. You can’t modify a DApp without consensus in the user community.
  • Ethereum DApps execute autonomously.
  • An Ethereum DApp must store data on the decentralized Ethereum blockchain. It must comply with established cryptographic standards while storing data.
  • A DApp should have a cryptographic token. You need to create this crypto token by following the established cryptographic algorithms.

Read about these characteristics in our guide to convert web apps to DApps.

Notice how an Ethereum DApp needs decentralization and security. These impact its scalability.

Why develop an Ethereum DApp? The rich ecosystem of Ethereum DApps

Many entrepreneurs and developers developed Ethereum DApps for different purposes. The following are a few examples of use cases where you might build a DApp:

1. DeFi (decentralized finance)

Entrepreneurs have built decentralized tools for providing financial services. The term DeFi refers to this phenomenon. Many DeFi projects exist. They serve different use cases, e.g., decentralized lending, decentralized prediction markets, etc.

An example is the Uniswap protocol. Uniswap, a company built this protocol using the Ethereum blockchain platform. It’s a DeFi protocol.

Aave is another DeFi protocol. This open-source protocol is built on Ethereum. It enables users to earn interest on deposits and borrow assets.

2. Tokenizing digital artworks and collectibles using NFTs (non-fungible tokens)

NFTs (non-fungible tokens) are crypto tokens that are unique and indivisible. A Bitcoin is the same as another Bitcoin, and the same is true for an Ether. They are divisible. You can use smaller units of a Bitcoin or Ether.

However, one NFT is never the same as another. You can’t use a smaller unit of an NFT. This makes NFTs ideal for tokenizing digital artworks and collectibles.

Most entrepreneurs create NFTs using the Ethereum blockchain platform. Ethereum offers ERC-721, a crypto token standard for NFTs.

Axie Infinity is a popular NFT project. It’s a crypto monster-battling game. As of September 2021, over $2 billion worth of NFT transactions took place for this project.

3. Building DAOs (decentralized autonomous organizations)  

DAOs (decentralized autonomous organizations) are communities without central leadership. They are built using blockchain technology, and they are often created on the Ethereum network.

The decision-making process is based on open and transparent rules. DAOs use voting for decision-making. DAOs have crypto tokens, and token-holders can vote.

DAOs often invest funds in important blockchain projects. The investment decisions are made by voting. MakerDAO is an Ethereum-based DAO.

4. Building DEXs (decentralized exchanges)

Centralized crypto exchanges serve many customers, however, they are centralized. They have the drawbacks of centralized systems.

A DEX (decentralized exchange) allows peer-to-peer trading of cryptocurrencies. They remove the element of centralization.

Most DEXs are built on Ethereum. IDEX is an example of a popular DEX, and Uniswap is another example.

5. Building decentralized businesses

Decentralized businesses remove the intermediaries and central administrators present in centralized businesses. They allow consumers to directly deal with service providers.

Entrepreneurs have built many decentralized businesses using the Ethereum blockchain platform. Golem is an example. It enables users to trade computation resources in exchange for cryptocurrencies.

6. Building stablecoins

Stablecoins are cryptographic tokens that maintain price stability. They don’t have prices fluctuating as much as many popular cryptocurrencies. The price of a stablecoin might be pegged in real-time to a real-world asset.

Several stablecoins are built on the Ethereum blockchain. An example is DAI. MakerDAO maintains DAI, and the price of DAI is maintained close to 1 USD.

Decentralization and security overshadow scaling Ethereum DApps

Blockchain and crypto startups prefer the Ethereum blockchain platform. It’s a peer-to-peer (P2P) network. It helps them to set up a decentralized business. The Ethereum public blockchain network doesn’t have centralized servers. Buyers and sellers can communicate directly without intermediaries.

A brief note about decentralization on the Ethereum public blockchain network

Check out how Storj.io has opened the cloud storage market to commoners.

You can put your excess storage up for rent on Storj. You can earn the crypto token STORJ. This is possible because the Ethereum blockchain offers decentralization. Read more about it in our guide to build decentralized cloud storage solutions.

Such decentralization makes a network immutable. Hackers can takeover one server, however, the data exists on the other servers.

However, it requires every node on the Ethereum blockchain to store all the blocks. The Ethereum network is growing fast. Every node continues to store a growing amount of data.

A brief note about the consensus algorithm on the Ethereum network

Ethereum uses the “Proof of Work” (POW) consensus algorithm for transaction validation. The POW algorithm requires miners to solve a computing-intensive cryptographic puzzle to create new blocks. Miners run up massive electricity bills to run this.

The Ethereum community increases the complexity of the puzzle periodically. Therefore, miners will need to use even more computing power in the future. Here too, every node must validate transactions and that a miner has indeed solved a block. Every miner must validate the creation of a new block. Decentralized security on Ethereum depends on that.

Read about it in our POW-vs-PoS comparison.

The more the network grows, the harder it is for hackers to stage a “51% attack” by capturing the majority of the network’s computing power. The Ethereum blockchain network has never been hacked.

Note: Many observers talk about the Ethereum DAO hack in 2016. They wonder whether Ethereum is secure enough. Hackers had exploited vulnerabilities in a smart contract, which runs on Ethereum. They couldn’t find any vulnerability in Ethereum. Ethereum is indeed secure.

The impact of decentralization and security on the scalability of Ethereum

The combination of decentralization and security makes it hard to scale the Ethereum blockchain network. Each node stores even more data as the network grows.

More nodes participate in the transaction validation process due to this growth. Ethereum can’t scale enough since it’s highly decentralized and secure.

This phenomenon is known as the “Blockchain Trilemma”. Read why it’s hard to solve the blockchain trilemma.

You have good news! There is research underway to determine how Ethereum will scale, and I will cover a few such key efforts.

Ethereum sidechain: #1 of Ethereum blockchain scaling tips

1. Scale an Ethereum DApp by using a sidechain (AVAILABLE)

In this guide on how to scale Ethereum DApps, I will first explain the use of a sidechain blockchain. This strategy to scale Ethereum DApps works on a fundamental premise. The premise is that not all DApps require the same level of security.

1a. Differentiating between different types of DApps

Consider a DApp where you will allow the transfer of thousands of Ethers. Hackers have more incentives to attach such a DApp.

Compare that with a social media DApp. Users will likely spend a small number of crypto tokens for interacting on it. Hackers will not find it a lucrative target due to lesser economic value.

First, determine the economic value of the DApp. Subsequently, you determine the level of security required.

You can now set customized rules for the DApp. Read more about this differentiation in “DAppChains: Scaling Ethereum DApps Through Sidechains”.

E.g., use the POW consensus algorithm for a high-value DApp. Implement the PoS algorithm for a DApp with a lower economic value. You can run the 2nd DApp on a different blockchain.

Use a “Sidechain” to run this 2nd DApp. A sidechain is just another blockchain that‘s attached to the main blockchain. A mechanism called the “two-way peg” establishes a connection between the two blockchains.

1c. A brief note about the “two-way peg” process

The ’two-way peg‘ process works as follows:

The “two-way peg” process works in the following way:

  • Send your Ether (ETH) on the mainnet to a predetermined address. You can’t use this cryptocurrency fund since it’s locked.
  • There’s a confirmation message after the above transaction. Subsequently, there’s a “cool-off” period.
  • Your DApp will use a different crypto token and a different blockchain. You set up an exchange rate between Ether and your crypto token.
  • You get crypto tokens from the mainnet based on this exchange rate.
  • Execute transactions on your DApp. Return the remaining tokens to the mainnet.
  • You get a confirmation message for this transaction.
  • Since your DApp runs on a different chain, you can create customized rules. E.g., use the PoS algorithm instead of POW.
  • Computations for your DApp happen on the sidechain. This doesn’t cause congestion on the mainnet.

Read “What are sidechains?” for more information.

1d. How can you use sidechains to scale an Ethereum DApp?

Loom Network, a company providing blockchain solutions offers a solution called the “Basechain”. It’s a blockchain network that’s interoperable with Ethereum. Basechain is interoperable with Bitcoin and few other blockchain networks too.

It uses the DPoS (Delegated Proof of Stake) consensus algorithm. You can build a DApp and deploy it on the Basechain. Subsequently, your DApp can interact with the Ethereum network.

What if you already have a DApp on the Ethereum network? You can port it to Basechain easily. 

Summary: You can use sidechains to scale your Ethereum DApp.

2. Scale an Ethereum DApp using “Plasma” (FUTURISTIC)

You can think of the “Plasma” as a separate blockchain on top of the Ethereum mainnet. These separate blockchain networks are also called the “Child” chains.

“Plasma” chains are copies of the Ethereum mainnet, however, they are smaller. Technology solutions like “Merkle trees” help one to create many of these chains.

You can offload computational workload to these chains. The Ethereum project team has come up with security mechanisms like the “fraud proofs” for these chains. You can have different block validation mechanisms on these “Plasma” chains.

2a. The working of a “Plasma” chain

While you can run your DApp on a Plasma child chain and execute your transactions, you don‘t broadcast every transaction in the mainnet. You only periodically broadcast a transaction in the mainnet. This can provide a snapshot of the child blockchain transactions in that period.

A “Plasma” chain decongests the mainnet. You can set up customized rules for  these chains. E.g., you can use the PoS algorithm instead of POW.

2b. The advantages of the “Plasma” chain

Plasma can offer the following advantages:

  1. The mainnet acts as the “Root” blockchain. It provides the security of a fully decentralized blockchain.
  2. One Plasma chain can have its’ own “child” chain. This can give a tree structure to the network. This can decongest the network.
  3. The mainnet needs to broadcast the summary transaction. You need the mainnet if there’s a dispute among different child-chains. The mainnet doesn’t need to take up other workloads.
  4. Each Plasma child-chain sets its‘s own customized rules.
  5. Users of a Plasma child-chain can use the “Plasma Exit” mechanism. If they suspect foul play in a Plasma child-chain, they can withdraw their funds. They can return to the mainnet with those funds. They need to submit “Exit” transactions to the mainnet to do this.
  6. Since each Plasma child-chain can do their own complex calculations, it will allow significant scalability.

2c. A disadvantage of the “Plasma” chain

Plasma has a potential disadvantage. Suppose a lot of foul play is going on in the child-chains, and many users want to simultaneously exit those chains. Such a sudden spike of transactions can impact the Ethereum mainnet.

However, the “Plasma Exit” mechanism also has a “Challenge” period, allowing another user to dispute a claim. In case a sudden spike in “Exit” transactions, the community can decide to extend the challenge period to handle the load on the mainnet better.

2d. What’s in the future for “Plasma”?

This solution is still under development, and a release date isn‘t announced yet. The roadmap of “Plasma” isn’t entirely clear. This lack of clarity raises questions over its release date.

Summary: You can’t use the Plasma chain to scale your Ethereum DApp yet.

3. Scale an Ethereum DApp using the technology offered by the Ethereum “Casper protocol” (FUTURISTIC)

An illustration of Casper Protocol

The Ethereum project team plans to transition to the “Casper protocol”. The team has planned it for a while, and it’s working on this transition. This transition will address many aspects. These include the question of scalability.

3a. A brief note about the “Casper protocol”

The transition to the Casper protocol involves plenty of work. The Casper protocol will use a variant of the PoS (Proof of Stake) consensus algorithm.

Therefore, the Ethereum project will transition from the POW consensus algorithm to the PoS algorithm.

Read more about their comparison in “Proof of Work vs Proof of Stake Comparison”.

The PoS algorithm involves “Stakers”. They stake their Ethers for transaction validation. Any manipulation will result in stakers losing their money. That acts as a deterrence against manipulation.

This is unlike POW, where miners may not own any Ether at all. The amount of stake and the duration of it determines the priority a Staker gets.

The PoS algorithm has its share of drawbacks though. Assume a malicious staker stakes plenty of Ether for a long period. The staker gets the job of transaction validation and manipulates transactions of very high value. Despite the initial investments, the staker will make a significant profit.  

As we can see, both POW and PoS have different kinds of drawbacks. The Ethereum project team plans to address them using the Casper protocol.

3b. The advantages of the Casper protocol

The Casper protocol sets the following rules to prevent the misuse of the PoS algorithm. These rules are as follows:

  • Stakers will need to stake their Ether for a considerable period as a “security deposit”. These Ethers will be locked for this period.
  • The Ethereum project will confiscate the Ethers of the malicious stakers. It will also bar them from staking in the future.

That’s an improvement from the PoS algorithm. The transition to the Casper protocol will improve the scalability of the Ethereum blockchain network.

3c. What’s in the future for the Casper protocol?

The Ethereum project is working on the transition to the Casper protocol. This work is ongoing for a while now. However, plenty of work remains to be done. The Ethereum project team hasn’t officially announced any official target date for this transition.

Summary: You can’t yet use the technology solutions offered by the Casper protocol to scale your DApp. You need to wait for the transition to complete.

4. Use the “Raiden Network” to scale an Ethereum DApp (AVAILABLE)

“Raiden Network” is an off-chain solution to scale an Ethereum DApp. Nodes participating in this network can open a “state channel” and communicate with each other using it. This is designed for payment transactions.

Brainbot Labs Est. has developed the Raiden Network. The objective of this project is to provide an off-chain scaling solution. Ethereum users can use it since it’s already been released.

The Raiden Network intends to offer near-instant payment transactions. Users should have to pay fewer fees. You can use any ERC-20 tokens on the Raiden Network.

The “root blockchain” doesn’t record all the transactions executed through the Raiden Network. It records only a periodical summary.

Users initiating regular and small payment transactions might find the Raiden Network useful. Examples could be subscriptions to services.

You can consider the transactions on the Raiden Network as off-chain transactions. These transactions require fewer “gas” fees. The Raiden Network makes such transactions cheaper for users.

The transactions on the Raiden Network don’t congest the mainnet. That improves the scalability of the Ethereum network.

Summary: You can use the Raiden Network as a scaling solution since it’s in the market.

5. Use “Sharding” for scaling the Ethereum blockchain network (FUTURISTIC)

“Sharding” is originally a database management concept. Horizontal portions of the database are stored in separate server instances. The database management system uses an appropriate indexing solution.

At the time of the query, the indexing helps in loading data from the appropriate partition. You get your query outputs quicker.

This makes the database more efficient. Read more about database sharding in “Database sharding explained in plain English”.

Let’s see how sharding can be used in a blockchain network.

5a. What does “sharding” mean in blockchain?

In the case of a blockchain network, sharding will mean the following:

  1. A group of nodes will only store data of one horizontal portion of the blockchain database, i.e. one shard.
  2. Different groups of nodes will store different shards.
  3. Transactions and transaction validation will be confined to one shard.
  4. Since nodes don‘t load the entire blockchain data and don‘t participate in all transaction validation, it will improve scalability.

Read more about blockchain sharding in “Blockchain FAQ #3: What is Sharding in the Blockchain?”.

5b. The prerequisites for implementing sharding in a blockchain network

Sharding can‘t work with the POW algorithm. Nodes in one shard can‘t even see all transactions, hence they can‘t participate in every transaction validation.

Therefore, a blockchain network needs to use the PoS algorithm for sharding. Each shard on such a blockchain will have separate stakers. These stakers will validate transactions in that shard.

5c. The challenges in implementing sharding in a blockchain network

Sharding could help to make a blockchain network more scalable. However, it has the following limitations:

  •       You will find it hard to design and implement sharding. The concept isn’t new in the world of databases. However, the implementation is complex even there.
  •       Users can only request transactions that involve data within one shard.

5d. What’s in the future for sharding on Ethereum?

The Ethereum blockchain network currently uses the POW consensus algorithm. It can use the PoS algorithm only after the transition to the Casper protocol is complete. The Ethereum project team can implement sharding only after that.

The Ethereum blockchain network currently uses the POW consensus algorithm. It can use the PoS algorithm only after the transition to the Casper protocol is complete. The Ethereum project team can implement sharding only after that.

Summary: You can’t currently use sharding for scaling your Ethereum DApp.

A brief note about the Ethereum development tools

The Ethereum ecosystem offers useful tools for Ethereum DApp development. Look for programmers with good knowledge of the following:

  • Solidity: Ethereum developers use this popular programming language to code smart contracts.
  • Remix: It’s an IDE to code Solidity smart contracts.
  • Ganache: It’s a well-known Ethereum client.
  • Web3.js: It’s a popular JavaScript-based Ethereum API.
  • Truffle: It’s a tool to organize, compile, test, and deploy Ethereum smart contracts.
  • Ropsten: It’s a test network for testing Ethereum smart contracts.
  • MetaMask: It’s a browser extension as well as an Ethereum wallet. You can use it to buy real as well as dummy Ether. You need real Ether to deploy your DApp on Ethereum, and you test it using dummy Ether.

Depending on your use case, you might need to use technologies like IPFS (Inter-Planetary File System). Note that Ethereum is still a new technology. Conduct appropriate due diligence before hiring developers.

Need Help?

If you find yourself lacking the required skills or experience to create our own blockchain product then why not take a moment to describe your project to DevTeam.Space so that we can get in touch to answer any questions you might have.

Should you require a developer or dev team then our community of field expert software designers and engineers has all the expertise and skill sets you will need to ensure your project is a success. We have build scores of blockchain solutions, some of which you can see by clicking the links in the intoduction of this article.

Simply send your project specifications via this link and one of our account managers will get back to you in no time.

Frequently Asked Questions

Which Blockchain has the most DApps?

The Ethereum blockchain.

What is a DApp?

DApp stands for Decentralized Application. It is an app that runs off a decentralized network and as such, has no single central authority or server.

What is a good Dapp?

Chainlink is a great example of a decentralized application.

Some of Our Projects

Tell Us About Your Challenge & Get A Free Discovery Session

Hire Expert Developers
clients
banner-img

DevTeam.Space is a vetted community of expert dev teams supported by an AI-powered agile process.

Companies like Samsung, Airbus, NEC, and startups rely on us to build great online products. We can help you too, by enabling you to hire and effortlessly manage expert developers.

LinkedIn LinkedIn Facebook Facebook Twitter Twitter Facebook Messenger Facebook Messenger Whatsapp Whatsapp Skype Skype Telegram Telegram