Crypto is crashing. But Gas Fees 🚀

Here is Why.

How to Reduce Gas Fees on Ethereum

A thread 🧵 ↓
NFTs and DeFi Traders or Blockchain Developers.

We all suffer from higher and higher gas fees on Ethereum.

Let’s understand why and discover the tricks to save thousands of $
// Transactions

The Blockchain World is based on Transactions.

Mint an NFT

Buy or sell a Coin/Token

Deploy an App on Ethereum network

Modify a variable or executing a function in a smart contract

All the above are considered transactions.
// Gas & Gas Fees

Gas is the unit (in GWei) that measures the computational power to execute any operation on the Blockchain.

It also helps keeping the network secure.
Gas price is the fee paid to the miners for providing this computational effort (to make transactions).

It’s based on supply and demand between the miners and users of the network.
This is what explains the high gas fees on Ethereum.

Even if ETH price go down.

The amount of transactions (NFT, DeFi, dApps) is still rising.

The good news:

We can learn how to optimize gas fees.

Use these 8 tips to spend less money 👇
TL;TR:

1- Plan Ahead and optimize Timing

2- Calculate Gas Fees Accurately

3- Write better Solidity Code

4- Make Users Contribute

5- Get GasToken Refund

6- Adopt L2 & Sidechains

7- Try other Blockchains

8- Bonus dApps 🤫 ↓↓
1- Plan Ahead to optimize Timing

Gas fees fluctuate over time.

It would be smart to choose the right moment to make a transaction.

Check Ethereum Gas Charts.
For Heatmaps go to ethereumprice.org/gas/ .

Keep an eye on Network Congestion.

Usually Non-Working Hours on Weekends is when gas prices are the lowest.
2- Calculate Gas Fees Accurately

Using Testnets like Ropsten is important.

With Tools such Remix, Truffle and Etherscan you’ll get good estimation of the Transaction Cost.

But there is a more precise method.
Take Gas Used by Transaction (in gwei) and get live gas price at etherscan.io/gastracker

Apply this formula:

Cost = Gas Price x Amount of Gas Consumed (in gwei)
3- Optimize Code

• Avoid loop mistakes.

• Short circuit operations.

• Pack variables in 32 byte slots.

• Prefer mapping instead of arrays.

• Store data on memory not storage.

• Delete variables to get a gas refund.

• Don’t initialize variables if irrelevant.
For more detailed examples on how to optimize your Solidity smart contracts, check my blog article.

marmooz.hashnode.dev/ultimate-guide…
4- Share the fees with Users

This is one of the most important aspects of Web 3.0

I personally love it.

When developing a dApp you can let the users pay (some or all) the gas of their transactions.
NFT guys already know that.

The same can be done for publishing an article on a decentralized Blogging Platform.

Data storage fees can be paid by the writer for example.

The cost of gas is incurred by users.
5- Get Gas Tokens Refund

GasToken.io helps you tokenize gas.

This means you can store gas.

Mint gas tokens when the prices are cheap.

Use the tokens when the prices are high to get a refund.

Fee = (GasUsed - GasRefunded) x gasPrice
6- Layer 2 & Sidechains

Until Ethereum 2.0, gas fees on the Mainnet (Layer 1) will probably stay pricey due to traffic.

L2 and Sidechains are two scaling solutions.

Both are built on Ethereum network to make transactions faster and cheaper like:

Polygon, xDai and Optimism.
The main difference between L2 and sidechains is that the latter have their own consensus mechanism.

To understand this concept, my friend Oliver Jumpertz posted an amazing thread about it
7- Try other Blockchains

Ethereum isn’t the only network in the Web3 space.

Other Blockchains can be used to build Apps like Binance Smart Chain, Solana, Cardano or Polkadot etc
@Cardano is known for its low fees an being climate friendly

@BinanceChain is the most popular for DeFi Apps.

@Polkadot is a "multi-chain network"

@solana the new outsider.

Many alternatives offer lower transaction costs and improving tools for developers. 🚀
8- Bonus dApps

These dApps are useful for NFTs traders and DeFi users.

They offer tools to simulate and/or bundle transactions.

Less (or no) gas fees than the market.

@DeFiSaver

@FTX_Official

@Keeper_DAO

@BalancerLabs

@hellodapper by @dapperlabs
That's it for this thread !

I hope you found it useful.

If you liked it, retweet the first tweet and drop a like.

Follow me @marmooznet, if you are interested in:

- 3️⃣ Web3
- ⛓️ Blockchain Dev
- 📈 Start-Ups
- 🪙 DeFi
- 📱 Web & Mobile Dev🚀

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Marmooz

Marmooz Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @marmooznet

7 Jan
Web3 Developers get $155k average salary.

You want to get FAST into the industry ? Build Projects.

Make your Web3 Portfolio stand out with these 6 projects:

A thread 🧵
1- Create your own Token

Follow the tutorial and deploy your unique cryptocurrency.

Develop more than a simple ERC20 Token but also BEP20 on Binance Chain.

Add features :

• Burnable
• Mintable
• Pausable
• Deflation
• Liquidity Fee

docs.openzeppelin.com/contracts/4.x/…
2-Mint your NFT

Non-Fungible Tokens are usually ERC721 Tokens.

Learn how to create your own NFT collection and upload it to OpenSea.

Dig into this tutorial to deploy an NFT project

github.com/BlockDevsUnite…
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(