2

I am planning for a cryptocurrency app, and am trying to figure out something I haven't been able to find an answer to.

On the Etherum blockchain, a user has a public address used for receiving coins, and a private key used to send. There are also many other coins based on the Etherum blockchain; most ICOs seem to be using the ERC20 protocol to issue their coins.

Can a regular Ethereum public address be used for receiving all kinds of such coins, or only for Ether?

Lars Andren
  • 8,601
  • 7
  • 41
  • 56

1 Answers1

2

Yes. Under the hood, token balances is usually just a mapping state variable inside the ERC20 token contract. The mapping holds an Ethereum address as the key and the balance as the value. The address can be either a basic Externally Owned Account (EOA) address or the address of a smart contract (ie, a wallet), and the same address can be in multiple ERC20 contracts.

Here is a simple example of an address on Rinkeby that has both Ether and tokens (ATT)

enter image description here

The decision of where to store your tokens depends on your security preferences. If you use an EOA account then there is a risk of someone getting a hold of your private key and transferring funds/tokens out. For this reason, some people prefer to either use a wallet, or store their assets across multiple EOA accounts.

carver
  • 2,229
  • 12
  • 28
Adam Kipnis
  • 10,175
  • 10
  • 35
  • 48