Skip to content
Fundamental Concepts

Wei

Menor unidade do ether, a moeda da rede Ethereum; é usada para expressar valores muito pequenos, sobretudo o preço do gás pago nas transações.

Key points

  • Wei is the smallest unit of ether, the native currency of the Ethereum network, just as a cent is a fraction of a traditional currency.
  • One ether corresponds to a very large number of wei, which allows tiny values to be represented with precision.
  • It is widely used internally by the network and when dealing with the gas price, which is usually expressed in fractions of ether.

What is wei?

Wei is the smallest division of ether. Just as a traditional currency is divided into cents, ether is divided into much smaller units, and the smallest of these is the wei. The difference is one of scale: while a common currency has a hundred cents, one ether is divided into an enormous number of wei, which allows extremely small amounts to be represented without rounding.

How it works

Internally, the Ethereum network does not work with ether in decimal numbers, but with integer values expressed in wei. This avoids the precision problems that would arise from dealing with decimal places and ensures that every calculation is exact. When a wallet displays a balance in ether, it is actually converting a value the network stores in wei into a more readable form.

Between wei and ether there are intermediate units, the best known of which is gwei, widely used to express the gas price. Since the cost of processing a transaction is usually a tiny fraction of an ether, expressing it in wei would produce gigantic and impractical numbers, which is why gwei became popular as a convenient intermediate scale.

In practice, most people never need to think about wei directly, since wallets and applications handle the conversion automatically. The concept comes up more often for those who program on the network or examine the technical details of a transaction, where raw values are usually expressed in this unit.

Understanding that this minimal unit exists helps explain why the network can handle such small values with precision.

Why it matters

Knowing about wei helps in understanding how the Ethereum network represents values internally and why transaction costs appear in such small units. For anyone examining a transfer in detail, knowing that raw values come in wei avoids confusion. This is a technical concept and does not represent any trading recommendation.

Risks and limitations

Wei is just a unit of measurement and has no economic meaning of its own beyond representing a fraction of ether. Dealing with values in wei directly is impractical because of the number of digits involved, and converting to ether or gwei depends on doing the math correctly, which can be a source of error for anyone handling these numbers by hand.