[Ethereum] ETH vs ERC20 token


I am almost newbie. I understand that ETH is the currency for Etherium networks. I also do understand that ERC20 is standard for smart contract, which is used by Etherium based networks.

Very often I see that people are using terms –

  • "get ERC20 token…"
  • "exchange ERC20 token between two accounts"
  • "Don't want to transfer ETH, but want to transfer ERC20 token…."

My questions are –

  • What actually is ERC20 token?
  • Why people uses the term token here?
  • Is ERC20 a token that has some monetary value like ETH? Otherwise why people want to change token between accounts?
  • Is ERC20 token is something that just exists only during transaction (like a session token in normal web?) and invalid once current transaction finishes? Or it can last even outside of transaction and can be persisted in the memory to use later?

Thanks in advance.

Best Answer

A small correction: ERC20 is not a standard for smart contracts: it's a standard for creating tokens and most tokens around Ethereum are based on that standard.

An ERC20 token is a smart contract which simply has an internal ledger which says which address owns how many tokens. So whenever someone transfers those tokens around, one balance is decreased and other balance increased inside the token smart contract. The term token is used to denominate this kind of sub-assets - the native asset in Ethereum blockchain is Ether and it's often referred to as coin.

Anyone can create an ERC20 token and it basically costs a few dollars to deploy. What gives some of the tokens real value is simply supply and demand: the more people want them the more value it gets. By default no token has value so the value is eventually only based on supply and demand (except maybe some special tokens which are for example backed by real-life assets).

Here is an example of an ERC20 token: https://etherscan.io/address/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#code An ERC20 token is not transitory: it always exists in the blockchain. So it's nothing like web cache. It's a real state in the Ethereum smart contract. One can transfer 50 tokens in one transaction and transfer 50 more in another transaction.

Note that there are lots and lots of different ERC20 tokens out there. Each has a unique (smart contract) address and that's the only sure way to distinguish between them. Anyone can name their token whatever they want.

Related Topic