How Much Does It Costs to Run DApp in 2018

You think your AWS or Digital Ocean bill for your website is expensive $$$?

Hang on tight and you will be surprised.

Typical dApp

There is no such thing as typical dApp. dApps vary from games to decentralized exchanges. We are going to focus on such stats as monthly unique users and transactions per user per months. They are important to estimate costs to run dApp.

Only about 20 dApps have more than 1000 unique users per months. Let’s say your dApp is going to be one of successful and it is going to have 1000 users per month. On average active user makes 6 transactions per day. Let’s say for the sake of mental experiment your users visit your project half of the days in a month, which will give us roughly 1000 * 6 * 0.5 * 30 = 90'000 transactions a year. Sounds about right.

Now, we are going to calculate how much it is going to cost to deploy and run such an app on the most popular smart contract blockchains.

Ethereum

On Ethereum blockchain as a developer you only have to pay for contract deployment. Your users are going to pay for all transactions related to your contracts.

Deployment on Ethereum

Deploying a contract has a minimum fee of 32000 gas, plus 200 gas per byte of the source code, as per Appendix G in the Ethereum yellow paper (The Create and CodeDeposit opcodes).

For example in order to create CryptoKittiesCore contract author spent 3'769'599 gas with 4.1 Gwei gas price resulting to the $4.64 total cost.

With the current block gas limit around 8kk, you would spend 10 Gwei gas price around 0.08 Eth, which is $24. In other words, even if you have to deploy you contract using multiple transactions you costs should not be much higher than ~0.3 ETH/$100.

Running dApp on Ethereum

As stated before users have to pay to run smart contracts. Let’s see how much they would spend in one year. 90'000 transactions would cost you ~90 ETH/~$27'000 with an average cost of transaction ~0.001 ETH/$0.03. Again that might be more or less depending on which gas price used. If you have time-critical dApp like an exchange, gas price probably will be high. If you have dApp for which it is okay to have transactions to commit for a few hours then you can save a lot of transactions fees.

Total

In case of Ethereum, your total cost would consist of deployment + running cost (paid by users) and would be around ~90 ETH/~$27'000 for a year.

EOS

Contrary to Ethereum in EOS blockchain users do not need to pay in order to use your smart contract, but you have to stake your EOS tokens in order to receive Bandwidth, CPU, and Storage for your smart contract. RAM is so precious that there is an internal marketplace, so you have to buy RAM in order to use and later you can sell it. Prices on RAM are volatile.
This makes it hard to calculate how much you have to spend because you need to buy EOS tokens to stake, but you can resell them later. No one knows how much you’ll get back. One thing for sure buying EOS tokens for the sake of running your dApp is going to be a big upfront investment.

Deployment on EOS

To deploy smart contract to EOS you need to buy RAM for it. Any decent smart contract would take at least 1MB of RAM, which is ~120 EOS/~$600.

Running on EOS

In EOS every user account costs money to the developer. To be exactly 4KB RAM per user. We have 1000 users we need 4000kb RAM, which is around ~508 EOS/$2611 according to EOS Resource Planner.

application developers will pay the nominal cost of account creation to sign up a new user. Traditional businesses already spend significant sums of money per customer they acquire in the form of advertising, free services, etc. The cost of funding a new blockchain account should be insignificant in comparison

– from EOS Technical Whitepaper

Okay. Users have accounts. Great. Now they are probably going to store some data, right? We have to calculate that as well. User data size depends a lot of application kind and can grow really quickly if you use a lot of string. Let’s assume we try to minimize our RAM usage, so we fit data of every user only in 1KB. 1000 users are 1MB and in terms of cost is ~120 EOS/~$600.

Users data is covered. Next are CPU and Bandwidth. Again CPU and Bandwidth consumed by transaction really depends on what kind of transaction it is. Not only it depends on what kind of dApp you run, it also depends on network state. If someone is spamming network with transactions, your transaction would fail due to billed CPU amount. Let’s say for a rough estimation 10 EOS is enough to cover one user. 1000 users would require ~10000 EOS/~$50000.

Total

EOS is different from Ethereum in the way, that you do not actually spend anything to run dApp, you only have to stake it. And you’ll get it back when you are done with your dApp. It is an attractive model for sure. Regardless you have to purchase coins to stake them.
How much does it take to run EOS dApp for a year?
Deployment costs plus running costs upfront would be somewhere around ~10628 EOS/~$55'000. Again, you will be able unstake your coins and resell them. Unfortunately, it is impossible to say what would be the resell value after one year. On a side note if you are EOS believer, then this model makes sense because EOS should grow in value for one year making your dApp usage not only free but might even give you a profit.

NEO

Chinese Ethereum, NEO has attracted many supporters and claims to be the future of smart economics.

Deployment on NEO

Deploying a contract on NEO Blockchain has a fixed cost of 100–1000 GAS/$1'762.5-$17'625 depending on your requirements. Which is mind-blowing to me.

Do you want to have you ICO on NEO?
No problem, please pay 5000 GAS/$86'250 to register your digital asset. But there is a catch. You have to renew it every year. So it is 5000 GAS/$86'250 per year.

Running on NEO

It is extremely hard to find any information on expenses involved in running NEO dApp. At that moment it is not clear how much real-world transaction would cost on NEO, so we are going to skip this part for now and update it in future.

Conclusion

Estimations in this paper are neither precise, neither will stay relevant for too long, because of market movements and technology advancements.

Why do we even need them?

Because too many people believe blockchain is magic unicorn which would solve all the problems and costs nothing.

The truth is that blockchains are performance lacking, expensive and hard to develop for at that moment.

Does that mean blockchain technology is a bad idea?
Absolutely not. I do remember days when 640 MB was a huge hard drive when you had to dial up the internet and pay per KB at speed of 64 KBps. It was expensive and sucked at that time. Do I regret these days? Not at all. And looks at us now with unlimited fast internet at home and mobile. Technology will improve and make blockchain cheap and accessible.

As for now — users, investors, and developers have to be aware that the cost of transactions is rather high compared to traditional apps. Thus it makes sense to use blockchain in industries which have a high value per transaction such as finance, healthcare, estate and etc.

TL;DR

  • Smart contracts expensive to deploy and run any platform right now.
  • In EOS you have to buy coins in order to run dApp, but you can sell them later.
  • NEO has huge fixed costs of deploying contracts and digital assets.

P.S.

Do you want more blockchains added to this list? Let me know in comments in which one you are interested. I am considering to add Elastos.

Want more?

Social:

References:

Originally published at ylv.io on August 27, 2018.


How Much Does It Costs to Run DApp in 2018 was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: