Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form
Long story short, it depends.
If you're jumping into Web3 development for the first time, exploring things like the Solidity programming language, Ethereum smart contracts, and making NFTs...
Back in the day.. deploying decentralized applications (DApps) was relatively affordable.
Today — November 30th, 2021 — those exact same contracts would cost an arm and a leg to deploy :(
This means it costs you somewhere between 30x to 120x more in USD terms to deploy contracts to Ethereum today, compared to a few years ago.
The big question is... WHY?
Well, there are three things that ultimately affect your deploy costs:
and these factors come together in a very simple formula:
TOTAL COST = UNITS * PRICE * VALUE
Let's look at the CryptoPunks contract deployment from 2017 as a starting example. From looking at the transaction information on Etherscan:
TOTAL COST = 2,142,276 * 0.000000011 * 320.97
TOTAL COST = $7.56
So what changes happen when we try to deploy the CryptoPunks contract today, in 2021?
The average PRICE per gas these days is somewhere between 0.0000001 ETH - 0.00000015 ETH (100~150 gwei), while the average VALUE of ETH is somewhere between $4,000 ~ $4,500.
So how would the calculation look for deploying the CryptoPunks contract today?
TOTAL COST = 2,142,276 * 0.0000001 * 4,500 = $964
Try it out yourself! Look up your favorite NFT contract on Etherscan, find the three components of the transaction fee, and verify the final cost. What kind of prices are you seeing today? Tweet your example @thatguyintech and I'd love to retweet :)
Now you might be thinking, "why are people still building on Ethereum if it's so expensive?"
That's an excellent question. And there are three very good reasons:
Even with all these benefits however, this does not mean that Ethereum has to be the best tool for your project. Perhaps you are just poking around and learning and the cost of deploying to Ethereum mainnet does not make sense at all. Or maybe you're targeting a very specific use case that prioritize speed and efficiency over decentralization guarantees. Whatever it is, there are plenty of reasons why you might want to explore alternatives. Here are a couple of alternatives to get you started..
If you want to stay within the Ethereum ecosystem, check out sidechains and layer 2s (L2s):
The benefit of using a sidechain or an Ethereum layer 2 solution is that you can use similar tooling, and the underlying security mechanism for recording your transactions and securing your DApp remains the same. You also benefit from massively cheaper transaction costs and faster speed. The tradeoff is that both user and developer experience may be lacking for now.
If you want to venture farther and explore different blockchains with different programming languages and different system architectures, you should consider these other layer 1s (L1s):
Finally, if you are concerned about deployment costs but you still want to deploy on Ethereum mainnet, you can try optimizing your solidity code to reduce unnecessary logic. The purpose of gas fees is to pay miners for running the logic of your program. The less complex logic there is, the cheaper it is to deploy and run your contract.
Here's a great article that talks about how to optimize Ethereum NFT smart contracts to reduce gas: https://medium.com/@kaymonft/optimizing-nft-smart-contracts-to-reduce-gas-usage-7f4e819eb49d
If you found this explanation useful, shoot us a tweet at @AlchemyPlatform! We'd love to see what you're building and give your project a boost :)