Gas & Fees

JC
Last updated 4 months ago

Sending some transactions on the Ethereum network? Here's what's going on under the hood.

Whenever you buy, breed, and create or cancel an auction, your request gets sent to miners on the Ethereum network who crunch the numbers and confirm the transaction (thank you, miners!). For that service the miners receive a fee paid by the person submitting the transaction request (please note that entire fee goes to the miners, not us!). That fee, sometimes written as “Tx fee,” is determined by two factors: Your selected “Gas Price” and the amount of gas used.

Gas Price (Gwei) is the amount of Ether you offer to pay miners to process your transaction. Converting Gwei into Ether is simple: take the Gwei value and move the decimal point nine spaces to the left. So, 25 Gwei equals 0.000000025 ether.

“Gas Limit” sets the maximum amount of computational power you’ll allow the miner to use before they top out and stop processing your request. Essentially gas limit creates a ceiling on how much ether you want to spend on a given transaction as a way to keep costs reasonable. We recommend not tinkering with your gas limit, as MetaMask will always suggest the exact amount of gas to be used.

To calculate the maximum possible fee for a given transaction, multiply your gas price by your gas limit. So, as per our examples above, the maximum possible transaction fee in this instance would be:

250,000 x 25 Gwei = 250,000 x 0.000000025 = 0.00625 ETH.

What gas price should I use?

Setting a gas price is up to you – some people are more gassy than others – but there are helpful guidelines. The higher the gas price you set, the faster your transaction will get processed. So for more important transactions, think about setting a higher gas price. If, for example, you’re bidding on your dream Kitty and worry about another player swooping in and snatching it away, set the gas price higher to speed up your request and thwart cat burglars. If you’re just going to breed a couple of your Kitties, it’s fine to set it lower and save some money, but the transaction will take longer.

ETH Gas Station is a valuable tool to help manually set your gas price. Use their suggested “Gas Price Std” to make sure a transaction goes through quickly (usually, a few minutes). Select the Gas Price SafeLow for less important transactions that you’re willing to wait on (typically around thirty minutes, depending on network traffic). The Gas Station also shows you approximately how long a transaction will take at a specific Gas Price and lets you select your price based on the time you’re willing to wait.

Keep in mind that your actual transaction fee will almost always be lower than the potential maximum – great! Once a miner executes your transaction, you keep whatever ether is left over from your gas limit. But if your gas limit is too low and the miner maxes out, your transaction will get cancelled and you’ll still have to pay the max fee – not so great. So make sure to choose a gas limit with enough room to guarantee your transaction goes through. Remember, MetaMask will always suggest the exact amount of gas to use so there’s no need to adjust.