Wei
Wei is the smallest unit of ether, Ethereum's native currency: one ETH equals 10^18 wei, or a quintillion wei. The unit is named after Wei Dai, a cryptographer whose 1998 b-money proposal influenced cryptocurrency design. The Ethereum protocol does all of its accounting in wei — balances, transaction values, and fees are stored as whole numbers of wei, and the amounts you see in ETH are just human-friendly conversions.
Such extreme divisibility exists because smart contracts need precise integer arithmetic; working in whole wei avoids the rounding errors that decimal fractions can introduce. In practice, ordinary users rarely deal in raw wei. Instead, intermediate units are used: the most common is gwei (one billion wei), the standard unit for quoting gas prices. For example, a transaction fee might be calculated as 21,000 gas at 10 gwei per gas — which is 210,000 gwei, or 0.00021 ETH, while the protocol under the hood records it as 210,000,000,000,000 wei.
A common misconception is that wei is a separate currency; it is simply the base denomination of ether, exactly as a cent is a denomination of a dollar — just divided far more finely. Developers encounter wei constantly, since Ethereum tools and contract code express all values in it, and mistaking ETH for wei (or vice versa) is a classic programming error.
Related terms