Eric Parker Profile picture
Feb 14 16 tweets 4 min read
What exactly is gas and why are we paying anything at all to get transactions written to the blockchain? We had a good discussion in our Giddy Discord channel recently about gas, here are the highlights. (join discord here discord.gg/bAVUC4yYzm)

A big thread.

1/16
Performing a transaction on the blockchain, whether it’s sending money to a friend or doing a DeFi or NFT operation, means writing a little bit of history to a distributed ledger, aka the blockchain. (there are multiple blockchains out there, but let’s keep it simple)

2/16
Thousands of computers across the world continuously agree on the contents of the ledger which is why we can trust that it’s accurate. This is a big reason why crypto is worth anything at all. We can mathematically prove the legitimacy of a global set of txn's. Pretty cool.

3/16
So how do you get your deposit, withdrawal, investment onto this globally secured ledger? You have to find someone with a computer that knows how to validate the blockchain and convince them to help you out. How do you convince them? Money.

4/16
Gas fees are money paid for computer operations. You want to carve out your spot on the blockchain so you pay a little money to someone who can make that happen for you. The amount of gas you pay is determined by the complexity of your transaction, not the amt of $$ sent.

5/16
So, if a coder makes a smart contract that’s really inefficient with their code/algorithms it could end up costing you more money. (although the network congestion itself is really the biggest factor, more on that soon)

6/16
Kind of like a house builder who uses 2x too much material and spends 2x too much time. You could build a house for cheaper or get gas fees lower if you're just a better architect and builder.

7/16
So you pay gas based on the complexity of the transaction, not the amount of money being transacted. Think of it as 1 unit of gas is equal to 1 tiny computer operation. Number of computer operations increases, units of gas goes up, total cost goes up.

8/16
So, the amount of money you pay for gas is the price per gas unit x the number of gas units. Complexity multiplied by cost of gas. But what determines the cost of each gas unit?

9/16
The price per gas unit is set by the network you’re operating on. The network’s bandwidth vs congestion are the main factors in the cost per gas unit you pay. It’s a function of supply and demand - number of available txn's per block vs number of requested txn's.

10/16
So the complexity of your transaction determines the number of gas units you need, but the price per gas unit is determined by how congested the network is.

11/16
Think of a toll road that's capable of charging different fees based on traffic. If there's very few cars they're only gonna charge $1 per car. If it's rush hour in LA they're gonna charge $25 per car because of supply v demand.

12/16
Gas is the price you pay for computers to put your txn's on the blockchain. You're trying to get your txn's on an immutable decentralized ledger, that's gonna cost you, and you're going to pay based on how complex the operation is and how busy the highway is.

13/16
One annoying thing about gas is the network determines the currency needed for gas payments. ETH for Ethereum, BNB for Binance Smart Chain, MATIC for Polygon, etc. You have to hold these tokens, even if you don’t like them, to pay gas fees on that network.

14/16
Giddy developed a way for our users to pay for this gas in any token they want. For example, if you just want to hold stable coin to avoid the volatility of ETH, MATIC, BNB, etc you can do that and pay for gas with USDC using the Giddy app.

15/16
Join our Discord to get in on these discussions! And join our email list to get notified on our upcoming releases. #GiddyUp !!

discord.gg/bAVUC4yYzm

giddy.co

/thread

• • •

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

Keep Current with Eric Parker

Eric Parker 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!

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

Don't want to be a Premium member but still want to support us?

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!

:(