Bitcoin.com

ETH gas是什么以及Ethereum中的费用如何运作?

了解以太坊中用于测量交易费用的单位,获取以太坊费用市场的详细信息,并了解如何自定义您支付的费用。

最后更新
发布时间
阅读时间1 min read
作者
Neil Author
尼尔·维拉多
Crypto content specialist since 2017; reviews iGaming platforms firsthand
What is ETH gas and how do fees work in Ethereum?

以太坊中的Gas是用于衡量执行交易所需计算努力的单位。更复杂的交易消耗更多的Gas,因此产生更高的费用。

使用备受信赖的多链Bitcoin.com Wallet应用程序,安全且轻松地购买、出售、交易和管理比特币(BTC)、以太币(ETH)以及最受欢迎的加密货币。该应用程序允许您在与以太坊公共网络及其他支持的区块链网络互动时自定义支付的费用。

以太坊费用概览

在以太坊网络上进行交易会产生需要用ETH支付的费用,这是网络的本地代币。这意味着您必须在钱包中拥有ETH余额才能在以太坊网络上执行任何类型的交易。

以太坊费用详解

在以太坊网络上进行交易的成本是双重的(自2021年8月生效的EIP-1559,以太坊的交易费用改革以来)。首先是基础费用,这部分费用会被销毁。其次是优先费用或小费,它会支付给网络验证者。这两种费用都受到市场力量的影响,这意味着当网络拥堵时,成本会上升。交易的总成本也取决于其复杂性。

交易复杂性是通过计算努力来衡量的,以“Gas”单位表示。例如,从一个钱包向另一个钱包发送ETH(您可以进行的最简单的交易之一),可能会消耗高达21,000单位的Gas。一个Gas单位等于0.000000001 ETH(10-9 ETH)。请注意,这种ETH单位也被称为giga-wei或gwei。

总费用的计算公式为:

$Gas单位 * (基础费用 + 小费)$

让我们看一个例子,Alice向Bob发送1 ETH。假设基础费用是100 gwei,Alice包含了10 gwei的小费。使用上述公式,我们可以计算出这是$21,000 * (100 + 10) = 2,310,000 gwei$或0.00231 ETH。

当Alice发送资金时,1.00231 ETH将从Alice的账户中扣除。Bob将获得1.0000 ETH。验证者将收到0.00021 ETH的小费,而0.0021 ETH的基础费用将被销毁。

在以太坊上自定义费用

最好的数字钱包允许您在以太坊网络上创建交易时自定义费用。例如,这里是在Bitcoin.com Wallet应用程序中如何自定义以太坊和以太坊虚拟机(EVM)链(包括Avalanche和Polygon)的交易费用:

  1. 在“输入发送金额”屏幕上,点击左上角的“网络费用”图标
  2. 从以下三个选项中选择一个:

'Eco'表示您将支付较低的费用,但交易时间较长

'Fast'在成本和速度之间达到最佳平衡

'Fastest'优先速度而非成本

Bitcoin.com Wallet应用程序会不断监控Gas的市场汇率以及当前的基础费用成本,以确定每个预设模式的最佳价格。不过,您也可以选择为每笔交易手动自定义网络费用设置。您可以使用像https://ethgasstation.info/这样的工具检查Gas费率,并根据Gas的市场汇率设置自定义费用。以下是在您的钱包中设置自定义费用的方法:

  1. 在交易屏幕上,点击“网络费用”图标。
  2. 选择“高级费用选项”。然后系统会提示您输入您想要的精确基础费用和优先费用。

Why gas exists

Gas isn't just a toll — it's what keeps a shared, permissionless computer usable. It serves three purposes:

  • Preventing spam. Because every operation costs something, malicious actors can't flood the network with frivolous or computationally expensive transactions.
  • Paying validators. Fees compensate the validators who process transactions and secure the network.
  • Allocating resources. The network's computing capacity is finite, so pricing it by demand ensures heavier operations pay proportionally more.

When you send a transaction you also set a gas limit — the maximum gas you're willing to spend. If execution runs past the limit the transaction fails, and the gas already consumed is not refunded, so wallets typically set sensible limits for you.

Gas beyond Ethereum

The same model applies across Ethereum Virtual Machine (EVM) blockchains, each with its own fee token — on Polygon, for example, gas is paid in POL. Other chains like Solana don't use the term "gas," but transactions still require the native token (SOL) to cover fees.

Keeping gas costs down

  • Time your transactions. The base fee rises with congestion, so non-urgent transactions cost less during quiet periods.
  • Use the fee presets. Choosing an economy setting when speed doesn't matter (see "Customizing fees" above) can meaningfully reduce what you pay.
  • Consider Layer 2 networks. Rollups process transactions off the main chain and settle back to it, cutting fees substantially for everyday activity.

使用 Bitcoin.com 钱包,安全地开始投资

迄今为止已创建超过8500万个钱包。这里提供您安全买卖、交易和投资比特币及加密货币所需的一切功能。

A screenshot of the Bitcoin.com Wallet app

扫描以下载 Bitcoin.com 钱包

用您的移动设备扫描此二维码,系统将自动将您重定向至相应的店铺页面。