Crypto glossary
Wei
Wei is the smallest unit of ether: one ETH equals 10^18 wei. Smart contracts and fee calculations count balances in wei, while users see ETH or gwei.
Wei is the base unit of ether, named after the cryptographer Wei Dai. One ether equals one quintillion wei (10^18), and the intermediate unit most people meet is the gwei, which is one billion wei (10^9). Under the hood, the Ethereum protocol never handles decimals: every balance, transfer and gas price is an integer number of wei.
That integer design is why developers and block explorers show amounts in wei and why wallets have to convert them before displaying them. A contract that stores a balance of 1500000000000000000 is simply holding 1.5 ETH. Gas prices are quoted in gwei because wei figures would be unreadably long, and the same idea carries over to ERC-20 tokens, which define their own number of decimals, usually 18.
Confusing units is a classic source of bugs and costly mistakes: passing a value in ETH where a function expects wei, or the reverse, can send a million times more or less than intended. Wei only applies to ether; other chains have their own base units, such as satoshis on Bitcoin and lamports on Solana.
Example
A developer testing a payment sets the value field to 10000000000000000 and the wallet shows the transfer as 0.01 ETH, because the protocol reads the number in wei.
