起源学习站链上学习学院 › Level 1 Web3 入门 › Gas 是什么?ORIGIN LearnOn-chain Academy › Level 1 Web3 Basics › What is Gas?
🌱 Level 1 · Web3 入门🌱 Level 1 · Web3 Basics

Gas 是什么?What is Gas?

5 分钟5 min
学习目标:学完你能说清 Gas 是什么、为什么要付、以及为什么它有时贵有时便宜。Learning goal: after this lesson you'll be able to explain what Gas is, why you pay it, and why it's sometimes expensive and sometimes cheap.
大白话In plain wordsGas 就是你在链上做事要交的手续费,好比寄快递要付邮费。你转账、买卖、和合约互动,都得给网络付一点这个费用。Gas is the fee you pay to do things on-chain, like paying postage to send a package. Whether you transfer, trade, or interact with a contract, you pay the network a little of this fee.

Gas是你在区块链上进行操作时支付的手续费。不管是转账、兑换代币,还是和智能合约互动,都要付一笔 Gas,用来奖励维护网络的参与者,也防止有人恶意灌垃圾交易。Gas is the fee you pay when you do something on a blockchain. Whether you're transferring, swapping tokens, or interacting with a smart contract, you pay some Gas — it rewards the participants who maintain the network and also stops people from spamming junk transactions.

在以太坊上,Gas 用原生代币 ETH 支付;不同的链用各自的原生代币付费。所以在任何一条链上做事,钱包里都得留一点这条链的原生代币当油钱,否则交易发不出去。On Ethereum, Gas is paid in the native token ETH; different chains pay with their own native tokens. So to do anything on any chain, you must keep a little of that chain's native token in your wallet as gas money, or your transaction can't go through.

Gas 费不是固定的,它主要受两点影响:Gas fees aren't fixed; they're mainly affected by two things:

小贴士:发交易前钱包一般会预估 Gas 费给你看,觉得贵可以等网络不忙时再操作。不同链的手续费高低差别很大,具体多少请以你操作时钱包显示的实时费用为准,别照搬别人报的数字。Tip: before sending a transaction, your wallet usually estimates the Gas fee for you. If it looks expensive, you can wait until the network is less busy. Fees vary a lot between chains — go by the real-time fee your wallet shows at the moment you act, and don't just copy numbers someone else quotes.

案例Example同样是转一笔账,网络清闲时可能只花很少的 Gas,赶上大家都在抢着操作的高峰期,同一笔交易的手续费可能翻好几倍。这就像打车,平峰和高峰的价格不一样,堵不堵直接影响你付多少。The same transfer might cost very little Gas when the network is idle, but during a peak when everyone is rushing to transact, the same transaction's fee can multiply several times. It's like taking a taxi — off-peak and peak prices differ, and how congested it is directly affects what you pay.
配套工具(点开在主站打开):Related tools (open on the main site):
🛠 区块浏览器 ›🛠 Block Explorer ›

📝 本节测验📝 Quiz

1. Gas 本质上是什么?1. What is Gas essentially?

2. 在以太坊上 Gas 用什么支付?2. What is Gas paid with on Ethereum?

3. 下列哪种情况通常 Gas 费更高?3. Which situation usually has higher Gas fees?

4. 为什么钱包里要留一点原生代币?4. Why should you keep some native token in your wallet?

5. 关于 Gas 费的高低,正确的说法是?5. Which statement about Gas fee levels is correct?

❓ 常见问题❓ FAQ

为什么转账还要额外付 Gas?Why do I have to pay extra Gas just to transfer?

因为你的交易需要全网参与者帮你打包、验证、记录,Gas 就是给他们的报酬,同时也让恶意刷交易变得有成本。可以理解成让网络替你办事的服务费。Because your transaction needs participants across the network to package, verify, and record it. Gas is their reward, and it also makes spamming transactions costly. Think of it as a service fee for having the network do the work for you.

Gas 费能省吗?Can I save on Gas fees?

可以观察网络繁忙程度,避开拥堵高峰再操作,费用通常会低一些;简单操作也比复杂合约便宜。此外不同链手续费差异很大。具体怎么权衡请结合自身需求,本课不构成任何建议。You can watch how busy the network is and act outside congestion peaks, which is usually cheaper; simple operations also cost less than complex contracts. Fees also vary a lot between chains. How to weigh this is up to your own needs — this lesson is not advice of any kind.

钱包里没有原生代币能转账吗?Can I transfer if I have no native token in my wallet?

不能。哪怕你要转的是别的代币,也得用这条链的原生代币来付 Gas。所以在任何一条链上操作前,记得先留够一点原生代币当油钱。No. Even if the token you want to send is a different one, you still need this chain's native token to pay Gas. So before operating on any chain, remember to keep enough native token as gas money.

‹ 上一课‹ Previous私钥和助记词是什么?What are private keys and seed phrases?