What are Gas and Gwei

Basic Concepts
Cập nhật2026-08-21
754

Gas and Gwei are crucial concepts in the Ethereum blockchain. Gas measures the consumption of computational resources, while Gwei is a common unit used to denote Gas Price. By appropriately setting the Gas Limit and Gas Price, transaction fees can be effectively controlled, ensuring smooth transactions.


Definition of Gas

Gas is a unit used to measure computational workload in Ethereum. All operations on the Ethereum network (such as transfers, smart contract executions, etc.) consume computational resources, and Gas quantifies this resource consumption. The main purposes of Gas are to prevent network resource abuse and to incentivize miners to participate in transaction verification and block generation.


How Gas Works

Each Ethereum transaction must specify a Gas Limit, which is the maximum amount of Gas the transaction is willing to consume. During execution, a certain amount of Gas is consumed. If the consumption reaches the Gas Limit, the transaction will be terminated, and the previously consumed Gas will not be refunded. Additionally, a Gas Price must be specified, indicating the price one is willing to pay per unit of Gas. Miners prioritize transactions with higher Gas Prices as this means higher transaction fees for them.


Definition of Gwei

Gwei is a denomination unit in Ethereum specifically used to express Gas Price. One Gwei equals 10^9 wei, and one ETH equals 10^18 wei. Therefore, one ETH equals 10^9 Gwei. Using Gwei makes it easier to express and understand Gas Price because ETH’s denomination is too large to be conveniently used directly for Gas Price.


Application of Gwei

When setting the Gas Price for a transaction, Gwei is commonly used as the unit. For instance, if you are willing to pay 20 Gwei per unit of Gas, you need to specify the Gas Price as 20 Gwei in the transaction. This way, miners processing the transaction will clearly understand the fee you are willing to pay.


Mục lục

Đề xuất đọc

Xem thêm
What Is a Crypto Debit Card
Basic Concepts
What Are Liquidators?
Basic Concepts
What is the Bitcoin Rainbow Chart?
Basic Concepts