What’s Gas and Gas Fees in the Crypto world? What do they signify and what exactly should I be knowing about them. If these are questions that led you to this blog, then you’re at the right place.
Before we start, I hope you’ve heard about the huge boom in the Decentralized Finance industry this year. For those of you who haven’t, let me bring you up to speed.
In March, when Covid-19 was officially declared as a pandemic, the crypto market crashed and the Total Value Locked (TVL) dropped to around $400 million.
I honestly thought it was going to be awhile before the DeFi world got back on track. But damn, I was wrong. Not only did the TVL get back up, it rose to a whopping $9 billion. Yep, $9,000,000,000. That’s up more than 700 percent from early June.
But what was the reason behind this?
The growth is almost entirely related to Ethereum (ETH), the world’s second-biggest cryptocurrency.
Today, Ethereum is probably the most capable cryptocurrency and it’s because of one major reason:
Ethereum supports programmable tasks.
Ethereum, like any other blockchain, has miners who earn “rewards” in the form of ETH in return for doing work. Ethereum uses the Proof of Work system which basically means miners must do some computationally expensive work (essentially a complex math problem) faster than all competitors to earn said reward.
Since Ethereum allows developers to create programmable tasks, it allows us to leverage something called Smart Contracts, which further opens us upto Decentralized Apps (Dapps). Over the last year, Dapps have probably been one of the major driving forces behind the huge DeFi boom.
In conclusion, the crypto world is going to see some wonders soon. Great!
But here’s the problem.
Remember those “rewards” for the miners? With the amount of transactions going on today, miners today have a choice of which transactions do they want to mine. It’s pretty obvious that miners would want to mine those transactions that earn them a higher monetary benefit. This brings us to the concept of gas and gas prices
Gas and Gas Prices and Gas Limits
What is Gas in Ethereum?
According to definition,
Gas is a measurement unit of computational effort that is needed to be paid to the Ethereum Client to commit the transaction to the blockchain network
That may have been a mouthful. But simply put, “Gas” is the name for a special unit used in Ethereum.
It’s a measure of how much “work” has to be done to execute a particular set of tasks.
I’ll explain this with a very common analogy
Say I want to travel from Point A to Point B and then back in my car. Let’s call these Tasks
So, I have two tasks to do:
1. Move from A to B and then
2. Move from B to A.
If moving from A to B covers M kilometers (and the vice versa is the same). then I’d need to travel 2 x M kilometers to finish my tasks.
The amount of fuel required to cover this 2M distance is called gas.
Similarly, with respect to Ethereum, a gas unit is a measure of computational effort that needs to be done to complete the smallest type of work possible. Every operation that can be performed by a transaction on Ethereum costs a certain number of gas units. It’s obvious that operations that require more computational resources cost more gas.
At a given moment, Ethereum can process a limited amount of gas units. This is a reason why miners expedite the huge number of transaction requests they get. Miners rely on something called the Gas Price and Gas Limit to help them decide which transactions they have to process first.
The price of a Gas unit is the amount of Gwei that the user is willing to spend on each unit of Gas. What’s a Gwei? A Gwei is a denomination of Ether (ETH), which is used on the Ethereum network.
Simply put, a Gwei is like what a 5c coin is to the US currency.
Like how one 5c coin = 0.2 USD,
One Gwei = 0000000001 ETH.
One Gwei = 10 ETH
So from our example from earlier.
Let’s assume to travel the 2M kilometers, we need 55.22 litres as shown in the image.
Let the cost per litre be about 226.9 cents ($2.26).
So to travel the 2M kilometers, we would spend (55.22 x 2.26) dollars.
What’s the problem with Ethereum?
Take a look at the screenshots below.
Why is this happening though?
The detailed answer is not very easy to comprehend but I’ll try giving you the basic gist of it. Here’s something that can help.
Imagine that me and you have to refuel our cars.
Say I was willing to pay a gas price (or fuel rate) of 2.5 cents per liter. You on the other hand were willing to pay 3 cents per liter.
3 c/L > 2.5 c/L
Now if the guy had a choice, he’d obviously decide to serve you before me right?
It’s the same thing here.
When lots of people are using Ethereum, you can pay Miners more to do your work first. Gas Price is like a bribe. If you set your gas price too low, you’ll be stuck in the back. Users tend to pay a higher gas price than a current one with the hope that their transaction gets mined first, ultimately pumping the price up. With the huge boom in DeFi this has become a major problem now.
Very very huge.
But remember, there is a lot more to this than just what I’ve explained
How do high Gas Fees affect DApps?
I guess it’s best to explain this too with an example.
Let’s talk about MegaCryptoPolis.
MegaCryptoPolis — is a decentralized city builder strategy game running in the form of a DApp. MegaCryptoPolis 3D allows players to rent buildings, produce materials that are required by other buildings, create new generations of citizens, offer services to other players, place ads and drive cars, just to name a few.
I highly recommend you checking it out later (here).
Every action in the MegaCryptoPolis is verified transaction confirmed by a smart contract on a blockchain that requires a Gas fee (the miner’s fee).
Now with the gas prices ridiculously high, a huge congestion took place on the Ethereum network with gas prices ranging from 30 to 350 gwei. Imagine this, For a simple action like brick collection (which should actually cost around 1¢), I would end up paying from anywhere between $0.1 to $5.
This is not just for Decentralized games. Almost every Dapp is in some way affected by this.
Blockchain developers are actively looking for a solution. Though Ethereum 2.0 promises to solve some of these problems, it still might take a while for it to get to us. Even when it does, there still are a lot of issues developers might face.
Matic Network is essentially a blockchain scalability platform which provides secure, scalable and instant transactions powered by an adapted version of Plasma side chains. Matic aims to solve scalability and usability issues while not compromising on decentralization. Matic Network is basically a side chain scaling solution (built on the ethereum network) for existing platforms to provide scalability and superior user experience to Dapps.
This might have been a bit hard to understand if you’re new to blockchains. Here’s a blog that explains the MATIC network in detail. It’’ll help you understand the functionality and architecture of the MATIC network.
Layer 2 scaling solutions like Matic are the need of the hour now. MATIC solves the scalability issues and enables transactions that are much cheaper.
How much cheaper though?
MATIC transaction prices are up to 1/1000th the fees of a regular Ethereum transaction.
Transaction fees for MATIC are determined by the users on the network as they do on Ethereum, but given the high transaction throughput that’s possible, the transaction fees are significantly lower than Ethereum due to supply and demand of “gas fee” markets.
All of this empowers developers to build the best of the Dapps and provide users with a smooth and seamless user experience. Not only are MATIC transactions cheaper, but they’re awesomely fast.
Here, take a look.
The MegaCryptoPolis team recently decided to move to the MATIC network. Apart from saving on gas and instant transaction fees, the MCP Team will cover all the transaction fees on the sidechain network, so a player will never need a new token to play the game.
The MCP team recently put out a blog explaining the advantages of switching to the Matic Network.
Here are a few of them:
- Zero-fee transactions
- Almost instant transactions
- Aggregated ETH withdrawal
- Better adoption
- The perfect environment for upcoming free-to-play layer of the gameplay
If you’ve reached till the end of the blog, I genuinely hope I’ve brought you some more perspective about the DeFi and crypto world. I will keep updating this article as needed. Stay tuned.