WHAT IS AVALANCHE GAS? AND WHY GAS PRICE FLUCTUATE TIME TO TIME

Let's say you are standing in a line of a Starbucks waiting for your coffee and you notice that there's may be four people in front of you. The normally you look at this number and think about your wait time, but just for the fun of it. Now let's say that you are thinking about the four people and correlation to both your wait time and your new transaction fee because in this thought experiment, the more people that are waiting for the coffee the higher the price to get your coffee why?. Because this coffee shop works like an auction and serves coffee to the people whoever pay the highest transaction fee first. So you get up to the counter and you are said that your coffee will be $8 plus a transaction fee of $2 which comes out $10 total. 


Now let's imagine that there are 300people standing in a line for coffee because they just released Pumpkin spice flavour. Since there are 300people online the average transaction fee to get your coffee soon is $50. You could pay your $2 if you want it too but you you would be waiting all morning, all day and all evening until the rush of Pumpkin heads die down. Instead you pay the $50 transaction fee on your $8 coffee coming to a total of $58 and your morning cup of joe. 


So what is Avalanche and Avalanche Gas ? 

So Avalanche is a programmble money. Basically you can use it to do the things. For example if you want it too, you can add 4 + 4 and then Avalanche will tell you that the answer is 8 but it would cost you some gas. If you want the network to send some Avax for that you have to pay 470gas. 




You might be wondering why the hecked I have to pay to have Avax to simple addition to me. It's called the gas. Because it's similar to the gas salina you put it in your car. 


It is the fuel that powers the code and compitition that happens on the Avalanche network. So just like I said, Avalanche is a programmble money and we have a gas as a way to make sure that these things don't change even if the the price of Avax skyrockets or plump it. It should alway take gas to add two numbers whether the price of Avax is $100 or $500. 


However, one thing we do have to do is convert the amount of gas to the cost of gas. So to find out how much it will truly costs? 

We need to multiple,

 

                        Gas Cost× Gas Price 


Here's the gas cost for the things doesn't change.It always 470gas for the transaction but the price of one gas does change. 

This is where something weird called Gwei comes in, so what is Gwei, Gwei stands for Giga Wei. 


You can think about it like this, a Gwei is like one penny that is to a Dollar or 1 Satoshi to a bitcoin. Instead for Avalanche there are actually one Quantilin weis in one Avax. And because that is ridiculasy small amount we instead use Gwei(nAvax) which is 0.000000001Gwei(nAvax).




Now personally I learn best by examples. So learn about what is Avalanche gas is 


Example of an Avalanche Action 

Let's say you want to send some money to your friend, well first we get to know something. The first thing we need to know is the price of a transaction cost( which is predefined by the network) which is 470gas and this number never change. The next thing we need to know the price of Avax which is $80 and this number actually changes all the time. And the third thing we need to know is the price of gas. And this can be whatever you wanted it to be but the higher that it is the faster that the transaction will be performed. 




Visit snowtrace gas tracker here. 


So now, 

the cost of a transaction (470gas) ×gas price(100Gwei/nAvax) 

So let's do simple math and reduce this 

                           470×0.000000100 this comes to 


0.000047Avax to send a transaction. If you want to figure out how much actual cash it costs 

 

                       0.000047×$80(Avax Price) 

and you get $0.00376, so it means it costs $0.00376 to make a transaction. 


So breaking this down. To find out how much something it costs to perform the transaction on Avalanche network is - 


               Price of the action × cost of gas 

that gives you the amount of Avax it takes to perform that task. If you want to convert that how much it actual cash or how much money in United State Dollars it is, you just take that amount and multiply it by the current price of USD. So I hope that this explanation is helpful. 


Let's go over one more example just to make sure you get the hang of it. 

Let's assume the same situation as above but for this example we are gonna say that the network is very busy and because of this gas price is high. Now the price of gas is 300gwei(nAvax). Instead of 100gwei(nAvax). So how much it costs to perform the transaction. 

So let's plug this numbers in equation. Remember the equation- 


Transaction Fee = Cost of gas in Gwei(nAvax)×Price of action in gas× Avax price in $ 

Which is equals to, 

                                      = 470×0.0000003×80 

                                     = $0.01128 



So because the network is congested and tons of people are waiting on to do a stuff this costs $0.01128 to perform the transaction. And this transaction cost is same whether you are sending $5 or $5Million. 


Now moving on, earlier I said, gas price can be different and this is where we go back to our coffee example. 

Let's say people are standing in a line for coffee and the people willing to pay the most to get their coffee first. Since Avalanche can include a certain number of transactions per block so it picks the one who pays them the most. Since right now staker get portion of those fees as a reward. So for example you can spend, 

                            100Gwei(nAvax) 

                            10Gwei(nAvax) or even a 

                            1000Gwei(nAvax) if want it too 


I you spend 10Gwei(nAvax) it may take a few hours to get confirmed but if you spend 1000Gwei(nAvax) it could be confirmed almost immediately. It really depends on how badly you want your coffee. 


If you want to understand it better, imagine yourself as a Avalanche validator on an average getting 20cents to confirm the transaction. However, some guy give you a $2 tip and tells you hurry and do his. You can be sure that you gonna be doing his very quickly. However if someone like 20cents all I got to do with it. What you can? You are only going to do when other transactions are finished first. 


Now you might be wondering why we need all this. Because it's very confusing Gwei(nAvax), gas which is actually implemented in the Avalanche network that people had to pay for code to be ran. Imagine if you could ride a piece of code that said, “I want someone to do this action for free forever" Well without a gas limit and Gwei(nAvax) price it will spam and ruined the entire blockchain. 


Now I hope you have a brief idea about how all this things work. 


What is Avalanche ? 

Avalanche is a blockchain network that is highly scalable and supports smart contracts. Avalanche was created to address issues plaguing other blockchain networks, such as network congestion and high gas fees. Avalanche uses three separate yet interoperable blockchains to support token creation, decentralized applications, and network validation to combat scalability-related issues facing other blockchain networks. The blockchains are referred to as the X-Chain, C-Chain, and P-Chain. AVAX is the native token of the Avalanche blockchain network that is used to cover gas fees. 




























Post a Comment (0)
Previous Post Next Post