gas

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gas & Costs on Ethereum

以太坊Gas与成本

What You Probably Got Wrong

你可能误解的点

Your gas estimate is 100-600x too high. Most LLMs confidently state gas is 10-30 gwei. Post-Fusaka (Dec 2025), typical base fee is under 1 gwei — usually 0.1-0.5 gwei. Verify:
cast base-fee --rpc-url https://eth.llamarpc.com
  • Base fee: Under 1 gwei (not 30-100 gwei) — fluctuates, check live
  • Priority fee (tip): ~0.01-0.1 gwei
  • ETH price: ~$2,000 (not $2,500-3,000) — volatile, always check a Chainlink feed or CoinGecko
你的Gas估算可能高出100-600倍。大多数大语言模型会笃定地说Gas费用是10-30 gwei,但在Fusaka升级(2025年12月)之后,典型的基础费用低于1 gwei——通常在0.1-0.5 gwei之间。可通过以下命令验证:
cast base-fee --rpc-url https://eth.llamarpc.com
  • 基础费用(Base fee):低于1 gwei(而非30-100 gwei)——会波动,请查看实时数据
  • 优先费用(小费,Priority fee):约0.01-0.1 gwei
  • ETH价格:约2000美元(而非2500-3000美元)——价格波动大,请始终查看Chainlink喂价或CoinGecko

What Things Actually Cost (Early 2026)

2026年初的实际成本

Costs calculated at ETH ~$2,000. Gas fluctuates — use
cast base-fee
for current. These are order-of-magnitude guides, not exact quotes.
ActionGas UsedCost at 0.1 gweiCost at 1 gwei (busy)Cost at 10 gwei (event)
ETH transfer21,000$0.004$0.04$0.42
ERC-20 transfer~65,000$0.013$0.13$1.30
ERC-20 approve~46,000$0.009$0.09$0.92
Uniswap V3 swap~180,000$0.036$0.36$3.60
NFT mint (ERC-721)~150,000$0.030$0.30$3.00
Simple contract deploy~500,000$0.100$1.00$10.00
ERC-20 deploy~1,200,000$0.240$2.40$24.00
Complex DeFi contract~3,000,000$0.600$6.00$60.00
成本计算基于ETH价格约2000美元。Gas费用会波动——请使用
cast base-fee
查询当前价格。以下为数量级参考,非精确报价。
操作消耗Gas0.1 gwei时的成本1 gwei(繁忙时)的成本10 gwei(活动高峰时)的成本
ETH转账21,0000.004美元0.04美元0.42美元
ERC-20转账~65,0000.013美元0.13美元1.30美元
ERC-20授权~46,0000.009美元0.09美元0.92美元
Uniswap V3交易~180,0000.036美元0.36美元3.60美元
NFT铸造(ERC-721)~150,0000.030美元0.30美元3.00美元
简单合约部署~500,0000.100美元1.00美元10.00美元
ERC-20合约部署~1,200,0000.240美元2.40美元24.00美元
复杂DeFi合约~3,000,0000.600美元6.00美元60.00美元

Mainnet vs L2 Costs (Early 2026)

主网与L2成本对比(2026年初)

ActionMainnet (0.1 gwei)ArbitrumBasezkSyncScroll
ETH transfer$0.004$0.0003$0.0003$0.0005$0.0004
ERC-20 transfer$0.013$0.001$0.001$0.002$0.001
Swap$0.036$0.003$0.002$0.005$0.004
NFT mint$0.030$0.002$0.002$0.004$0.003
ERC-20 deploy$0.240$0.020$0.018$0.040$0.030
Key insight: Mainnet is now cheap enough for most use cases. L2s are 5-10x cheaper still.
操作主网(0.1 gwei)ArbitrumBasezkSyncScroll
ETH转账0.004美元0.0003美元0.0003美元0.0005美元0.0004美元
ERC-20转账0.013美元0.001美元0.001美元0.002美元0.001美元
交易兑换0.036美元0.003美元0.002美元0.005美元0.004美元
NFT铸造0.030美元0.002美元0.002美元0.004美元0.003美元
ERC-20合约部署0.240美元0.020美元0.018美元0.040美元0.030美元
核心结论:如今主网费用已足够低廉,可满足大多数使用场景。L2费用则比主网还要便宜5-10倍。

Why Gas Dropped 95%+

为何Gas费用下降95%以上

  1. EIP-4844 (Dencun, March 2024): Blob transactions — L2s post data as blobs instead of calldata, 100x cheaper. L2 batch cost went from $50-500 to $0.01-0.50.
  2. Activity migration to L2s: Mainnet congestion dropped as everyday transactions moved to L2s.
  3. Pectra (May 2025): Doubled blob capacity (3→6 target blobs).
  4. Fusaka (Dec 2025): PeerDAS (nodes sample 1/8 of data) + 2x gas limit (30M→60M).
  1. EIP-4844(Dencun升级,2024年3月):Blob交易——L2将数据以Blob形式发布,而非调用数据(calldata),成本降低100倍。L2批量交易成本从50-500美元降至0.01-0.50美元。
  2. 活动迁移至L2:日常交易转移至L2后,主网拥堵情况缓解。
  3. Pectra升级(2025年5月):Blob容量翻倍(从3个目标Blob增至6个)。
  4. Fusaka升级(2025年12月):PeerDAS(节点仅采样1/8的数据)+ Gas限制翻倍(从3000万增至6000万)。

L2 Cost Components

L2成本构成

L2 transactions have two cost components:
  1. L2 execution gas — paying the sequencer
  2. L1 data gas — paying Ethereum for data availability (blobs post-4844)
Example: Swap on Base
  • L2 execution: ~$0.0003
  • L1 data (blob): ~$0.0027
  • Total: ~$0.003
L2交易包含两部分成本:
  1. L2执行Gas——支付给sequencer(排序器)的费用
  2. L1数据Gas——为以太坊的数据可用性付费(4844升级后为Blob)
示例:Base上的交易兑换
  • L2执行费用:~0.0003美元
  • L1数据(Blob)费用:~0.0027美元
  • 总成本:约0.003美元

Real-World Cost Examples

实际成本案例

Deploy a production ERC-20 on mainnet: ~$0.50 (was $200-500 in 2021-2023)
DEX aggregator doing 10,000 swaps/day:
  • Mainnet: $150/day ($4,500/month)
  • Base L2: $10/day ($300/month)
NFT collection mint (10,000 NFTs):
  • Mainnet: $150 total
  • Arbitrum: $10 total
在主网部署生产级ERC-20合约:约0.50美元(2021-2023年期间为200-500美元)
每日完成10000次交易的DEX聚合器
  • 主网:150美元/天(4500美元/月)
  • Base L2:10美元/天(300美元/月)
NFT系列铸造(10000个NFT)
  • 主网:总计150美元
  • Arbitrum:总计10美元

Practical Fee Settings (Early 2026)

实用费用设置(2026年初)

javascript
// Rule of thumb for current conditions
maxFeePerGas: "1-2 gwei"          // headroom for spikes (base is usually 0.1-0.5)
maxPriorityFeePerGas: "0.01-0.1 gwei"   // enough for quick inclusion
Spike detection:
javascript
const feeData = await provider.getFeeData();
const baseFee = Number(feeData.maxFeePerGas) / 1e9;
if (baseFee > 5) console.warn(`Gas spike: ${baseFee} gwei. Consider waiting.`);
Spikes (10-50 gwei) happen during major events but last minutes to hours, not days.
javascript
// 当前条件下的经验法则
maxFeePerGas: "1-2 gwei"          // 为价格波动预留空间(基础费用通常为0.1-0.5 gwei)
maxPriorityFeePerGas: "0.01-0.1 gwei"   // 足以快速打包交易
波动检测
javascript
const feeData = await provider.getFeeData();
const baseFee = Number(feeData.maxFeePerGas) / 1e9;
if (baseFee > 5) console.warn(`Gas价格飙升:${baseFee} gwei。建议等待。`);
价格飙升(10-50 gwei)通常发生在重大活动期间,但仅持续数分钟至数小时,而非数天。

Checking Gas Programmatically

程序化查询Gas费用

bash
undefined
bash
undefined

Foundry cast

Foundry cast命令

cast gas-price --rpc-url https://eth.llamarpc.com cast base-fee --rpc-url https://eth.llamarpc.com cast blob-basefee --rpc-url https://eth.llamarpc.com
undefined
cast gas-price --rpc-url https://eth.llamarpc.com cast base-fee --rpc-url https://eth.llamarpc.com cast blob-basefee --rpc-url https://eth.llamarpc.com
undefined

When to Use Mainnet vs L2

何时选择主网 vs L2

Use mainnet when: DeFi, governance, identity, high-value transfers, composing with mainnet liquidity, or when you don't have a concrete reason for an L2. Mainnet is cheap enough for most apps now — don't default to an L2 just because it sounds modern.
Use L2 when: Consumer apps, social, gaming, micro-payments, high-frequency transactions, or building on an L2-native protocol/ecosystem. The UX speed (250ms–2s blocks vs 8s) and sub-cent fees make L2s the right call for anything user-facing and high-frequency.
Hybrid: Many projects store value on mainnet, handle transactions on L2.
选择主网的场景:DeFi、治理、身份认证、高价值转账、与主网流动性组合,或是没有明确理由选择L2时。如今主网费用已足够低廉,可满足大多数应用需求——不要仅仅因为L2听起来更“新潮”就默认选择它。
选择L2的场景:消费级应用、社交应用、游戏、微支付、高频交易,或是基于L2原生协议/生态开发时。L2的用户体验速度(区块时间250ms–2秒,主网为8秒)以及低于1美分的费用,使其成为面向用户的高频应用的理想选择。
混合方案:许多项目将资产存储在主网,在L2处理交易。

Live Gas Trackers

实时Gas追踪工具

Data Freshness

数据时效性

Last verified: 2026-03-03 | Base fee: ~0.29 gwei | ETH: ~$1,988 | Gas limit: 60M (post-Fusaka)
If this date is more than 30 days old, verify current gas with:
bash
cast base-fee --rpc-url https://eth.llamarpc.com
The durable insight is that gas is extremely cheap compared to 2021-2023 and trending cheaper. Specific numbers may drift but the order of magnitude is stable.
最后验证时间:2026-03-03 | 基础费用:约0.29 gwei | ETH价格:约1988美元 | Gas限制:6000万(Fusaka升级后)
如果该日期已超过30天,请通过以下命令验证当前Gas费用:
bash
cast base-fee --rpc-url https://eth.llamarpc.com
核心结论是,与2021-2023年相比,如今Gas费用已极其低廉,且有进一步降低的趋势。具体数值可能会有所浮动,但数量级保持稳定。