PlayDapp LV.20 GameManager
Oct 20, 2020, 02:13 PM 135 read

AWTG’s Blockchain explainer - Gas?

Tips and Guides

Knights, time for another dip into the waters of Blockchain, and what it means for you as gamers!

Along with the Gods: Knights of the Dawn: Tips and Guides - AWTG’s Blockchain explainer - Gas? image 2

This time, we’re going to focus on Gas!

Along with the Gods: Knights of the Dawn: Tips and Guides - AWTG’s Blockchain explainer - Gas? image 4

<...wrong kind of gas....>   It’s an essential part of the Ethereum Blockchain. As such, it’ll be useful to know a bit about it before we unleash Blockchain upcycling on Along With the Gods!   [...Let’s get to it!...]   You can think of Gas as just that! Gas like you use in a car, it’s the ‘fuel’ of Ethereum, used to keep everything running smoothly.   This super important fee is paid to miners, people who are dedicating time and processing power to solving cryptographically hard puzzles. Their work enables your transaction to complete.

Along with the Gods: Knights of the Dawn: Tips and Guides - AWTG’s Blockchain explainer - Gas? image 6

<...slightly different Miners - but hey love the enthusiasm...>   A great example of how this works would be sending money from one bank to another. You set the instruction to send the money, the bank does this on your behalf and you are obliged to pay a small fee for their service.   But miners do a little bit more, when you make a transaction through blockchain, miners also ‘pack’ your transaction and place it in a new block allowing it to complete. All of this takes computing resources, so you have to compensate them for their consumed resources, and you do that with Gas!   Of course, there are some technical terms with all of this. But don’t worry, we can easily understand them!   [...Terms to know...]   [...Gas...]   A unit that measures the amount of computation needed for a particular operation. As a comparable analogy, electricity is metered by kilowatt-hours. Using more computation and storage in Ethereum means that more Gas is used. A fundamental reason for metering is that it provides an incentive for people (miners).   [...Gas Fee...]   This represents the miner fee for any action or transaction. Gas Fee has two parts to it: Gas Limit and Gas Price.     [...Gas Limit...]   Gas Limit is the maximum amount of Gas a user is willing to pay for performing an action or confirming a transaction. In crypto wallets, the Gas Limit default values can vary depending on the time and/ or the type of action that is being requested and can be set by the user.   [...Gas Price...]   Gas Price is the amount of Gwei (a unit of measurement for Ether) a user is willing to spend on each unit of Gas.   The higher the Gas Price a sender is willing to pay, the faster it will be confirmed and put into a block by miners, and this is because the reward they receive will be higher.   Of course, the opposite is true.....     [...Key things to remember when setting a Gas Limit...]   1. Different transactions will generate different Gas costs. 2. If the Gas runs out miners will stop executing the operation. 3. Unused Gas comes back to you. If you set it higher than needed any remaining will be sent back to the user’s account. 4. Senders always pay miner fees, even if a transaction fails. A low gas fee that isn’t enough will result in an error. The transaction will be considered invalid and will be rejected, with an “Out of Gas” error. Gas spent will not be sent back.  

Along with the Gods: Knights of the Dawn: Tips and Guides - AWTG’s Blockchain explainer - Gas? image 8

  Remember the sender always pays the miner fee for computation regardless of whether the transaction goes through or not.   Want to know more? Really dig into the world of gas? Awesome!   There’s a great article by ConsenSys which can give you a whole lot more information!   https://media.consensys.net/ethereum-gas-fuel-and-fees-3333e17fe1dc

See, Gas isn't so bad!

Along with the Gods: Knights of the Dawn: Tips and Guides - AWTG’s Blockchain explainer - Gas? image 12

  Till the next blockchain article! Happy adventuring!   Medium: https://medium.com/playdappgames Twitter: https://twitter.com/playdapp_io

Comment 1

  • DongHyun Suh LV.4 Staff Oct 20, 2020, 04:04 PM

    Thanks! I learned a lot about gas and ethereum. Looking forward to blockchain coming to Along with the Gods!

1
Home