Wei is the smallest denomination of ether, the currency used to facilitate transactional operations on the Ethereum blockchain network, where 10^18 or 1,000,000,000,000,000,000 wei is equivalent to one ether.
Wei is named after Wei Dai, a computer science graduate of the University of Washington who formerly worked in the cryptography research department at Microsoft. Wei Dai was part of a cypherpunk movement in the 1990s whose members developed the theoretical underpinnings for cryptocurrencies in the 2010s. For his innovation of bmoney, discussed in a self-published proto-crypto manifesto which laid the foundation for smart contracts, the atomic unit of ether is named after him.
Since all services and applications built on top of the Ethereum network require computational power, which is not freely available, some form of payment for the computational power is required.
Although ether is the currency of the network, it is often metaphorically referred to as the “fuel” of the Ethereum network. Its utility value as a cryptofuel is commonly referred to as “gas”.
Gas is a core part of all network requests and the sender of requests is required to pay for consumed computing resources. The overall gas cost is calculated based on both the volume and complexity of the request multiplied by the current gas price.
While the US dollar can only be divided into 100 equal parts i.e. into pennies, cryptocurrencies can be divided into much smaller atomic units.
These units ensure appropriate denotation of ether that may appear to be relatively small but is in fact a larger amount when converted to US dollars or other major currencies.
Therefore, ether has multiple different levels of wei. Each subunit indicates the quantity of units but as mentioned above, have alternative names. The table below illustrates the various units of wei.
Gwei, a blend of the words wei and giga, a unit prefix for billion, is another denomination of ether, the digital currency used on the Ethereum blockchain network. There are 1 billion wei in one gwei and there are 10^9 or 1,000,000,000 gwei in one ether. Gwei is also referred to as nanoether or Shannon, after Claude Shannon, a prominent American mathematician and cryptographer who’s regarded as the father of information theory.
By virtue of how gas prices function and are denoted, Gwei is the most commonly used unit of ether. As gas is the pricing value deemed necessary to execute a contract or other form of transaction on the Ethereum network, gwei is needed to pay for the computational power.
The standard transaction fee is 21,000 gwei on the Ethereum blockchain network. Typically, transaction fees will rise proportionately to the underlying complexity of the transaction
In July 2021, as part of the London Hard Fork, Ethereum Investment Proposal (EIP) 1559 changed the Ethereum blockchain network’s fee mechanism. Formerly, developers and the broader ecosystem had to rely upon a price auction, where the highest bidder would have their transaction processed first.
With the introduction of EIP-1559, a discrete base-fee would be registered for transactions to be included in the next block. Nevertheless, certain individuals can add a “tip” or “priority fee” to ensure a miner prioritizes their transaction. Developers interested in a deeper understanding of how to send transactions using EIP-1559 can read Alchemy’s EIP-1559 documentation.
The methodology to calculate the transaction fee is by using the following formula:
Gas Units (Limit) x (Base Fee + Tip)
Ultimately, fees based on block demand are far more straightforward and transparent for users today. In addition, developers can build a gas-fee estimator using EIP-1559 methods through Alchemy.
The three steps for converting wei to gwei is to divide the total amount of wei by 1 billion.
Developers can use a conversion calculator to understand the relationship between wei and gwei, or follow this simple step-by-step process:
This will give you the overall number of gwei.
For example, 420,069,000,000 wei / 1,000,000,000 = 420.069 gwei.
To calculate the price in terms of USD, multiply your total gwei by the current price of one Ether divided by 1,000,000,000 (10^9).
For example, if Ether is worth $1,000, then 420.069 gwei equals $0.000420069, or approximately 1/25th of one cent.
Similar to converting Wei to Gwei, users can use a wei converter or follow a 3-step conversion process:
This will give you the total amount of ETH.
For example 100 trillion wei / 10^18 = 0.0001 ETH.
To calculate the price in terms of USD, multiply your ETH by the current price of ETH.
For example, 0.0001 ETH is equal to $0.10 when 1 ETH costs $1,000 USD.