Market Cap: $3.8891T 0.190%
Volume(24h): $173.222B 5.870%
Fear & Greed Index:

59 - Neutral

  • Market Cap: $3.8891T 0.190%
  • Volume(24h): $173.222B 5.870%
  • Fear & Greed Index:
  • Market Cap: $3.8891T 0.190%
Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos
Top Cryptospedia

Select Language

Select Language

Select Currency

Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos

How to set custom gas fees in MetaMask

When using MetaMask on Ethereum or EVM chains, you can customize gas fees by adjusting the Max Fee, Max Priority Fee, and Gas Limit to control transaction costs and speed.

Aug 09, 2025 at 05:21 pm

Understanding Gas Fees in Ethereum and EVM-Compatible Networks

When interacting with the Ethereum blockchain or any Ethereum Virtual Machine (EVM)-compatible network such as Binance Smart Chain, Polygon, or Arbitrum, every transaction requires computational resources. These resources are paid for using gas, a unit that measures the computational effort required to execute operations. The cost of gas is denominated in gwei, a subunit of ETH where 1 gwei equals 0.000000001 ETH. The total transaction fee is calculated by multiplying the gas limit (maximum units of gas allowed) by the gas price (amount of gwei per unit of gas).

MetaMask, a popular cryptocurrency wallet, allows users to interact with decentralized applications (dApps) and send transactions. By default, MetaMask suggests gas fees based on network congestion and transaction speed preferences (slow, average, fast). However, users have the option to set custom gas fees to gain more control over transaction costs and confirmation times. This feature is especially useful during periods of high network activity or when sending non-urgent transactions to save on fees.

Accessing the Gas Fee Customization Interface in MetaMask

To set custom gas fees in MetaMask, begin by initiating a transaction. This could be sending ETH, transferring ERC-20 tokens, or interacting with a smart contract. After filling in the recipient address and amount, click "Next" or "Confirm" depending on the action. This leads to the transaction confirmation screen.

On this screen, locate the "Gas" section, typically found below the recipient and amount details. Click on "Edit" next to the gas settings. A pop-up window will appear, offering three modes: "Basic" and "Advanced". Select "Advanced" to unlock full control over gas parameters. This view displays three key fields: Gas Limit, Max Priority Fee (Gwei), and Max Fee (Gwei). These fields are essential for customizing your transaction’s cost and priority.

Configuring Max Priority Fee and Max Fee

In EIP-1559 compliant networks like Ethereum, gas fees are split into two components: the base fee, which is burned, and the priority fee, which goes to miners or validators. The Max Fee represents the total amount you’re willing to pay per unit of gas, while the Max Priority Fee is the portion that incentivizes miners to include your transaction in the next block.

  • Adjust the Max Priority Fee (Gwei) to influence transaction speed. Higher values increase the likelihood of faster confirmation. During low congestion, even 1-2 gwei may suffice. In peak times, values of 10-50 gwei or more might be necessary.
  • Set the Max Fee (Gwei) to at least equal or exceed the current network base fee plus your chosen priority fee. MetaMask usually auto-fills a recommended Max Fee. You can manually increase it for urgency or lower it slightly to save costs, but setting it too low may result in transaction delays or failure.
  • Use real-time data from tools like Etherscan Gas Tracker or GasNow to determine competitive values.

Adjusting the Gas Limit Appropriately

The Gas Limit defines the maximum amount of gas units a transaction can consume. Simple ETH transfers typically require a limit of 21,000 units, which is the network standard. However, interactions with smart contracts—such as swapping tokens on Uniswap or minting NFTs—often require higher limits due to complex computations.

  • For standard transfers, ensure the Gas Limit is set to 21,000. Setting it higher unnecessarily increases cost; setting it lower risks transaction failure.
  • For dApp interactions, MetaMask usually estimates the required gas limit. Review this value carefully. If the dApp provides a recommended gas limit, match it. If unsure, increase the limit slightly above the suggested amount to avoid out-of-gas errors.
  • Never set the gas limit to an arbitrarily high number, as unused gas is refunded, but overestimation can still expose you to potential exploits in rare edge cases.

Confirming and Submitting the Custom Gas Transaction

After adjusting all gas parameters, review the estimated transaction cost displayed at the bottom of the confirmation window. This shows the total fee in ETH and its USD equivalent. Ensure this aligns with your expectations.

  • Click "Save" to apply the custom gas settings.
  • Return to the main confirmation screen and verify all details: recipient address, amount, and gas cost.
  • If everything is correct, click "Confirm" to broadcast the transaction to the network.
  • The transaction will appear in your MetaMask activity feed with a pending status. You can click on it to view details on Etherscan by selecting the "View on Etherscan" option.

If the transaction remains pending for an extended period, you may choose to speed it up by resubmitting with a higher gas fee or cancel it by sending a replacement transaction with the same nonce and zero value but higher fees.

Troubleshooting Common Custom Gas Issues

Users may encounter issues when setting custom gas fees. One common problem is a transaction remaining "Pending" indefinitely. This often occurs when the Max Fee is set below the current network base fee. To resolve this, use the "Speed Up" function in MetaMask to resend the transaction with increased fees.

Another issue is "Out of Gas" errors, which happen when the Gas Limit is too low for the operation. Check the dApp’s documentation or support channels for recommended gas limits. For token approvals or complex swaps, limits of 50,000 to 100,000+ may be required.

If a transaction fails but the gas fee is still deducted, this is normal. The network charges for the computational effort even if the transaction reverts. Always double-check contract interactions and dApp permissions before confirming.


Frequently Asked Questions

Can I set a gas fee lower than the network’s current base fee?

No. The Max Fee must be at least equal to the current base fee, otherwise the network will reject the transaction. Transactions with insufficient Max Fees will not be mined and may remain stuck in the mempool.

What happens if I set the Max Priority Fee to zero?

Setting the Max Priority Fee to zero means you’re not offering any incentive to miners or validators. While such transactions might eventually be processed during periods of very low congestion, they are likely to remain pending for a long time or fail.

How do I know what gas limit to use for a specific dApp?

Most dApps automatically suggest a gas limit when you initiate an action. You can also consult the dApp’s official documentation or community forums. For common actions like token approvals, limits around 45,000–60,000 are typical.

Is it safe to use custom gas settings on non-Ethereum networks like Polygon or BSC?

Yes. MetaMask supports custom gas settings on all EVM-compatible chains. However, gas prices on these networks are usually much lower. For example, Polygon often operates at 20–50 gwei, and BSC at 5 gwei. Always verify current network conditions before setting fees.

Disclaimer:info@kdj.com

The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!

If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.

Related knowledge

See all articles

User not found or password invalid

Your input is correct