Jump to content
Crypto News

What changed in crypto today

How to work out how much ETH to keep for gas, with a buffer

To work out how much ETH to keep for gas in your wallet, add each planned transaction’s gas limit times max fee, then add a 50% buffer and leave it unspent.

Crypto News Editorial4 min read

How to work out how much ETH to keep for gas, with a buffer

Keep enough ETH to cover the maximum fee for every transaction you plan, then add a 50% buffer so you can swap without using up the gas for your next move. On Ethereum, ShibaSwap lets you swap tokens, and shiba swap adds background on how the exchange works. You’ll need MetaMask or a similar wallet connected to Ethereum, plus ETH available for fees.

Calculate the ETH your planned transactions can require

Your gas total depends on the transactions you plan and the network demand when you send them. Under EIP-1559, the fee charged is gas used multiplied by the base fee plus the priority fee. Your wallet also checks that you can cover the gas limit multiplied by the max fee per gas. The max fee is the most the transaction can charge for each unit of gas; any unused fee is refunded.

  1. List the transactions you expect to make: an approval if the token needs one, the swap, and any later transaction to exit, such as swapping back. You need the token available before you can swap it, and an approval must be confirmed before the swap can use that token. Your wallet is ready when it is connected to Ethereum and holds the token and some ETH.

    An approval is a separate paid transaction. You may need one for each new token you trade.

  2. Open the first transaction in ShibaSwap and wait for the wallet confirmation. Read the gas limit and max fee per gas shown there. Multiply them to get the maximum ETH that transaction may need. The wallet’s estimated fee is not the amount to budget against.
  3. Reject the confirmation prompt, then repeat for each transaction on your list. This lets you price a swap without sending it: the confirmation shows its current maximum fee, and rejecting leaves the transaction unsent. Add the maximum ETH amounts for all the planned transactions.
  4. Add 50% to that sum for a buffer. Network demand and transaction type affect the fee, so the amount can change. Keep the resulting ETH in your wallet and do not spend it on the swap itself.
  5. Start the transactions when you’re ready. Your wallet ETH should exceed the gas total with the buffer, and each confirmation should proceed without an insufficient-funds warning. If a later prompt shows a higher max fee, update your total before sending.

Why the maximum fee matters for your wallet balance

The max fee matters because your wallet must be able to cover the transaction’s full gas limit at that fee cap before it sends the transaction. You may pay less once the transaction completes, but the wallet cannot rely on that lower final charge in advance. Keep the gas ETH separate from the ETH you plan to swap or spend; swapping out your full ETH balance can leave you unable to pay for the next transaction. This calculation covers swaps on Ethereum. Shibarium uses BONE for gas.

Related

Why does my wallet say insufficient funds for gas when I have ETH?

Your wallet may show this warning when your ETH balance is below the transaction’s gas limit multiplied by its max fee per gas. The balance may also need to cover ETH you are sending in the transaction, in addition to gas. Check the max fee in the prompt and keep your planned gas buffer available.

Do I get unused gas back?

Yes. The transaction fee is based on gas used, so any amount reserved by the gas limit that the transaction does not use is refunded. Budget for the max fee before sending, then the final charge can be lower.