Ethereum Gas Fees Explained: How Much Does It Cost to Deploy an ERC-20 Token?
Gas fees are the one part of Ethereum that almost everyone finds confusing at first — and it's the first question people ask when they're thinking about launching a token. How much will this actually cost? The answer is: it depends, but it's less than you think once you understand the system. Let's break down everything you need to know, from what gas actually is to what you'll realistically pay to deploy an ERC-20 token today.
What Are Ethereum Gas Fees?
Think of gas as fuel for the Ethereum Virtual Machine — the EVM. Every operation the EVM performs costs a certain amount of computation. When you send ETH, that's cheap: a simple transfer. When you deploy a smart contract, that involves storing thousands of bytes of code on-chain and executing initialization logic — much more expensive. Gas is the unit that measures how much computation a given operation requires.
Gas fees exist for a practical reason: they prevent the network from being spammed. If it cost nothing to do computation on Ethereum, anyone could flood the network with trivial transactions, grinding it to a halt. Gas fees create an economic barrier that prioritizes valuable transactions and compensates the people running the network for their resources.
Here's a common misconception worth clearing up: gas fees don't go to the Ethereum Foundation or Vitalik Buterin. They go to Ethereum's validators — the people and entities who stake ETH and run the software that processes transactions and secures the network. Since Ethereum's transition to proof-of-stake in 2022 (the Merge), these are stakers rather than miners, but the economics are similar: they contribute resources, they get paid in ETH.
A brief history: gas has been part of Ethereum since the very beginning in 2015. For the first six years, fees were determined by a pure auction: you bid what you were willing to pay, miners prioritized high bidders. This worked but led to wildly unpredictable fees — especially during periods of high congestion, when simple ETH transfers could cost $50+ and smart contract interactions could cost hundreds of dollars. EIP-1559, implemented in August 2021, fundamentally changed how this works, and we'll cover that in detail shortly.
How Gas Fees Are Calculated
At its core, the formula is simple:
Total Fee = Gas Units Used × Gas Price
Gas units (also called "gas" or "gas limit") measure the computational work. A simple ETH transfer costs exactly 21,000 gas units. Deploying a basic ERC-20 token contract uses roughly 1.5 million to 2 million gas units, depending on the features included. The EVM has a fixed "price" in gas units for every type of operation — storage writes, arithmetic, hashing, and so on.
Gas price is measured in gwei — a denomination of ETH. One gwei equals 0.000000001 ETH (one billionth of an ETH). When people say gas is "10 gwei" or "50 gwei," they're describing the price per gas unit in these tiny fractions of ETH.
Here's a quick conversion to make it concrete: if gas is 30 gwei and you're using 1.5 million gas units, your fee is:
1,500,000 × 30 gwei = 45,000,000 gwei = 0.045 ETH
At an ETH price of $3,000, that's about $135. At an ETH price of $1,500, it's $67.50. The same gas price produces very different dollar costs depending on ETH's market price — which is why gas cost estimates in USD can vary dramatically over time even if the network isn't congested.
EIP-1559 and How It Changed Gas
Before EIP-1559, gas worked like a blind auction. You submitted a transaction with a gas price bid, and miners prioritized whoever bid highest. During calm periods, you could get away with low bids. During congestion, you'd either overpay, wait hours, or have your transaction fail. It was stressful, unpredictable, and inefficient — lots of ETH got paid as fees with no other benefit to the network.
EIP-1559, introduced in the London hard fork (August 2021), replaced this with a two-component system:
- BASEFEE — A protocol-determined base fee per gas unit that applies to every transaction. This fee is calculated algorithmically based on how full the previous block was. If the last block was more than 50% full, BASEFEE increases for the next block. If it was less than 50% full, BASEFEE decreases. This makes fees more predictable — you can look at the current BASEFEE and know roughly what you'll pay.
- Priority fee (tip) — An optional tip you pay directly to the validator to prioritize your transaction. During low congestion, even a tiny tip (0.1–1 gwei) is enough. During high congestion, you might tip 2–5 gwei to get included faster.
The critical part: the BASEFEE is burned — it's permanently removed from the ETH supply. Only the priority fee goes to validators. This is hugely significant: EIP-1559 turned Ethereum into a deflationary asset during periods of high network usage. When transaction volume is high enough, more ETH is burned per day than is issued to validators, meaning the total supply of ETH actually decreases. This dynamic has driven considerable discussion about ETH's long-term value proposition.
In practical terms, EIP-1559 also introduced the maxFeePerGas and maxPriorityFeePerGas parameters that you'll see in wallets like MetaMask:
maxFeePerGas— The maximum total you're willing to pay per gas unit (BASEFEE + tip). You never pay more than this, even if the BASEFEE spikes. Unspent gas above the actual BASEFEE is refunded.maxPriorityFeePerGas— The maximum tip you're willing to give validators.
How Much Does It Cost to Deploy an ERC-20 Token?
This is the question everyone actually wants answered. The honest answer: it varies, but here are real numbers.
A standard ERC-20 token deployment — basic transfer functionality, fixed supply, nothing fancy — uses approximately 1.5 million to 1.8 million gas units. Add mintable, burnable, or pausable features and you're looking at closer to 1.8 million to 2.5 million gas units.
Let's run the numbers at different gas price levels (assuming ETH at $3,000):
- 10 gwei (very low congestion, off-peak hours) — 1.7M gas × 10 gwei = 0.017 ETH ≈ $51
- 30 gwei (normal network conditions) — 1.7M gas × 30 gwei = 0.051 ETH ≈ $153
- 80 gwei (high congestion, peak hours) — 1.7M gas × 80 gwei = 0.136 ETH ≈ $408
If ETH is trading at $1,500, cut those numbers roughly in half. If ETH is at $5,000, multiply them by about 1.67. The gas units consumed don't change — only the gwei price and the ETH/USD rate affect your dollar cost.
Practically speaking, most token deployments done during reasonable network conditions (10–40 gwei) with ETH in a typical price range cost somewhere between $30 and $120. That's the realistic ballpark for most people reading this. You can check the current cost estimate using the gas tracker on Etherscan before you deploy — we'll cover that below.
How Token Features Affect Deployment Cost
Every feature you add to your token means more Solidity code, which means more bytecode stored on-chain, which means more gas. Here's a rough breakdown of how common features affect your deployment cost:
- Basic ERC-20 (no extras) — Baseline. Roughly 1.5M gas.
- + Mintable — Adds mint function and access control. +100K–150K gas. Roughly $10–$20 extra at 30 gwei/$3K ETH.
- + Burnable — Adds burn function. +50K–80K gas. A few dollars extra.
- + Pausable — Adds pause/unpause and the whenNotPaused modifier on transfers. +80K–120K gas.
- + Capped supply — Adds a supply cap check to the mint function. Minimal extra gas.
- + Permit (ERC-2612) — Adds off-chain signing for approvals. +100K–150K gas.
A fully-featured token with mint, burn, pause, and permit might use 2.2–2.5 million gas total — adding maybe $30–$60 on top of the base deployment cost at normal gas prices. It's worth noting that these optional features have ongoing costs too: every time someone calls the mint or pause function, that costs gas at the time of the call (though far less than the initial deployment).
The practical advice: only add features you actually need. A community token with a fixed supply doesn't need a mint function. A token where the team wants emergency pause capability does need it. Think through your use case first — our tokenomics guide goes into detail on which features make sense for different token types.
How to Test for Free on Sepolia Testnet
Here's something not enough people know: you can deploy the exact same contract to Ethereum's Sepolia testnet using free test ETH, and it behaves identically to mainnet — same deployment process, same MetaMask flow, same Etherscan verification. The only difference is the test ETH has no real value.
This is the single best thing you can do before a mainnet deployment. If there's a mistake in your token parameters — wrong decimals, wrong initial supply, a missing feature you realize you needed — you find out on testnet for free instead of on mainnet for $50–$100.
To create ERC-20 token for free on testnet:
- Switch your MetaMask wallet to the Sepolia network (Settings → Networks → Add Network, or find it in MetaMask's network dropdown if already added)
- Get free Sepolia ETH from a faucet — try the Alchemy Sepolia Faucet or the Chainlink Faucet, both of which give small amounts of test ETH daily
- Deploy your token exactly as you would on mainnet — same tool, same configuration
- Test: send tokens to another address, try any admin functions, verify on the Sepolia version of Etherscan (sepolia.etherscan.io)
- Once you're confident, switch back to Ethereum mainnet and deploy with real ETH
The full test-to-mainnet cycle typically takes less than an hour and can save you the cost of a real deployment if you catch an error. It's especially valuable if this is your first token and you haven't gone through the deployment flow before. Mistakes happen — decimals get set to 8 instead of 18, initial supply is entered wrong, the wrong features get selected. Test first.
How to Reduce Your Gas Fees
You can't change how many gas units a deployment uses — that's determined by your contract's complexity. But you can control when you deploy and at what gas price, which can make a meaningful difference.
Deploy during low-traffic periods. Ethereum gas prices are highly correlated with overall network usage. Historically, gas is cheapest on weekend mornings UTC (Saturday and Sunday between midnight and 8am UTC) and on weekday nights UTC (2am–6am UTC). During these windows, you might see BASEFEE drop to 5–15 gwei instead of 30–80 gwei during peak hours. That can cut your cost by 50–80%.
Use the Etherscan Gas Tracker. Before deploying, check etherscan.io/gastracker for current gas prices and the historical chart. If the network is spiking — say, because a popular NFT mint just went live or there's unusual DeFi activity — wait an hour or two. Gas spikes during events are often temporary.
Understand gas limit vs. gas price. The gas limit is the maximum number of gas units your transaction is allowed to use (you set this as a ceiling). The gas price is what you pay per unit. Common mistake: increasing the gas limit to try to speed up a transaction. This doesn't work — gas limit affects the maximum computation allowed, not the fee. What actually determines transaction speed is the gas price (specifically the priority fee). Wallets typically estimate the correct gas limit automatically; don't touch it unless a transaction is failing due to insufficient gas.
Don't deploy during Ethereum events. Major token launches, NFT drops, and DeFi protocol launches cause demand spikes that drive up gas significantly. If you can monitor Ethereum social channels (Twitter/X crypto Twitter, Reddit) for upcoming events, deploying in quieter periods helps.
Reading the Etherscan Gas Tracker
The Etherscan Gas Tracker (etherscan.io/gastracker) is one of the most useful free tools available to anyone deploying on Ethereum. Here's how to read it:
The tracker shows three tiers:
- Low (Slow) — The gas price at which your transaction will likely be included within the next 5–10 minutes. Fine for non-urgent deployments.
- Average (Standard) — Typically included within 1–3 minutes. Good for most deployments.
- High (Fast) — Likely included in the next block or two. Use this only if timing matters.
Each tier shows a gwei value. You can plug this directly into MetaMask's advanced gas settings if you want to set a specific price, or just use the wallet's default which usually corresponds to the "standard" tier.
The gas tracker also shows a historical chart of gas prices over the past week. This is invaluable for planning: you can see when prices regularly dip and schedule your deployment accordingly. On most weeks, the pattern is remarkably consistent — weekday peaks during European and American business hours, drops overnight and on weekends.
ERC-20 Tokens on Layer 2 Networks
Layer 2 networks — Polygon, Arbitrum, Optimism, Base, zkSync — are a growing alternative to deploying directly on Ethereum mainnet. The appeal is obvious: deploying on Arbitrum costs cents instead of dollars. Swapping on Polygon costs fractions of a penny instead of multiple dollars.
The technical explanation: Layer 2s process transactions off the main Ethereum chain and periodically submit compressed transaction data to mainnet. They inherit Ethereum's security while dramatically increasing throughput and reducing individual transaction costs.
For ERC-20 tokens specifically, here's what Layer 2 deployment looks like in practice:
- Polygon (PoS) — Deployment costs typically under $0.10. Extremely cheap. MATIC is the gas token. Decent liquidity on QuickSwap and SushiSwap. Less prestigious than Ethereum mainnet but has genuine user activity.
- Arbitrum — Deployment costs typically $0.50–$3.00 depending on Ethereum mainnet gas at the time of L2 batch submission. Growing DeFi ecosystem, significant Uniswap V3 liquidity.
- Optimism / Base — Similar cost profile to Arbitrum. Base (built by Coinbase) has seen rapid growth in active users.
Trade-offs to consider before going Layer 2:
- Liquidity is fragmented. Most serious DeFi activity still lives on Ethereum mainnet. L2s have less liquidity, which means larger price impact for trades.
- Bridging adds friction. Users need to bridge ETH or assets from mainnet to the L2 to interact with your token. Many non-technical users find this confusing.
- Perception matters. "Ethereum mainnet" carries more prestige and seriousness than "Polygon" for many communities. This is changing, but it's still a real consideration for token positioning.
- ERC-20 standard compatibility. Layer 2 ERC-20 tokens are still ERC-20 tokens — the standard is the same. But the token address on Arbitrum is different from the same token on mainnet, and cross-chain compatibility requires bridges.
For most serious token launches, Ethereum mainnet is still the default choice. For experimentation, testing concepts, or projects with communities that are comfortable with L2s, the cost savings can be significant.
Cost Comparison: DIY vs Using ERC Token Creator vs Hiring a Developer
People often compare their options when thinking about creating an ERC-20 token. Let's be real about the costs across different approaches.
Option 1: DIY in Remix IDE
If you want to write your own Solidity, you absolutely can — and it's a great learning experience. You'll need to learn Solidity syntax, understand OpenZeppelin imports, compile in Remix, and handle the deployment manually. Time investment: 10–40 hours depending on your starting point. The gas cost at deployment is exactly the same as using a generator (the deployed bytecode is what costs gas, not how you created it). Main costs: your time. If you value your time at $50/hour and it takes 20 hours, that's a $1,000 time investment plus the gas fee.
Option 2: Using ERC Token Creator
With a tool like our ERC-20 token creator, you configure your token in a form-based UI, the contract is generated from audited templates, and you deploy with MetaMask. No Solidity knowledge required. Time investment: 5–15 minutes. Platform fee: none on our platform — you pay only the Ethereum gas cost. Total cost: $30–$120 in gas depending on conditions. This approach is ideal if you understand what you want but don't need to write custom contract logic.
Option 3: Hiring a Solidity Developer
For a custom token with complex features — staking, vesting, governance, custom fee mechanics — hiring a developer makes sense. Rates for competent Solidity developers run $100–$300/hour. A basic custom token takes 5–20 hours of development plus testing. Total cost: $500 to $5,000+, plus the gas fee. For truly complex DeFi protocols, costs can reach $50,000–$200,000. Worthwhile for serious projects; overkill for a community token with standard features.
The honest verdict: for most people asking about the cost to create an ERC-20 token, a generator tool that produces OpenZeppelin-based contracts is the right call. You get audited code, a clean deployment experience, and you pay only for the blockchain transaction. If you later grow and need custom features, hire a developer to extend the contract — or deploy a new version.
If you're ready to launch, check out our full step-by-step guide to creating an ERC-20 token and our guide on verifying your contract on Etherscan once you've deployed. And before you deploy on mainnet, make sure to review our article on ERC-20 security best practices — especially the pre-deployment checklist.
Frequently Asked Questions
Why did my transaction fail and I still lost the gas fee?
This is one of the most frustrating parts of Ethereum. When a transaction fails — whether due to insufficient gas, a contract error, or a slippage condition — the EVM still consumed computation up to the point of failure. Validators still did work processing your transaction, so they keep the gas used. You don't get charged the full gas limit, only the gas actually consumed before the revert. To minimize failed transaction costs: always test on Sepolia first, don't set your gas limit artificially low, and pay attention to error messages in Etherscan if a transaction fails.
Can I get a gas refund?
Partially. If your transaction uses less gas than the limit you set, the unused portion is refunded automatically — MetaMask handles this. You never pay for gas you didn't use. However, there's no refund for gas consumed by a failed transaction, and you can't get a refund on gas from a successfully completed deployment if you simply change your mind about the token.
What is the difference between gas limit and gas price?
Gas limit is the maximum number of computational units you're authorizing the transaction to consume. Think of it as the tank size. Gas price is what you pay per unit of computation. Think of it as the price per liter of fuel. Your total fee is limit × price, but you only pay for what's actually used (up to the limit). For deployment transactions, MetaMask estimates the gas limit automatically by simulating the transaction — you generally don't need to adjust it. For gas price, you can use the wallet's default or look at the Etherscan Gas Tracker to optimize timing.
Why is gas so expensive on Ethereum?
Ethereum's block space is limited — there's only so much computation that can fit in each block, and blocks are produced roughly every 12 seconds. When demand for block space exceeds supply (which happens during high-activity periods), fees rise as users compete for inclusion. Ethereum's approach is to keep blocks small to maximize decentralization (so anyone can run a node), accepting that fees will be higher during peak demand. Layer 2 solutions were developed specifically to address this by processing more transactions off-chain while inheriting Ethereum's security.
When is the cheapest time to deploy an ERC-20 token?
Based on historical gas data, the cheapest times to deploy are typically Saturday and Sunday between midnight and 8am UTC — this corresponds to late Friday night and early Saturday morning in North America, and early morning in Asia on Saturday. During these windows, gas can drop 50–70% below weekday peak prices. You can verify this by looking at the "Gas Price History" chart on the Etherscan Gas Tracker page before scheduling your deployment. A few hours of patience can save meaningful money on mainnet deployments.