Ethereum Denominations

There are 11 ways to divide an ether into other units. 

  • Wei is the lowest value unit, followed in identical order by Kwei, Mwei, Gwei, Szabo, Finney, Ether, KEther, MEther, GEther, and ultimately TEther. 
  • The distance between each unit and the unit next to it is 1^3 (or 3 decimals). 
  • As a result, 1 Wei is equal to 1000 times Kwei, 1 Kwei is equal to 1,000 Mwei, One Mwei is equal to 1,000 Gwei, and so on.
Unit  Denominations  
Wei 1 1
Kwei 1,000 10^3
Mwei 1,000,000 10^6
Gwei 1,000,000,000 10^9
Szabo 1,000,000,000,000 10^12
Finney 1,000,000,000,000,000 10^15
Ether 1,000,000,000,000,000,000 10^18
KEther 1,000,000,000,000,000,000,000 10^24
MEther 1,000,000,000,000,000,000,000,000 10^24
GEther 1,000,000,000,000,000,000,000,000,000 10^27
TEther 1,000,000,000,000,000,000,000,000,000,000 10^30

We have deployed the smart contract to check the Ethereum Units value is correct or not. 

Solidity




// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
/// @title A contract for different units used in Ethereum
/// @author Jitendra Kumar
/// @notice For now, this contract just show the Ethereum uints value correct or not
contract GFG {
    //Initialize the variable value
    bool oneWeiEqualTo=(1 wei == 1);
    string res1="1 wei is equal to 1 wei";
    bool oneGWeiEqualTo=(1 gwei == 10**9);
    string res2="1 gwei is equal to 10**9 (1e9) wei";
    bool oneEtherEqualTo=(1 ether == 10**18);
    string res3="1 ether is equal to 10**18 (1e18) wei";
     
    //Create the function to check the unit value is correct or not
    function weiUnit() public view returns(string memory){
        if(oneWeiEqualTo){
            return res1;
        }
        return "Ethereum unit value is wrong!";
    }
    function gweiUnit() public view returns(string memory){
        if(oneGWeiEqualTo){
            return res2;
        }
        return "Ethereum unit value is wrong!";
    }
    function etherUnit() public view returns(string memory){
        if(oneEtherEqualTo){
            return res3;
        }
        return "Ethereum unit value is wrong!";
    }
}


So, follow these steps to execute the above solidity smart contract:- 

1. Open Remix IDE. 

Open Remix IDE

2. Make a file with .sol extension and paste the given solidity code. 

Create GFG.sol File

3. Select the same Compiler version which is used in solidity code before clicking on Compile button.

Compile GFG.sol File

4. Click on Deploy button and get the deployed contract address.

Deploy GFG.sol File

5. Click on deployed contract address to get the result.

Output of  Deployed Smart Contract

What are the Different Units Used in Ethereum?

This article will discuss what a Denominated Currency is, multiple Bitcoin Units, BTC Denominations, Ethereum Denominations: Ether to Wei, Gwei to Ether, and More Altcoin Crypto Names and Denominations, and lastly the differences between Fiat and Crypto Denominations. Let’s discuss these topics in detail.

Similar Reads

What is Denominated Currency?

Denominated Currency refers to the currency in which the Account is denominated, as specified by the Customer in the Investment Account application. For example, all payments made using Your Card must be in the Denominated Currency....

Bitcoin Denominations

Bitcoin is measured using a metric system of denominations. Making bitcoin money, often known as BTC, compatible with other global currencies is its primary objective. By being divisible to the eighth decimal point, bitcoin aims to serve this purpose....

Ethereum

Decentralized and open-source, Ethereum is a blockchain that supports smart contracts. The platform’s native cryptocurrency is ether, abbreviated as ETH....

Ethereum Denominations

There are 11 ways to divide an ether into other units....

Altcoin Crypto

...

Fiat vs Crypto Denominations

An altcoin is a combination of two words, ALTernative COIN, which is how the term obtained its meaning. Altcoins are essentially Bitcoin alternatives. Except for bitcoin, all other digital currencies are classified as alternative coins....