gas 上限是以太坊或类似链上一笔交易可以消耗的最大 gas 数量;支付的手续费等于实际消耗的 gas 乘以 gas 价格。
公式
手续费 = 消耗的 gas × (基础费用 + 优先费用)
详解
一笔简单的 ETH 转账消耗 21,000 gas;与合约交互则消耗更多。如果交易耗尽 gas 就会失败,但已消耗的 gas 仍需支付。区块也有 gas 上限,限制每个区块能容纳的计算量。
示例
一次兑换消耗 150,000 gas,总价格为 20 gwei。
手续费为 150,000 × 20 gwei = 0.003 ETH。
常见错误
01
把上限设得太低,交易失败还损失了手续费。
02
把 gas 上限与 gas 价格混淆。
03
不了解钱包的默认设置就随意修改。
交易者常问的问题
我需要支付全部 gas 上限吗?
不需要,你只为实际消耗的 gas 付费;未使用的 gas 不收费。
什么是 gwei?
十亿分之一个 ETH,是用于 gas 价格的单位。
测测你的水平 · 1/3
你每笔交易都使用固定的风险吗?
🇨🇳 问我吧! 💬
We (marketpedia.co) and selected third parties (4) collect personal information as specified in the privacy policy and use cookies or similar technologies for technical purposes and, with your consent, for functionality, experience, measurement and “marketing (personalized ads)” as specified in the cookie policy.
With respect to advertising, we and 1244 selected , may use precise geolocation data and identify devices based on information actively requested in order to store and/or access information on a device and process personal data like your usage data for the following : personalised advertising and content, advertising and content measurement, audience research and services development.
You can freely give, deny, or withdraw your consent at any time by accessing the preferences panel. Your choices apply only to this domain. Denying consent may make related features unavailable.
Use the “Accept” button to consent. Use the “Reject” button to continue without accepting.